

LevelDB for Ruby - DAddYE
https://github.com/DAddYE/leveldb

======
kposehn
Interesting.

The snap! feature is something that could be potentially useful, along with
the batch feature.

We currently deal with millions of rows a minute (about 10-16k/second) on our
platform and need to store, queue and process hashed data across multiple
systems. Redis is our main system for it, but some of the data needs to be
archived and doesn't need to remain in memory, but still needs to eventually
be processed.

Could be good for that. Thanks for posting!

~~~
krenoten
One thing to keep in mind with LevelDB is that it has been created with web
browsers and mobile devices as the main use case, NOT as a high-performance
data store. If the features of LevelDB appeal to you, however, you may want to
check out Basho's fork of it that they have tuned for use in a server
environment:
[https://github.com/basho/leveldb](https://github.com/basho/leveldb) . If this
is interesting to you, check out Matthew Von-Maszewsky's recent talk at the
Ricon East conference about his work tuning it:
[http://www.youtube.com/watch?v=vo88IdglU_8](http://www.youtube.com/watch?v=vo88IdglU_8)

~~~
rescrv
There's also the HyperLevelDB fork which outperforms the Basho one by quite a
bit for random write workloads. Here's a write up about it:
[http://hackingdistributed.com/2013/06/17/hyperleveldb/](http://hackingdistributed.com/2013/06/17/hyperleveldb/)

~~~
DAddYE
basho and hyperlevel should be two easy targets for this gem, this week I'll
plan to adapt the code (if necessary)

------
malditogeek
OP, I've been using leveldb-ruby[1] for some time. Is yours just an
alternative implementation or are there any other improvements I'm missing?

[1] [https://github.com/wmorgan/leveldb-
ruby](https://github.com/wmorgan/leveldb-ruby)

~~~
DAddYE
Is an alternative with some features, i.e. snapshots (IIRC), then I'm planning
to add custom comparators and pluggable builtin serializers. Another thing is
that leveldb-ruby is built in c++, instead mine uses ruby builtin ffi, should
be a little slower (benchmarks will come) but easier to maintain and to
extend.

~~~
rurounijones
Since it uses ffi it _should_ work on jruby, have you actually tried to see if
it works well?

------
VeejayRampay
Thanks for the link, though I find the information about the project a bit
sparse. For example, I'd be interested to know what the expected/intended use
cases are for such a database and what exactly does "embedded" mean in this
context.

This is the closest I could find:
[https://code.google.com/p/leveldb/](https://code.google.com/p/leveldb/)

~~~
DAddYE
Thanks for the feedback, I'll add more links in the readme. In the meanwhile I
suggest this reading: [http://skipperkongen.dk/2013/02/14/having-a-look-at-
leveldb/](http://skipperkongen.dk/2013/02/14/having-a-look-at-leveldb/)

~~~
VeejayRampay
From the article you linked, the teaser for LevelDB is really:

"It is an embedded database, i.e. one you use directly in your programming
language and it runs in the same process as your program. The interface is a
key-value store."

------
mmahemoff
Thee embedded DB model can be great for smaller websites. I've run Tokyo
Cabinet as the sole DB for a Sinatra webapp for several years now and it's
been hassle-free. It also made it easy to migrate servers.

