Redis ZRANGEBYLEX demo

Query:

Additional info

The demo is turned off currently for lack of free memory in the small VPS used by the redis.io web site. We plan to activate it at least in a reduced form in the next days.This is a demo of the new ZRANGEBYLEX Redis command. It autocompletes thefield using all thesource code as autocompletion dictionary.Every time the user types something, the page sends a request to a small PHP snippet calledwhich sends a query to Redis, and returns the result to the web page as a JSON array.As you type in the input field below, you'll see the list of suggestions appearing.The javascript was adapted from an example taken from JQuery Autocomplete The Redis instance uses 1 GB of memory to hold the 8 million unique lines into a sorted set. Thescript ( source code in this Gist ) is not very optimized and creates a new Redis connection at every call, but this does not add enough latency for the user to notice. In practice we can auto-complete thousands of simultaneous connections (that likely translates to hundreds of thousands real users, as a connection is created only when the user stops typing something, and immediately destroyed) in real time, with a delay that is mostly the round-trip-time between the client and the web server.ETA: The new ZRANGEBYLEX command will be available in Redis 2.8.9 before the end of April 2014. It is already available in the 2.8 branch at Github.