The beta version of redis with some annotations added.
It is worth learning the design idea of redis via the first version. I have made following changes in order to study the codes more easily:
-
Delete unused files and functions;
-
Split the redis.c into redis.h and redis.c to make the source file shorter;
-
Rename some variables and functions;
-
Sort the implementation of functions according to their declaration;
-
Unify the code format, including brackets and spaces.
-
Add 'static' to local functions.
Fortunately, the codes are very short after these changes (3,000 code lines). Enjoy it!
Several notes on Redis are available on my blog: http://blog.csdn.net/jsc0218/article/details/21280821.