A command issued by the implementation
REDIS.C, you can see the implementation of rediscommandtable[], listing all supported commands. Most of the incoming parameters are redisclient *c, and when a Redis command is issued, the call flow is as follows
In the createclient will assemble the next client, which will call Selectdb () to select the database, and the database stores a dictionary structure dict *dict, the key in this dict is the key to execute the Redis command, the value is the Redis object robj.
REDISDB structure as follows, is already an abstract diagram, such as hashobject, theoretically there should be a REDISOBJCT structure, and then PTR refers to a dict structure, and then to a entry and so on:
Then all the read, add, update to the DB is now redisdb.dict/new key value (the object's key value) (such as book), and then update the dict in the corresponding key in the value (RobJ, such as Hashobject) in the content (such as name, Author or publisher).
[Redis Reading notes] Part two stand-alone database