开发者

Key-value store for Ruby & Java

开发者 https://www.devze.com 2023-03-11 02:00 出处:网络
I need a recommendation for a key-value store. Here\'s my criteria: Doesn\'t have to be persistent but needs to support lots of records (records are small, 100-1000 bytes)

I need a recommendation for a key-value store. Here's my criteria:

  1. Doesn't have to be persistent but needs to support lots of records (records are small, 100-1000 bytes)
  2. Insert (put) will happen only occasionally, always in large datasets (bulk)
  3. Get will be random and needs to be fast
  4. Clients will be in Ruby and, perhaps Java
  5. It should be relatively easy to setup and with as li开发者_开发技巧ttle maintenance needed as possible


Redis sounds like the right thing to use here. It's all in memory so it's very fast (The GET and SET operations are both O(1)) and it supports both Ruby and Java clients.


Aerospike would be a perfect because of below reasons:

  1. Key Value based with clients available in Java and Ruby.
  2. Throughput: Better than Redis/Mongo/Couchbase or any other NoSQL solution. See this http://www.aerospike.com/blog/use-1-aerospike-server-not-12-redis-shards/. Have personally seen it work fine with more than 300k read TPS and 100k Write TPS concurrently.
  3. Automatic and efficient data sharding, data re-balancing and data distribution using RIPEMD160.
  4. Highly Available system in case of Failover and/or Network Partitions.
  5. Open sourced from 3.0 version.
  6. Can be used in Caching mode with no persistence.
  7. Supports LRU and TTL.
  8. Little or No maintenance.


An AVL-Tree will give you O(log n) on insert, remove, search and most everything else.


1 and 3 both scream a database engine.

If your number of records isn't insane and you only have one client using this thing at the same time, I would personally recommend sqlite, which works with both Java and Ruby (also would pass #5). Otherwise go with a real database system, like MySql (since you're not on the Microsoft stack).

0

精彩评论

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