开发者

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:

  1. Distributed
  2. Can iterate over keys in ascending sequence.
  3. Can find key based on partial key (prefix) match.
  4. Values can be blobs up to a mb or two.
  5. Accessible from Java.
  6. 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.
  7. Way to query the system to find out which machine has a key.
  8. Some support for replication and redundancy.


I have two answers for you:

  1. Amazon S3 supports all of this, but obviously it runs on their servers and not yours. In particular it supports prefix lookups very well.
  2. 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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜