Mladen Jablanović
Mladen Jablanović

Reputation: 44090

Key-value store for Ruby & Java

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 little maintenance needed as possible

Upvotes: 4

Views: 555

Answers (4)

Ankur Choudhary
Ankur Choudhary

Reputation: 485

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.

Upvotes: 5

Jeff Foster
Jeff Foster

Reputation: 44706

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.

Upvotes: 6

Blindy
Blindy

Reputation: 67417

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).

Upvotes: 0

Eduard Thamm
Eduard Thamm

Reputation: 942

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

Upvotes: 0

Related Questions