KO
|
EN
gitlite — search
Search
#javascript
#python
#hacktoberfest
#react
#ai
#typescript
#llm
#go
#golang
#android
#machine-learning
#rust
#deep-learning
#linux
ruby-leveldb-native
★ 16
Open GitHub ↗
A ruby binding to levelDB
Download README (.md)
Explore Similar Repositories
wallgig
:
wallgig is an open source wallpaper sharing community written in Rails 4
grk2clj
:
From Greek to Clojure, Clojure/conj 2013
crx-jtrans
:
jTransliter - the roman to unicode transliter as Google chrome extension
ffmpeg_win_example
:
CMake + FFMPEG for windows example
Robot-Rescue-2013
:
RoboCup Junior Rescue B Robot sharing (CAD, Software, Electronics, materials and all stuff)
// repository documentation
Was this content helpful?
★ 0
(0 ratings)
Select Rating:
★
★
★
★
★
Submit Feedback
Recent Feedback
×
Download README
Do you want to download the
README.md
file for
ruby-leveldb-native
?
Download (.md)
ruby-leveldb-native =================== A ruby binding to levelDB. It is native in two senses: 1. Uses libleveldb as a C/C++ ruby extension, rather than through FFI. 2. Uses the natively installed libleveldb, rather than trying to build and install libleveldb as part of the gem. **Please consider using [LMDB](http://symas.com/mdb/) with the [ruby bindings](https://github.com/minad/lmdb) instead. It's more suitable for most purposes.** LevelDB ------- [LevelDB] (http://code.google.com/p/leveldb/) is a persistent key-value store developed at Google. Synopsis -------- require 'leveldb-native' db = LevelDBNative::DB.new '/tmp/db' db["key"] = "value" p db["key"] # "value" sn = db.snapshot db["key"] = "new value" p db["key"] # "new value" p sn["key"] # "value" See also the [examples] (example/). Installation ------------ The gem installs in the normal way: gem install leveldb-native However, you need to have libleveldb installed. It may be available as part of your OS (from debian repos, for example), or you may prefer to install from source. The source packages from google do not have install scripts, but that is easy to fix. Here is a git repo with the necessary fixes to the makefile: https://github.com/vjoel/leveldb. Just follow the instructions in that repo's README to build and install. FAQ --- 1. Why not use the [leveldb gem] (https://github.com/DAddYE/leveldb) instead? 1. Doesn't support the full functionality of snapshots. Snapshots in this gem can only be used to switch the state of the DB object, but not act as independent and concurrent readable views of the database at different points in time. 2. Tries to maintain its own installation of libleveldb, which may be a different version from the system-wide installation. 3. Accesses the lib using FFI, which is slower than ruby's native extension architecture. (See benchmarks at the link above.) 2. Why not use the [leveldb-ruby gem] (https://github.com/wmorgan/leveldb-ruby) instead? 1. Not maintained regularly. 2. Tries to maintain its own installation of libleveldb. 3. No snapshots. This gem attempts to maintain compatibility with the leveldb-ruby gem, while adding more features. Acknowledgement --------------- This gem owes much to William Morgan's gem, https://github.com/wmorgan/leveldb-ruby. Contact ------- This project is hosted at https://github.com/vjoel/leveldb-native. Contact Joel VanderWerf: * vjoel@users.sourceforge.net * https://twitter.com/JoelVanderWerf License and Copyright --------------------- Copyright (c) 2013-2014, Joel VanderWerf. Portions of ext/leveldb-native/leveldb-native.cc are copyright William Morgan. License for this project is MIT. See the LICENSE file for the standard MIT license.