Daily development, there will always be some fun things, such as the Redis, when it comes to Redis, someone may be compared with memcache, yes, memcache can only be said to be a simple kv memory data structure, and the Redis support of the type of information is much richer, Of course, the best way to make people look at the eyes is sortedset.
With it, we can play some "greedy" questions, for example, for the "greedy" priority queue, when it comes to priority queues, we previously realized just memory form, hey, memory is memory after all, when there is massive data, it is best to have a serialization to the hard disk operation ... Precisely this scene Redis can be done ...
One: Quickly build
Well, we know that Redis is better suited to do, now we can build it quickly.
The first step: Download Redis-2.0.2.zip (bit). Then change the name to Redis and put it in D disk.
The most important is the following two:
Redis-server.exe: This is the Redis server program.
Redis-cli.exe: Once the server is open, our clients can enter various command tests.
This column more highlights: http://www.bianceng.cnhttp://www.bianceng.cn/webkf/tools/
From the diagram we can see two points:
①: Config file not specified.
Originally Redis suggested that we make a configuration file, then I do section configuration.
Daemonize: Whether the "daemon" way to open, when the daemon is not affected by the console.
Logfile:log file location.
Database: Number of databases open.
Dbfilename: Data Snapshot file name.
Save * *: The frequency of the snapshot is saved, the first is the time, and the second is the write operation.
Once these are configured, we'll look at them again:
②: We see Redis the default open port is 6379.