Skip to content

basho/eleveldb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

0ad275c · Mar 6, 2023
Feb 22, 2023
Feb 21, 2023
Sep 13, 2016
Oct 22, 2019
Feb 10, 2018
May 7, 2020
May 29, 2019
Feb 15, 2017
Feb 21, 2023
Jun 21, 2022
Feb 21, 2023
Feb 22, 2023
Feb 10, 2018
May 8, 2022

Repository files navigation

eleveldb - Erlang bindings to LevelDB datastore

Erlang CI Actions Status

This project provides erlang bindings to a LevelDB datastore heavily optimised for Riak workloads. See the Basho leveldb wiki for a breakdown of the optimisations.

No further work on optimising the underlying store is currently being undertaken, only minimal fixes necessary for platform compatability.

As an alternative, elrang bindings to RocksDB can be found as part of the BarrellDB project. For Riak-like workloads, especially with large objects, the pure-Erlang Leveled store is also available.

Iterating Records

High-level Iterator Interface

The interface that most clients of eleveldb should use when iterating over a set of records stored in leveldb is fold, since this fits nicely with the Erlang way of doing things.

For those who need more control over the process of iterating over records, you can use direct iterator actions. Use them with great care.

Direct Iterator Actions

seek/next/prev

  • seek: Move iterator to a new position.

  • next: Move forward one position and return the value; do nothing else.

  • prev: Move backward one position and return the value; do nothing else.

prefetc/prefetch_stop

  • prefetch: Perform a next action and then start a parallel call for the subsequent next while Erlang processes the current next. The subsequent prefetch may return immediately with the value already retrieved.

  • prefetch_stop: Stop a sequence of prefetch calls. If there is a parallel prefetch pending, cancel it, since we are about to move the pointer.

Warning

Either use prefetch/prefetch_stop or next/prev. Do not intermix prefetch and next/prev. You must prefetch_stop after one or more prefetch operations before using any of the other operations (seek, next, prev).