2 ms·
This article seems to be more focused on teaching the reader about the Redis protocol and Go than an attempt to make a truly production-ready client interface.
by Zikes 12y ago
This article seems to be more focused on teaching the reader about the Redis protocol and Go than an attempt to make a truly production-ready client interface. Certainly someone could take what they learn from this article and go on to do such a thing, but I think the author is more concerned with teaching than building.
- guywithabike 12y ago(Author here) Correct -- this post is more about exploring RESP and why it's a neat protocol by implementing a very basic RESP reader. I wouldn't write a new Redis client unless I wanted to do something significantly different than the existing, battle-tested Redis clients like Redigo. This is the reason the code exists only in the blog post rather than in a GitHub repo that can be imported. Besides, reading RESP objects is only the very first step in implementing a true Redis client. You need to handle response types (null bulk strings, null arrays, etc), opening TCP connections and handling errors therein, and offer up a sane API for end-users. And that's definitely outside the scope of the blog post. :)