<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Filippo Secchi</title>
    <description>The latest articles on DEV Community by Filippo Secchi (@filipposecchi).</description>
    <link>https://dev.to/filipposecchi</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F518216%2Fe553b83d-1fa4-43d2-8d04-d649c217e0a6.png</url>
      <title>DEV Community: Filippo Secchi</title>
      <link>https://dev.to/filipposecchi</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/filipposecchi"/>
    <language>en</language>
    <item>
      <title>I Built a Pure-Rust Columnar OLAP Engine from Scratch: 701k Rows/Sec and 16.4x ZSTD Compression</title>
      <dc:creator>Filippo Secchi</dc:creator>
      <pubDate>Wed, 25 Nov 2026 08:45:34 +0000</pubDate>
      <link>https://dev.to/filipposecchi/i-built-a-pure-rust-columnar-olap-engine-from-scratch-701k-rowssec-and-164x-zstd-compression-hfc</link>
      <guid>https://dev.to/filipposecchi/i-built-a-pure-rust-columnar-olap-engine-from-scratch-701k-rowssec-and-164x-zstd-compression-hfc</guid>
      <description>&lt;p&gt;Legacy columnar databases like ClickHouse and Apache Druid are engineering marvels—but if you have ever operated them in cloud-native, multi-tenant environments, you know the operational tax they carry: massive C++ codebases, ZooKeeper/Keeper consensus clusters, stateful local NVMe disks, and complex S3 tiering configurations.&lt;/p&gt;

&lt;p&gt;I wanted an analytical engine designed from first principles for the object-storage era: &lt;strong&gt;100% pure safe Rust, zero C++ dependencies, single-binary deployment, crash-safe WAL durability, and open Apache Parquet storage on S3 or Cloudflare R2.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;So I built &lt;strong&gt;&lt;a href="https://github.com/aetherial-online/hercules-olap" rel="noopener noreferrer"&gt;Hercules OLAP&lt;/a&gt;&lt;/strong&gt;—and open-sourced &lt;code&gt;v0.1.0&lt;/code&gt; under &lt;code&gt;AGPLv3&lt;/code&gt; (with a Commercial OEM option).&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;The Architecture: Decoupling Hot Ingestion from Cold Columnar Storage&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Instead of mixing stateful disk trees with consensus daemons, Hercules splits the pipeline into four clean, lock-free Rust modules:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Durable Append-Only WAL (&lt;code&gt;src/wal.rs&lt;/code&gt;):&lt;/strong&gt; Every incoming &lt;code&gt;JSONEachRow&lt;/code&gt; HTTP batch is appended to a local Write-Ahead Log and flushed via &lt;code&gt;sync_data()&lt;/code&gt; (&lt;code&gt;fsync&lt;/code&gt;) before returning &lt;code&gt;HTTP 200&lt;/code&gt;. On restart, uncompacted WAL segments replay automatically.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Lock-Free Columnar &lt;code&gt;MemTable&lt;/code&gt; (&lt;code&gt;src/memtable.rs&lt;/code&gt;):&lt;/strong&gt; Payloads are parsed into 64-byte aligned &lt;strong&gt;Apache Arrow &lt;code&gt;RecordBatch&lt;/code&gt;&lt;/strong&gt; arrays inside a concurrent &lt;code&gt;DashMap&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Async &lt;code&gt;ZSTD&lt;/code&gt; Parquet Compactor (&lt;code&gt;src/compactor.rs&lt;/code&gt;):&lt;/strong&gt; A background Tokio worker drains active &lt;code&gt;MemTable&lt;/code&gt; partitions, sorts and compresses them into immutable &lt;strong&gt;Apache Parquet&lt;/strong&gt; segments using &lt;code&gt;ZSTD&lt;/code&gt;, and truncates the corresponding WAL.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Unified Hot + Cold SQL Federation (&lt;code&gt;src/engine.rs&lt;/code&gt;):&lt;/strong&gt; Powered by &lt;strong&gt;Apache DataFusion&lt;/strong&gt;, every SQL query dynamically merges live uncompacted RAM batches with historical &lt;code&gt;.parquet&lt;/code&gt; files on Local NVMe, AWS S3, or Cloudflare R2 via a zero-copy &lt;code&gt;UNION ALL&lt;/code&gt; plan—guaranteeing &lt;strong&gt;real-time read-after-write visibility&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;




&lt;p&gt;&lt;strong&gt;Verified Single-Node Benchmarks (&lt;code&gt;10,000,000&lt;/code&gt; Rows + WAL &lt;code&gt;fsync&lt;/code&gt;)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;All tests below were run on a single node with &lt;strong&gt;crash-safe &lt;code&gt;fsync&lt;/code&gt; enabled on every batch&lt;/strong&gt; (&lt;code&gt;1,153.75 MB&lt;/code&gt; raw NDJSON across 6 columns):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Sustained Ingestion (&lt;code&gt;16&lt;/code&gt; concurrent workers):&lt;/strong&gt; &lt;strong&gt;&lt;code&gt;701,931 rows/sec&lt;/code&gt;&lt;/strong&gt; (&lt;code&gt;10M&lt;/code&gt; rows ingested in &lt;code&gt;14.25 s&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Storage Compression (&lt;code&gt;ZSTD&lt;/code&gt; Parquet):&lt;/strong&gt; &lt;strong&gt;&lt;code&gt;16.40x&lt;/code&gt;&lt;/strong&gt; (&lt;code&gt;1,153.75 MB&lt;/code&gt; raw JSON → &lt;code&gt;70.33 MB&lt;/code&gt; on disk)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Filtered Predicate Pushdown (&lt;code&gt;10M&lt;/code&gt; rows):&lt;/strong&gt; &lt;strong&gt;&lt;code&gt;99.13 ms&lt;/code&gt;&lt;/strong&gt; (&lt;code&gt;WHERE status_code &amp;gt;= 500 GROUP BY service&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Full-Scan Group-By (&lt;code&gt;10M&lt;/code&gt; rows):&lt;/strong&gt; &lt;strong&gt;&lt;code&gt;135.55 ms&lt;/code&gt;&lt;/strong&gt; (&lt;code&gt;GROUP BY tenant_id ORDER BY reqs DESC LIMIT 10&lt;/code&gt;)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Every file written by Hercules is 100% open Apache Parquet—immediately readable by Polars, DuckDB, Spark, and PyTorch with zero ETL exports.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Try It in 30 Seconds&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git clone https://github.com/aetherial-online/hercules-olap.git
&lt;span class="nb"&gt;cd&lt;/span&gt; hercules-olap
cargo run --release
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Full source code, modular Rust architecture, and reproducible 10M-row benchmark scripts are live on GitHub:&lt;br&gt;
👉 &lt;strong&gt;&lt;a href="https://github.com/aetherial-online/hercules-olap" rel="noopener noreferrer"&gt;://github.com/aetherial-online/hercules-olap&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;(We are also building **Aetherial Omni&lt;/em&gt;&lt;em&gt;, The Invisible Data Fabric, True physical per-tenant isolation and client-side Zero-Knowledge security—turning cold object storage (S3 / R2) into a sub-2ms, 6-in-1 multi-engine fabric.&lt;br&gt;
Join the early access waitlist at &lt;a href="https://aetherial.online" rel="noopener noreferrer"&gt;aetherial.online&lt;/a&gt;).&lt;/em&gt;&lt;/p&gt;

</description>
      <category>database</category>
      <category>rust</category>
      <category>opensource</category>
      <category>architecture</category>
    </item>
  </channel>
</rss>
