Session

The Whys and Hows of a Hybrid Rust+Java Distributed Query Engine

Apache Pinot is a distributed real-time analytics database written in Java. Its multi-stage engine runs joins, aggregations and window functions over large intermediate results. In the JVM, query memory is hard to predict, hard to bound, and shared with the garbage collector. A single heavy query can put the whole server under pressure.

We wanted explicit control over query memory without rewriting the database. So we built a hybrid engine. Java keeps planning, coordination and data access. Stage execution moves to Apache DataFusion, a Rust query engine built on Apache Arrow, where memory is accounted for, limited and spilled to disk on our terms.

This talk explains why we made that choice and what it took to make it work. We cover how data crosses the boundary between the two runtimes, and who owns memory on each side. We also cover how cancellation and failures travel between Java and Rust, and how existing Java code keeps running while we migrate one operator at a time.

You will leave with a practical view of when a native engine inside a JVM service is worth its cost, and which problems to solve first if you decide to build one.

Gonzalo Ortiz Jaureguizar

Performance engineer at Startree

Madrid, Spain

Actions

Please note that Sessionize is not responsible for the accuracy or validity of the data provided by speakers. If you suspect this profile to be fake or spam, please let us know.

Jump to top