Live data from Hacker News

Redis on steroids: Autocomplete using Redis, Nginx and Lua

cucumbertown.com

1–10 of 12 posts

Re: Redis on steroids: Autocomplete using Redis, Nginx and Lua

#7
post #6

The usual implementation for autocomplete is to generate a trie data structure. A naive implementation will not have auto-correction or fix problems more established implementations have already addressed.

True, but tries do not automatically solve those problems, either, and most tries use lots of memory, especially on 64-bit systems (pointers, pointers everywhere!).

Re: Redis on steroids: Autocomplete using Redis, Nginx and Lua

#9
post #6

The usual implementation for autocomplete is to generate a trie data structure. A naive implementation will not have auto-correction or fix problems more established implementations have already addressed.

I'm currently implementing my own trie (for learning) for my own autocomplete module ... and I don't see how a trie (prefix tree) can solve the issues you just wrote.

Re: Redis on steroids: Autocomplete using Redis, Nginx and Lua

#10
post #3

I wonder if replacing nginx+lua with http://webd.is/ would be faster (and maybe easier to deploy)?

nginx+lua can be exceptionally fast. It's the basis for OpenResty, which is a consistent top-performer in the Web Framework Benchmarks (http://www.techempower.com/benchmarks/)

Webdis is a neat project, but I'd be a bit wary of deploying a custom HTTP server written just for Redis interactions. Nginx is battle-hardened.

Post reply on HN