Read annotated Redis 3.0 source code in Chinese to understand how its core data structures like hash tables and linked lists are implemented.
Study how Redis handles client networking and persistence by reading annotated C source files for networking.c and aof.c.
Use the file-to-purpose table in the README as a map to navigate the full Redis 3.0 codebase systematically.
Follow along with the Redis Design and Implementation book using this annotated code as the reference implementation.
This is a read-only study resource in Chinese, building the C source requires a C compiler and Redis build dependencies.
This repository is a line-by-line annotated copy of the Redis 3.0 source code, written in Chinese. Redis is a widely used in-memory data store: programs use it to store and retrieve data very quickly, often for caching, session storage, or message queuing. The annotations were created by the author while writing a companion book called "Redis Design and Implementation," and every concept covered in the book has a corresponding comment in the source code. The annotation project makes no changes to the actual logic of the code. The only modifications from the original Redis 3.0 source are minor whitespace and blank-line adjustments. The intent is to let readers follow the source code exactly as Redis was written, while understanding what each part does. The README includes a table mapping every source file in the project to its purpose in the system. For example, adlist.c implements the doubly linked list data structure, dict.c implements the hash table (dictionary), cluster.c handles Redis Cluster, aof.c handles the append-only file persistence mechanism, and networking.c manages client connections. The table covers around 60 source files in total, giving a structured map of the entire codebase. This repository is intended for developers or students learning how Redis works internally, particularly those who can read Chinese and want to understand the design of a production-grade C database system. It is not a newer or modified version of Redis. The author also released a companion book tied to this annotation work, available separately.
← huangzworks on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.