Leveraging Rust in our high-performance Java database
Blog post from QuestDB
QuestDB is an open-source time-series database designed for high-performance workloads, offering ultra-low latency, high ingestion throughput, and a multi-tier storage engine with native support for Parquet and SQL. The database leverages a predominantly Java codebase with some C, C++, and Assembly, employing techniques to minimize garbage collection by using Zero-GC Java principles. Over time, QuestDB has integrated Rust to enhance its capabilities, especially for tasks requiring minimal garbage collection, leveraging Rust's static linking to avoid symbol collisions and its extensive library on crates.io. The integration of Rust involves creating complete components outside Java, facilitated by the development of a rust-maven-plugin to streamline the build process within the Maven ecosystem. This integration supports a seamless developer workflow in IntelliJ, enabling Rust and Java code to be compiled together, and aids in deploying QuestDB’s enterprise features like replication, cold storage, and native SSL/TLS, which benefit from Rust's performance efficiencies. The transition to Rust has been well-received within the QuestDB team, highlighting its suitability for developing scalable, enterprise-grade database features.