Linux Today: Linux News On Internet Time.
Search Linux Today
Linux News Sections:  Developer -  High Performance -  Infrastructure -  IT Management -  Security -  Storage -
Linux Today Navigation
LT Home
Contribute
Contribute
Link to Us
Linux Jobs


Top White Papers

More on LinuxToday


Redis: Lightweight key/value Store That Goes the Extra Mile

Sep 02, 2009, 15:33 (0 Talkback[s])
(Other stories by Jeremy Zawodny)

[ Thanks to An Anonymous Reader for this link. ]

"Okay, let’s have a quick look at what just happened there. The redis server started up and waited for connections on TCP port 6379 (which you can see if you look in the log file), so we can just use telnet localhost 6379 and start talking to it. The redis protocol is a very simple interactive plain-text protocol that’s reminiscent of the POP3 email protocol.

"The SET command is used to create a new key and associate a string value with it. It expects a key name and a value length. We set mykey equal to hello, world! The GET command is how you fetch the value associated with a key. To check for the existence of a key, use the EXISTS command, which will return a boolean value.

"It’s worth noting that call commands in the redis protocol are case-insensitive (though the documentation typically shows them in uppercase for readability) and you really don’t need to get into the details of the wire protocol most of the time."

Complete Story

Related Stories: