---

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

[ 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

Get the Free Newsletter!

Subscribe to Developer Insider for top news, trends, & analysis