Adam Retter
adam@evolvedbinary.com
RocksDB Meetup
@ Meta, Menlo Park
2026-03-16
@adamretter
RocksJava
Present and Future

Evolved Binary and RocksDB
-
Evolved Binary
-
UK - Software, Consultancy, Training, and R&D
-
Contributors to RocksJava for > 10 Years
-
-
RocksJava (Java, C++, and JNI / FFM)
-
Ensure Feature Parity with C++ API
-
Performance Improvements
-
Docker Images - Build Environments - CentOS 7 / Alpine 3.20
-
Build and Release RockJava binaries (135 releases since 2016)
-
-
Helped Porting RocksDB
-
Windows / macOS / z/OS / PPC / Arm64 / RISC-V
-
-
GitHub issues, and general bug-fixing
RocksJava Releases
-
Intentionally Conservative!
-
Java 8 (2014)
-
-
Targets 14 platforms:
-
Linux
-
i386 / amd64 / ppc64le / aarch64 / s390x / RISC-V
-
GNU libc 2.17 (2012)
-
musl Libc 1.2.5 (2024)
-
-
Windows (Windows 10+ / Windows Server 2016+)
-
amd64
-
vcruntime140.dll and UCRT
-
-
macOS (Mojave 10.14 +)
-
amd64
-
aarch64
-
-
RocksJava Releases
-
Upcoming targets:
-
Windows aarch64
-
AIX PPC64
-
z/OS
-
FreeBSD amd64
-
OpenBSD amd64
-
-
Cloud Hardware Donations (Thank You!):
-
Evolved Binary - RISC-V, macOS, Windows, Linux amd64/i386, FreeBSD, OpenBSD
-
Oregon State University - Open Source Labs - ppc64le Linux, ppc64 AIX
-
Huawei - aarch64 Linux
-
Marist University - s390x Linux
-
IBM - z/OS
-
Current RocksJava
Release Process
Overview
(< 10.5.1)

Current
RocksJava
Release
Process
(< 10.5.1)

Problems with Current Release Process
-
Driven from macOS
-
We can't emulate/virtualize macOS
-
Can no longer build Linux i386 binaries under macOS (on Apple Silicon)
-
-
RocksJava upgrade to C++ 20 was challenging
-
We want to target older GNU/MUSL libc, or Windows, or macOS
-
Need C++ 20 compiler that supports older platform
-
Thank you SCL for CentOS!
-
-
Maven Central changed its publication process
-
Now hard to publish without Apache Maven
-
New RocksJava
Release Process
Overview
(>= 10.5.1)

New
RocksJava
Release
Process
(>= 10.5.1)

Java - Foreign Function and Memory API
-
RocksJava is currently built using JNI (Java Native Interface)
-
Java FFM (Foreign Function and Memory API)
-
Modern replacement for JNI
-
Previewed in Java 18 (Mar. 2022)
-
Stabilised in Java 22 (Mar. 2024)
-
Performance improved in Java 24 (Mar. 2025)
-
-
Advantages
-
Less/No binding code (delete JNI C++ code)
-
Performance?
-
-
Disadvantages
-
Need to improve RocksDB C API (Advantage?)
-
Requires dependent projects to upgrade their Java (>= RocksJava)
-
JNI vs FFM Benchmarks
-
Java JNI and FFM Benchmarks (JMH)
https://github.com/evolvedbinary/jni-benchmarks -
RocksDB Blog - Java API Performance Enhancements
https://rocksdb.org/blog/2023/11/06/java-jni-benchmarks.html -
RocksDB Blog - Java Foreign Function Interface
https://rocksdb.org/blog/2024/02/20/foreign-function-interface.html
JNI vs FFM Benchmarks (Example)

How to move from JNI to FFM?
-
We need:
-
Improved RocksDB C API (Feature Partity, etc.)
-
We can do that!
-
-
-
Possible Approaches
-
Big Bang - Replace JNI with FFM
-
Some aspects of JNI may not be replaceable!
-
-
Phased
-
Gradually replace parts of JNI with FFM
-
-
Parallel
-
Develop FFM in Parallel to JNI (Support both newer and older Java versions)
-
Deprecate JNI
-
Grow FFM Adoption
-
Remove JNI
-
-
When to move from JNI to FFM?
-
No plans to remove JNI from Java at present
-
New Projects are recommended to use FFM over JNI
-
-
RocksDB is widely used as infrastructure:
-
e.g. Many Apache projects use RocksJava
-
Java Binaries are Forwards Compatible - Not Backwards Compatible
-
RocksJava's use of Java 8 (and older glibc, etc.) ensures wide compatibility
-
-
Incorporating Java FFM means:
-
Moving to at least Java 22 (Mar. 2024) as a minimum
-
Closest LTS release is Java 25 (Sept. 2025)
-
Thanks
and
Questions
RocksJava - Present and Future
By Adam Retter
RocksJava - Present and Future
Declarative Amsterdam @ CWI, Amsterdam 2025-11-06
- 5