Skip to content

lmdbjava/lmdbjava

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

116 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status Coverage Status Dependency Status License Size

LmdbJava

LmdbJava provides an extremely low latency JNR-FFI-based binding to the LMDB native library. LMDB is an ultra-fast, ultra-compact, b-tree ordered, embedded, key-value store developed by Symas for the OpenLDAP Project.

LMDB uses memory-mapped files, so it has the read performance of a pure in-memory database while still offering the persistence of standard disk-based databases. It is transactional with full ACID semantics and crash-proof by design. No journal files. No corruption. No startup time. No dependencies. No config tuning. LMDB is the perfect foundation for large, read-centric, single node workloads that require strong latency and operational robustness outcomes.

Usage

  1. Install liblmdb for your platform (eg Arch Linux: pacman -S lmdb)
  2. Clone this repository and mvn clean install (Maven Central coming soon)
  3. Add the lmdbjava artifact to your project POM
  4. Browse the LMDB Documentation (especially the Getting Started page)
  5. Take a look at our tests (the LmdbJava class names and contracts closely match the LMDB C API)

Support

We're happy to help you use LmdbJava. Simply open a GitHub issue if you have any questions.

Contributing

Contributions are welcome! Please see the Contributing Guidelines.

History

For years Java users have been able to access LMDB via LMDBJNI. Its public API is mature and widely used, but this makes it challenging to implement any substantial changes.

LmdbJava was created to provide a new LMDB abstraction without the backward compatibility consideration. A separate project also offered a convenient opportunity to implement many internal changes to reduce latency and long-term maintenance costs. For example, we moved from HawtJNI to JNR-FFI (for its active community, lower latency, Java 9 roadmap and much simpler build requirements). We also significantly reduced and isolated Unsafe use, with only a single method now requiring it (and there is an automatic reflective fallback if Unsafe isn't available). Overall these changes make LmdbJava the optimal choice for projects targeting server-class JVMs, and it will be easy to support Java 9 when released.

License

This project is licensed under the Apache License, Version 2.0.

You must separately install the LMDB library. LMDB is currently licensed under The OpenLDAP Public License.

About

Lightning Memory Database (LMDB) for Java: a low latency, transactional, sorted, embedded, key-value store

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages