I just posted, but it didn't show up so forgive me if this is a duplicate...
I am trying to do a multi dimensional filter:
SELECT id FROM X WHERE a in (1,2) AND b in(3,4) AND c in (4,6) AND d in (3,5) .....
from < 100,000 items
The approaches I am looking at are:
1. embedding SQLite, using it as an in-memory only store, and prepared statements. this dissuaded me (https://groups.google.com/forum/#!msg/openresty-en/lUH10YE_6Z8/yinTC855qfYJ)
2. using this data structure https://github.com/chriso/bitset from lua, and doing unions / intersections
3. building a data structure in lua and traversing it in pure lua
4. calling a service with the cosocket API
the data structure can be built at startup, and is static (unchanged during runtime) so the data structure can be read only.
performance / low latency is the #1 concern (under high concurrency)
Besides the cosocket API, I am assuming all of my other solutions are blocking and will kill performance? is there a better way to do this in process? using co-routines?
thanks!