replicaof masterip masterhostreplicaof masterip masterhost-replicaof masterip masterhost前几天读了redis双链表的实现,一个标准的双链表,但是也实现了存储任意类型,用void*,真的是奇淫技巧,可能是我见识少,感觉也能实现内核链表那种感觉,今天看来记录一下。
首先是结构定义
c/* Node, List, and Iterator are the only data structures used currently. */
typedef struct listNode { //指针和数据耦合在一起,非侵入式
struct listNode *prev;
struct listNode *next;
void *value;
} listNode;
What is Redis?
Redis is a fast in-memory NoSQL database and cache. Besides open-source, written in C, and designed for speed, Redis means “Remote Dictionary Server”.
Its fundamental data types are strings, lists, hashes, sets, and sorted sets; therefore Redis is often referred to as a data structure server. Many other data structures and capabilities for geolocation and stream processing are also available.