Help me pick a key/value store
Hate to ask others to do my research for me, but perhaps there's a kind soul who knows the answer off the top of his head:
I need a key/value store with the following characteristics:
- Distributed
- Can iterate over keys in ascending sequence.
- Can find key based on partial key (prefix) match.
- Values can be blobs up to a mb or two.
- Accessible from Java.
- Some 开发者_如何学JAVAway to set the rules so I can control how keys are distributed across machines, that is, I'd like to have a rule that keys with a common prefix stay on one machine.
- Way to query the system to find out which machine has a key.
- Some support for replication and redundancy.
I have two answers for you:
- Amazon S3 supports all of this, but obviously it runs on their servers and not yours. In particular it supports prefix lookups very well.
- MongoDB supports all of this. You can use regexes or $where to do prefix matching. Be careful with the indexes for best performance.
I'm not sure it fits all your requirements, but have you looked at Hazelcast's distributed maps? It's been awhile since I looked at Hazelcast so I don't know if there's a way to know which instances are responsible for a given key, or a way to assign keys to instances, but it does provide support for safe concurrent operations across the entire distributed map and other nice things.
精彩评论