Did you know ... Search Documentation:
Packs (add-ons) for SWI-Prolog

Package "rocksdb"

Title:SWI-Prolog interface to RocksDB
Rating:Not rated. Create the first rating!
Latest version:0.8.0
SHA1 sum:f110766ee97cfbc6fddd4c33b7238f00e76ecc18
Author:Jan Wielemaker <J.Wielemaker@vu.nl>
Maintainer:Jan Wielemaker <J.Wielemaker@cwi.nl>
Packager:Jan Wielemaker <J.Wielemaker@cwi.nl>
Home page:https://github.com/JanWielemaker/rocksdb
Download URL:https://github.com/JanWielemaker/rocksdb.git

Reviews

No reviews. Create the first review!.

Details by download location

VersionSHA1#DownloadsURL
0.5.0e92e951173fbafa70cb1225941e672ddc98560dc3https://github.com/JanWielemaker/rocksdb/archive/V0.5.0.zip
0.6.0687ab5156fb4e05b7eff71bfc6df602c343c5fb110https://github.com/JanWielemaker/rocksdb/archive/V0.6.0.zip
0.7.01875de6403e2606a9040a591bfffefe9d34dfe5022https://api.github.com/repos/JanWielemaker/rocksdb/zipball/V0.7.0
c71a05346e46054591006bd61b6a0201feda91911https://github.com/JanWielemaker/rocksdb.git
0.8.098ec2151732a03ca666ce1c0196b850b370138b82https://github.com/JanWielemaker/rocksdb.git
f110766ee97cfbc6fddd4c33b7238f00e76ecc183https://github.com/JanWielemaker/rocksdb.git

SWI-Prolog interface for RocksDB

This is a SWI-Prolog pack that provides library(rocksdb), a binding to RocksDB.

Installation

The installation requires a recent C++ compiler. RocksDB can work with several compression libraries. Most systems have zlib installed, but others may provide better performance or less resource usage. See INSTALL.md. Once these are in place, a simple

?- pack_install(rocksdb).

Should do the trick. Note that this clones RocksDB and builds it the way we need the library. This requires significant disk space (1.4Gb) and takes long (several minutes on a modern machine).

Why are you not using the pre-build librocksdb?

There are a number of issues with several pre-built versions of librocksdb:

  • Shared objects are often linked to jemalloc or tcmalloc. This prevents lazy loading of the library, causing either problems loading or running the embedded rocksdb.
  • Various libraries are compiled without RTTI (RunTime Type Info), which breaks subclassing RocksDB classes.
  • Static library is by default compiled without -fPIC and thus not usable.

As is, the most reliable way around is to include RocksDB, so we can control the version and build it the way that best fits our needs: as a static library with RTTI and -fPIC.

Manual installation

If the above fails

  • Clone this prepository in the pack directory of your installation or clone it elsewhere and link it.
  • Run ?- pack_rebuild(rocksdb). to rebuild it. On failure, adjust Makefile to suit your installation and re-run the pack_rebuild/1 command.

Status

The wrapper provides most functionality of RocksDB. It does not provide access to the many options that can be set to configure RocksDB. These will be added on demand. Please create issues for missing functionality (or bugs).

Contents of pack "rocksdb"

Pack contains 9 files holding a total of 41.4K bytes.