Hi Willem (and Blake),
Re: 1) - fetching by KV is obviously the "lowest common denominator" of all random-access stores, but the one tiny step beyond that is prefix-scanning, which *is* supported by Redis, to my understanding (SCAN
), as well as HBase and Cassandra (although I'm sure these queries aren't "free" relative to KV queries). Alternatively, Redis APIs to allow for appending (APPEND
) to a value of List type would allow the following common use case to work: essentially any feature situation where a collection is the logical value and we don't want to fetch the full collection, append to it, then write back the sized N+1 collection. Implementing this *either* as APPEND *or* writing to a compound key with a prefix (doc1234_) which will be the actual known part of the key at query time, followed by even just timestamp, so that at query time you can do say "get me the first N values for keys starting with doc1234_" (where N is some smallish / reasonable size: 10-1000, say.
This is important for a lot of use cases where the features are essentially immutable append-only collections (most recent recordIds a user has interacted with, most recent search queries a user has issued - basically any time you've got "most recent X's which have done 'a thing' to Y", and you want to later use Y as your query key. Sure, you could do this with immutable collections as your value, fetch the whole value each time you want to update it, and write back, but for write-heavy workloads and collections sizes smaller than "tiny", this is going to be pretty ugly, performance-wise (amortized O(N^2) cost for building your size N collections per key).
Any chance efficient mutable collection support could be allowed in the API, for suitably constrained collections (like append-only lists)? Either composite keys and range scans, or literal "append" (ideally with some limit on the collection size, I guess?) seem generally supported by most backing storage systems (heck, even S3 supports prefix queries in the way it "fakes" a directory structure).