<?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: Swaraj Puppalwar</title>
    <description>The latest articles on DEV Community by Swaraj Puppalwar (@ultrontheai).</description>
    <link>https://dev.to/ultrontheai</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%2F3679100%2F6bde6311-665a-4970-96be-40148aa03e71.png</url>
      <title>DEV Community: Swaraj Puppalwar</title>
      <link>https://dev.to/ultrontheai</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ultrontheai"/>
    <language>en</language>
    <item>
      <title>LioranDB V2 Pre-Alpha Benchmark Summary</title>
      <dc:creator>Swaraj Puppalwar</dc:creator>
      <pubDate>Wed, 29 Jul 2026 13:26:36 +0000</pubDate>
      <link>https://dev.to/ultrontheai/liorandb-v2-pre-alpha-benchmark-summary-4nfb</link>
      <guid>https://dev.to/ultrontheai/liorandb-v2-pre-alpha-benchmark-summary-4nfb</guid>
      <description>&lt;p&gt;Over the past few weeks I've been benchmarking &lt;strong&gt;LioranDB V2&lt;/strong&gt;, a document database engine written completely from scratch in &lt;strong&gt;Rust&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Instead of publishing screenshots or selected numbers, I've decided to publish the raw benchmark logs so anyone can inspect the results themselves.&lt;/p&gt;

&lt;p&gt;This is &lt;strong&gt;Pre-Alpha&lt;/strong&gt; software. The goal isn't to claim perfection, but to be transparent about where the database stands today and where it's heading.&lt;/p&gt;




&lt;h2&gt;
  
  
  Test Environment
&lt;/h2&gt;

&lt;p&gt;All benchmarks were executed on my personal development machine rather than a dedicated server.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Hardware&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Laptop: HP OMEN Gaming Laptop&lt;/li&gt;
&lt;li&gt;Processor: Intel Core Ultra 7 (14th Generation)&lt;/li&gt;
&lt;li&gt;CPU Cores: 16 Physical Cores&lt;/li&gt;
&lt;li&gt;Memory: 24 GB DDR5 @ 5600 MT/s&lt;/li&gt;
&lt;li&gt;Storage: NVMe PCIe SSD&lt;/li&gt;
&lt;li&gt;Operating System: Windows&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;LioranDB Configuration&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Language: Rust&lt;/li&gt;
&lt;li&gt;Nodes: 4&lt;/li&gt;
&lt;li&gt;Partitions: 8&lt;/li&gt;
&lt;li&gt;Worker Threads: 32&lt;/li&gt;
&lt;li&gt;Batch Size: 256&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Features Enabled&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Secondary Indexes&lt;/li&gt;
&lt;li&gt;Full-Text Search&lt;/li&gt;
&lt;li&gt;Write-Ahead Log (WAL)&lt;/li&gt;
&lt;li&gt;MVCC&lt;/li&gt;
&lt;li&gt;Parallel Read &amp;amp; Write Execution&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; These benchmarks were intentionally performed on a consumer laptop instead of enterprise server hardware. The purpose was to evaluate LioranDB V2's real-world performance on hardware that many developers already own. Dedicated server hardware with higher core counts, faster storage, and larger memory capacity is expected to deliver significantly higher throughput.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h1&gt;
  
  
  Write Performance
&lt;/h1&gt;

&lt;p&gt;The write benchmarks were executed using realistic document workloads while maintaining durability through the WAL.&lt;/p&gt;

&lt;p&gt;Results reached approximately&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;23K to 25K writes/sec&lt;/strong&gt; during the benchmark&lt;/li&gt;
&lt;li&gt;Sustained write throughput across millions of documents&lt;/li&gt;
&lt;li&gt;Stable WAL group commit behavior&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Benchmark logs:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.liorandb.com/benchmark_ldb/write/writes_log_1m.txt" rel="noopener noreferrer"&gt;https://www.liorandb.com/benchmark_ldb/write/writes_log_1m.txt&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.liorandb.com/benchmark_ldb/write/writes_log_10m.txt" rel="noopener noreferrer"&gt;https://www.liorandb.com/benchmark_ldb/write/writes_log_10m.txt&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.liorandb.com/benchmark_ldb/write/writes_other_log_1m.txt" rel="noopener noreferrer"&gt;https://www.liorandb.com/benchmark_ldb/write/writes_other_log_1m.txt&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.liorandb.com/benchmark_ldb/write/writes_other_log_10m.txt" rel="noopener noreferrer"&gt;https://www.liorandb.com/benchmark_ldb/write/writes_other_log_10m.txt&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h1&gt;
  
  
  Read Performance
&lt;/h1&gt;

&lt;p&gt;Read benchmarks include&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Primary Key Lookups&lt;/li&gt;
&lt;li&gt;Secondary Index Queries&lt;/li&gt;
&lt;li&gt;Range Queries&lt;/li&gt;
&lt;li&gt;Pagination&lt;/li&gt;
&lt;li&gt;Full Text Search&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;During the benchmarks the engine demonstrated&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Low millisecond latency&lt;/li&gt;
&lt;li&gt;High parallel throughput&lt;/li&gt;
&lt;li&gt;Efficient index lookups&lt;/li&gt;
&lt;li&gt;Stable read performance under concurrency&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Benchmark logs&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.liorandb.com/benchmark_ldb/read/reads_log_1m.txt" rel="noopener noreferrer"&gt;https://www.liorandb.com/benchmark_ldb/read/reads_log_1m.txt&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.liorandb.com/benchmark_ldb/read/reads_log_10m.txt" rel="noopener noreferrer"&gt;https://www.liorandb.com/benchmark_ldb/read/reads_log_10m.txt&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.liorandb.com/benchmark_ldb/read/reads_other_log_1m.txt" rel="noopener noreferrer"&gt;https://www.liorandb.com/benchmark_ldb/read/reads_other_log_1m.txt&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.liorandb.com/benchmark_ldb/read/reads_other_log_10m.txt" rel="noopener noreferrer"&gt;https://www.liorandb.com/benchmark_ldb/read/reads_other_log_10m.txt&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h1&gt;
  
  
  Mixed Workload
&lt;/h1&gt;

&lt;p&gt;Real applications rarely perform only reads or only writes.&lt;/p&gt;

&lt;p&gt;The soak benchmark continuously executed mixed workloads consisting of writes together with concurrent reads.&lt;/p&gt;

&lt;p&gt;Target workload:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;~10K Writes/sec&lt;/li&gt;
&lt;li&gt;~25K Reads/sec&lt;/li&gt;
&lt;li&gt;~35K Total Operations/sec&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The goal was to evaluate long-running stability rather than peak numbers.&lt;/p&gt;

&lt;p&gt;Benchmark log&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.liorandb.com/benchmark_ldb/soak/soak_10m.txt" rel="noopener noreferrer"&gt;https://www.liorandb.com/benchmark_ldb/soak/soak_10m.txt&lt;/a&gt;&lt;/p&gt;




&lt;h1&gt;
  
  
  Crash Recovery Test
&lt;/h1&gt;

&lt;p&gt;Reliability matters more than benchmark numbers.&lt;/p&gt;

&lt;p&gt;LioranDB V2 was repeatedly terminated during active writes and restarted to verify WAL recovery.&lt;/p&gt;

&lt;p&gt;The crash benchmark performs multiple forced crashes while documents are still being inserted.&lt;/p&gt;

&lt;p&gt;Recovery validates:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;WAL replay&lt;/li&gt;
&lt;li&gt;Metadata consistency&lt;/li&gt;
&lt;li&gt;Duplicate prevention&lt;/li&gt;
&lt;li&gt;Missing document detection&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Benchmark log&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.liorandb.com/benchmark_ldb/crash/crash_test_1m_9c.txt" rel="noopener noreferrer"&gt;https://www.liorandb.com/benchmark_ldb/crash/crash_test_1m_9c.txt&lt;/a&gt;&lt;/p&gt;




&lt;h1&gt;
  
  
  What These Benchmarks Show
&lt;/h1&gt;

&lt;p&gt;Current pre-alpha results demonstrate:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Multi-node architecture&lt;/li&gt;
&lt;li&gt;Parallel execution&lt;/li&gt;
&lt;li&gt;Durable WAL commits&lt;/li&gt;
&lt;li&gt;Secondary indexes&lt;/li&gt;
&lt;li&gt;Full-text search&lt;/li&gt;
&lt;li&gt;Sustained write throughput&lt;/li&gt;
&lt;li&gt;Concurrent reads and writes&lt;/li&gt;
&lt;li&gt;Crash recovery support&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The project is still under active development, and these benchmarks are intended to provide transparent insight into its current capabilities rather than serve as marketing claims.&lt;/p&gt;




&lt;h1&gt;
  
  
  Benchmark Repository
&lt;/h1&gt;

&lt;p&gt;All raw benchmark logs are publicly available.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.liorandb.com/benchmark_ldb/" rel="noopener noreferrer"&gt;https://www.liorandb.com/benchmark_ldb/&lt;/a&gt;&lt;/p&gt;




&lt;h1&gt;
  
  
  About LioranDB
&lt;/h1&gt;

&lt;p&gt;LioranDB is an open-source distributed document database written from scratch in Rust.&lt;/p&gt;

&lt;p&gt;The project focuses on building modern developer infrastructure with performance, simplicity, and transparency as core principles.&lt;/p&gt;

&lt;p&gt;Website&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.liorandb.com" rel="noopener noreferrer"&gt;https://www.liorandb.com&lt;/a&gt;&lt;/p&gt;




&lt;h1&gt;
  
  
  About Lioran Group
&lt;/h1&gt;

&lt;p&gt;LioranDB is developed by &lt;strong&gt;Lioran Developer Solutions (LDS)&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Website&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.lioransolutions.com" rel="noopener noreferrer"&gt;https://www.lioransolutions.com&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Company&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.lioran.group" rel="noopener noreferrer"&gt;https://www.lioran.group&lt;/a&gt;&lt;/p&gt;




&lt;h1&gt;
  
  
  About the Author
&lt;/h1&gt;

&lt;p&gt;&lt;strong&gt;Swaraj Puppalwar&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Founder &amp;amp; CTO, Lioran Group&lt;/p&gt;

&lt;p&gt;GitHub&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/UltronTheAI" rel="noopener noreferrer"&gt;https://github.com/UltronTheAI&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;Feedback, benchmark reviews, and contributions are always welcome. Every benchmark log is public so anyone can inspect the results, reproduce the tests, and help improve the project.&lt;/p&gt;

</description>
      <category>liorandb</category>
      <category>nosql</category>
      <category>database</category>
      <category>indian</category>
    </item>
    <item>
      <title>From Embedded Engine to Distributed Database: LioranDB's Cluster Architecture</title>
      <dc:creator>Swaraj Puppalwar</dc:creator>
      <pubDate>Fri, 24 Jul 2026 18:59:36 +0000</pubDate>
      <link>https://dev.to/ultrontheai/from-embedded-engine-to-distributed-database-liorandbs-cluster-architecture-m24</link>
      <guid>https://dev.to/ultrontheai/from-embedded-engine-to-distributed-database-liorandbs-cluster-architecture-m24</guid>
      <description>&lt;p&gt;LioranDB begins with a local transactional storage engine, but its architecture extends beyond one process.&lt;/p&gt;

&lt;p&gt;The DBMS backend can operate in several modes:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Local
Multi-core
Multi-node
Remote cluster
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  One DBMS interface
&lt;/h2&gt;

&lt;p&gt;The document layer talks through a backend abstraction.&lt;/p&gt;

&lt;p&gt;A read transaction may therefore target:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight rust"&gt;&lt;code&gt;&lt;span class="nf"&gt;Local&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ReadTxn&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;MultiCore&lt;/span&gt;
&lt;span class="n"&gt;MultiNode&lt;/span&gt;
&lt;span class="n"&gt;Cluster&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The document query layer does not need a completely different API for each deployment model.&lt;/p&gt;

&lt;h2&gt;
  
  
  Multi-core routing
&lt;/h2&gt;

&lt;p&gt;In multi-core mode, a table and key are mapped to one engine partition.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;table + key
    ↓
partition hash
    ↓
local engine partition
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Multi-node routing
&lt;/h2&gt;

&lt;p&gt;In multi-node mode, the operation first selects a node and then a partition inside that node.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;table + key
    ↓
node
    ↓
partition
    ↓
engine
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Global scans visit several partitions or nodes and merge the returned keys.&lt;/p&gt;

&lt;h2&gt;
  
  
  WAL-based replication
&lt;/h2&gt;

&lt;p&gt;The cluster crate includes a leader-driven replication abstraction.&lt;/p&gt;

&lt;p&gt;A replicator:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Fetches WAL entries from a starting LSN.&lt;/li&gt;
&lt;li&gt;Limits the batch by entries and bytes.&lt;/li&gt;
&lt;li&gt;Sends the batch to a follower.&lt;/li&gt;
&lt;li&gt;Receives the follower's acknowledged LSN.&lt;/li&gt;
&lt;li&gt;Continues from the next LSN.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The current abstraction is synchronous, but it cleanly separates WAL production from transport.&lt;/p&gt;

&lt;p&gt;That transport can later be backed by RPC.&lt;/p&gt;

&lt;h2&gt;
  
  
  gRPC server
&lt;/h2&gt;

&lt;p&gt;The server crate opens a node using:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Cluster configuration&lt;/li&gt;
&lt;li&gt;Node identity&lt;/li&gt;
&lt;li&gt;On-disk engine configuration&lt;/li&gt;
&lt;li&gt;TLS certificates&lt;/li&gt;
&lt;li&gt;Certificate authority&lt;/li&gt;
&lt;li&gt;ACL rules&lt;/li&gt;
&lt;li&gt;gRPC listen address&lt;/li&gt;
&lt;li&gt;Metrics address&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is the boundary where the database becomes a network service instead of an embedded library.&lt;/p&gt;

&lt;h2&gt;
  
  
  The larger idea
&lt;/h2&gt;

&lt;p&gt;A distributed database should not be designed by gluing networking onto a single global engine at the end.&lt;/p&gt;

&lt;p&gt;It needs internal seams for:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Partition ownership
Request routing
WAL shipping
Follower application
Read preferences
Node configuration
Security
Observability
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;LioranDB's architecture is building those seams from the storage layer upward.&lt;/p&gt;

&lt;p&gt;The result is a path from one Rust process to a multi-core and eventually replicated database system without replacing the entire core halfway through.&lt;/p&gt;

&lt;p&gt;That is the architectural long game.&lt;/p&gt;




&lt;p&gt;LioranDB is developed by &lt;a href="https://www.google.com/search?q=Swaraj+Puppalwar" rel="noopener noreferrer"&gt;Swaraj Puppalwar&lt;/a&gt; under &lt;a href="https://lioran.group" rel="noopener noreferrer"&gt;Lioran Group&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Explore the project:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://liorandb.com" rel="noopener noreferrer"&gt;LioranDB&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://lioransolutions.com" rel="noopener noreferrer"&gt;Lioran Developer Solutions&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://lioran.group" rel="noopener noreferrer"&gt;Lioran Group&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>liorandb</category>
      <category>nosql</category>
      <category>database</category>
      <category>indian</category>
    </item>
    <item>
      <title>Progressive Readiness: How LioranDB Opens Before Everything Is Finished</title>
      <dc:creator>Swaraj Puppalwar</dc:creator>
      <pubDate>Fri, 24 Jul 2026 18:58:29 +0000</pubDate>
      <link>https://dev.to/ultrontheai/progressive-readiness-how-liorandb-opens-before-everything-is-finished-2m76</link>
      <guid>https://dev.to/ultrontheai/progressive-readiness-how-liorandb-opens-before-everything-is-finished-2m76</guid>
      <description>&lt;p&gt;Database startup is rarely one binary moment.&lt;/p&gt;

&lt;p&gt;After a crash or cold start, different capabilities become safe at different times.&lt;/p&gt;

&lt;p&gt;LioranDB models this explicitly through progressive readiness states.&lt;/p&gt;

&lt;h2&gt;
  
  
  Startup states
&lt;/h2&gt;

&lt;p&gt;The DBMS can move through states such as:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;OPENING
RECOVERING
INDEX_REPLAYING
READ_DEGRADED
READ_READY
FINALIZING
WRITE_READY
CORRUPT
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is more informative than a single Boolean called &lt;code&gt;ready&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Different kinds of readiness
&lt;/h2&gt;

&lt;p&gt;LioranDB separately tracks whether it can:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Serve primary-key reads&lt;/li&gt;
&lt;li&gt;Serve indexed reads&lt;/li&gt;
&lt;li&gt;Accept degraded writes&lt;/li&gt;
&lt;li&gt;Accept fully ready writes&lt;/li&gt;
&lt;li&gt;Query through an index replay overlay&lt;/li&gt;
&lt;li&gt;Declare all background state drained&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For example, primary documents may already be recoverable while secondary indexes are still replaying mutations.&lt;/p&gt;

&lt;p&gt;In that situation, refusing every read may be unnecessarily conservative.&lt;/p&gt;

&lt;p&gt;But allowing an index query would return incomplete results.&lt;/p&gt;

&lt;h2&gt;
  
  
  Capability gates
&lt;/h2&gt;

&lt;p&gt;The engine checks facts such as:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Primary recovery complete
Catalog loaded
Logical primary view ready
Manifest valid
WAL replay complete
Secondary index ready
Text index ready
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If a capability is blocked, the readiness report records the reasons.&lt;/p&gt;

&lt;p&gt;That makes startup behaviour observable and testable.&lt;/p&gt;

&lt;h2&gt;
  
  
  Timelines and metrics
&lt;/h2&gt;

&lt;p&gt;LioranDB records timestamps for events such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;API handle creation&lt;/li&gt;
&lt;li&gt;Primary recovery&lt;/li&gt;
&lt;li&gt;Catalog readiness&lt;/li&gt;
&lt;li&gt;WAL replay completion&lt;/li&gt;
&lt;li&gt;Index overlay availability&lt;/li&gt;
&lt;li&gt;Secondary readiness&lt;/li&gt;
&lt;li&gt;Text readiness&lt;/li&gt;
&lt;li&gt;Full write readiness&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It also tracks rejected operations before each capability becomes safe.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why this architecture matters
&lt;/h2&gt;

&lt;p&gt;Large databases can take meaningful time to rebuild indexes or drain recovery work.&lt;/p&gt;

&lt;p&gt;A progressive readiness model allows a service to expose safe functionality earlier without pretending the whole system is ready.&lt;/p&gt;

&lt;p&gt;The important word is &lt;strong&gt;safe&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Fast startup should not mean returning subtly incomplete data.&lt;/p&gt;

&lt;p&gt;It should mean identifying the earliest point at which each operation becomes correct.&lt;/p&gt;




&lt;p&gt;LioranDB is created by &lt;a href="https://www.google.com/search?q=Swaraj+Puppalwar" rel="noopener noreferrer"&gt;Swaraj Puppalwar&lt;/a&gt; at &lt;a href="https://lioran.group" rel="noopener noreferrer"&gt;Lioran Group&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Links:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://liorandb.com" rel="noopener noreferrer"&gt;LioranDB&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://lioransolutions.com" rel="noopener noreferrer"&gt;Lioran Developer Solutions&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://lioran.group" rel="noopener noreferrer"&gt;Lioran Group&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>liorandb</category>
      <category>database</category>
      <category>indian</category>
      <category>nosql</category>
    </item>
    <item>
      <title>The I/O Scheduler That Stops Background Work From Killing Latency</title>
      <dc:creator>Swaraj Puppalwar</dc:creator>
      <pubDate>Fri, 24 Jul 2026 18:57:28 +0000</pubDate>
      <link>https://dev.to/ultrontheai/the-io-scheduler-that-stops-background-work-from-killing-latency-3g08</link>
      <guid>https://dev.to/ultrontheai/the-io-scheduler-that-stops-background-work-from-killing-latency-3g08</guid>
      <description>&lt;p&gt;A database performs many kinds of disk activity:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;WAL fsync
Primary data flushes
Document-store writes
Index flushes
Compaction
Text compaction
Checkpoint sync
Metadata writes
Cleanup
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If all of them hit the disk without coordination, foreground latency becomes chaotic.&lt;/p&gt;

&lt;p&gt;LioranDB contains a global I/O scheduler to manage this contention.&lt;/p&gt;

&lt;h2&gt;
  
  
  I/O classes
&lt;/h2&gt;

&lt;p&gt;Operations are assigned to classes such as:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;WalFsync
Metadata
PrimaryFlush
DocStore
IndexFlush
IndexMaintenance
Compaction
TextCompaction
CheckpointSync
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Each class has a relative priority.&lt;/p&gt;

&lt;p&gt;WAL fsync receives the highest weight because committed transactions may be waiting for it.&lt;/p&gt;

&lt;p&gt;Background compaction receives less priority because it can usually pause briefly without breaking correctness.&lt;/p&gt;

&lt;h2&gt;
  
  
  Token-based budgeting
&lt;/h2&gt;

&lt;p&gt;The scheduler maintains a byte budget per second.&lt;/p&gt;

&lt;p&gt;Operations consume tokens as they perform I/O.&lt;/p&gt;

&lt;p&gt;The budget supports short bursts but prevents background workers from continuously saturating the device.&lt;/p&gt;

&lt;p&gt;The default budget can be configured through environment variables.&lt;/p&gt;

&lt;h2&gt;
  
  
  Foreground awareness
&lt;/h2&gt;

&lt;p&gt;The scheduler records recent foreground activity.&lt;/p&gt;

&lt;p&gt;When user-facing writes are active, optional background operations can yield.&lt;/p&gt;

&lt;p&gt;Examples include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Secondary compaction&lt;/li&gt;
&lt;li&gt;Text compaction&lt;/li&gt;
&lt;li&gt;Cleanup&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This reduces the chance that a giant merge causes sudden WAL latency spikes.&lt;/p&gt;

&lt;h2&gt;
  
  
  Sync coordination
&lt;/h2&gt;

&lt;p&gt;Physical syncs are especially expensive.&lt;/p&gt;

&lt;p&gt;LioranDB tracks sync ownership for:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;WAL
Checkpoint
Document store
Metadata
Compaction
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It also records whether WAL fsync was blocked by another subsystem.&lt;/p&gt;

&lt;p&gt;That gives engineers evidence instead of vibes when investigating latency.&lt;/p&gt;

&lt;h2&gt;
  
  
  Circuit-breaker behaviour
&lt;/h2&gt;

&lt;p&gt;The code also models background-I/O health states such as:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Healthy
Elevated
Critical
Recovery
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When WAL latency becomes dangerous, background work can use smaller chunks or pause more aggressively.&lt;/p&gt;

&lt;p&gt;Databases are not CPU programs that occasionally touch disk.&lt;/p&gt;

&lt;p&gt;They are I/O orchestration systems wearing an API as a hat.&lt;/p&gt;

&lt;p&gt;Once several durability and maintenance pipelines exist, a scheduler becomes essential to keep them from wrestling in the storage aisle.&lt;/p&gt;




&lt;p&gt;Built by &lt;a href="https://www.google.com/search?q=Swaraj+Puppalwar" rel="noopener noreferrer"&gt;Swaraj Puppalwar&lt;/a&gt; under &lt;a href="https://lioran.group" rel="noopener noreferrer"&gt;Lioran Group&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;More:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://liorandb.com" rel="noopener noreferrer"&gt;LioranDB&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://lioransolutions.com" rel="noopener noreferrer"&gt;Lioran Developer Solutions&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://lioran.group" rel="noopener noreferrer"&gt;Lioran Group&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>liorandb</category>
      <category>nosql</category>
      <category>database</category>
      <category>indian</category>
    </item>
    <item>
      <title>Checkpoints and Atomic Manifests in LioranDB</title>
      <dc:creator>Swaraj Puppalwar</dc:creator>
      <pubDate>Fri, 24 Jul 2026 18:56:23 +0000</pubDate>
      <link>https://dev.to/ultrontheai/checkpoints-and-atomic-manifests-in-liorandb-70d</link>
      <guid>https://dev.to/ultrontheai/checkpoints-and-atomic-manifests-in-liorandb-70d</guid>
      <description>&lt;p&gt;A WAL can recover recent writes, but replaying an ever-growing log on every startup would eventually become unacceptable.&lt;/p&gt;

&lt;p&gt;Databases therefore create checkpoints.&lt;/p&gt;

&lt;h2&gt;
  
  
  What does a checkpoint mean?
&lt;/h2&gt;

&lt;p&gt;A checkpoint advances the durable on-disk state.&lt;/p&gt;

&lt;p&gt;Conceptually:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;WAL contains operations up to LSN 1,000,000
Data pages are flushed up to LSN 900,000
Checkpoint LSN becomes 900,000
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The engine now knows that older WAL records below the safe reclaim boundary may no longer be required.&lt;/p&gt;

&lt;h2&gt;
  
  
  The manifest
&lt;/h2&gt;

&lt;p&gt;LioranDB stores critical engine metadata in a &lt;code&gt;MANIFEST&lt;/code&gt; file.&lt;/p&gt;

&lt;p&gt;It includes values such as:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Page size
Next page ID
Next LSN
Checkpoint LSN
Freelist root
Table root pages
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Without this metadata, the engine would not know where its tables begin or which log range is already reflected on disk.&lt;/p&gt;

&lt;h2&gt;
  
  
  Atomic replacement
&lt;/h2&gt;

&lt;p&gt;Updating metadata in place is dangerous.&lt;/p&gt;

&lt;p&gt;A crash halfway through the write could leave a partially written manifest.&lt;/p&gt;

&lt;p&gt;LioranDB instead follows an atomic replacement flow:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Encode new manifest
    ↓
Write temporary file
    ↓
fsync temporary file
    ↓
Rename temporary file over MANIFEST
    ↓
Sync directory entry
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The rename allows the old or new complete manifest to exist, instead of a half-manifest chimera crawling out of a power failure.&lt;/p&gt;

&lt;h2&gt;
  
  
  Bounded checkpoint slices
&lt;/h2&gt;

&lt;p&gt;Checkpointing can also compete with foreground writes for disk bandwidth.&lt;/p&gt;

&lt;p&gt;LioranDB supports limits based on:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Bytes per checkpoint slice&lt;/li&gt;
&lt;li&gt;Wall-clock time per slice&lt;/li&gt;
&lt;li&gt;Dirty-byte targets&lt;/li&gt;
&lt;li&gt;WAL quiet periods&lt;/li&gt;
&lt;li&gt;Periodic full checkpoints&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The checkpoint can yield and continue later rather than monopolizing storage.&lt;/p&gt;

&lt;p&gt;A checkpoint is not simply “save database now.”&lt;/p&gt;

&lt;p&gt;It is a coordinated agreement between WAL durability, dirty pages, metadata publication, index state, and log reclamation.&lt;/p&gt;

&lt;p&gt;Getting that agreement wrong is how databases lose acknowledged data.&lt;/p&gt;

&lt;p&gt;Getting it right is how startup stays fast without compromising recovery.&lt;/p&gt;




&lt;p&gt;LioranDB is developed by &lt;a href="https://www.google.com/search?q=Swaraj+Puppalwar" rel="noopener noreferrer"&gt;Swaraj Puppalwar&lt;/a&gt; at &lt;a href="https://lioran.group" rel="noopener noreferrer"&gt;Lioran Group&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Explore:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://liorandb.com" rel="noopener noreferrer"&gt;LioranDB&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://lioransolutions.com" rel="noopener noreferrer"&gt;Lioran Developer Solutions&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://lioran.group" rel="noopener noreferrer"&gt;Lioran Group&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>liorandb</category>
      <category>nosql</category>
      <category>database</category>
      <category>indian</category>
    </item>
    <item>
      <title>Inside LioranDB's Full-Text Search Segments</title>
      <dc:creator>Swaraj Puppalwar</dc:creator>
      <pubDate>Fri, 24 Jul 2026 18:54:33 +0000</pubDate>
      <link>https://dev.to/ultrontheai/inside-liorandbs-full-text-search-segments-4661</link>
      <guid>https://dev.to/ultrontheai/inside-liorandbs-full-text-search-segments-4661</guid>
      <description>&lt;p&gt;A normal secondary index can answer:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;status = "active"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It cannot efficiently answer:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;documents containing "distributed database"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;LioranDB therefore has a dedicated text-segment architecture.&lt;/p&gt;

&lt;h2&gt;
  
  
  Tokenization
&lt;/h2&gt;

&lt;p&gt;Text is split on non-alphanumeric characters.&lt;/p&gt;

&lt;p&gt;Depending on index options, tokens can be normalized to lowercase and filtered through stopwords.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"Building Distributed Databases"

becomes

["building", "distributed", "databases"]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Segment contents
&lt;/h2&gt;

&lt;p&gt;A LioranDB text segment can contain several files and structures:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Term dictionary
Posting lists
Document map
Document-length norms
Optional term positions
Bloom filter
Segment metadata
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A posting connects a term to the local documents containing it.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"database" → [doc 2, doc 8, doc 19]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Positions can record where the term appears inside each document.&lt;/p&gt;

&lt;p&gt;That enables more advanced query behaviour and phrase-aware features.&lt;/p&gt;

&lt;h2&gt;
  
  
  Global and local document IDs
&lt;/h2&gt;

&lt;p&gt;Each segment assigns compact local IDs to its documents.&lt;/p&gt;

&lt;p&gt;A separate document map translates them back to global document IDs.&lt;/p&gt;

&lt;p&gt;This keeps postings smaller while preserving the external identity of the record.&lt;/p&gt;

&lt;h2&gt;
  
  
  Bloom filters
&lt;/h2&gt;

&lt;p&gt;Each segment also maintains a Bloom filter for terms.&lt;/p&gt;

&lt;p&gt;Before reading a segment's postings, the query path can test whether the term might exist there.&lt;/p&gt;

&lt;p&gt;A negative answer is definitive.&lt;/p&gt;

&lt;p&gt;A positive answer means the segment may contain the term and should be checked.&lt;/p&gt;

&lt;h2&gt;
  
  
  Query modes
&lt;/h2&gt;

&lt;p&gt;The text query layer supports modes such as:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;AND
OR
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It also emits scored documents and metrics including:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Query time&lt;/li&gt;
&lt;li&gt;Postings read&lt;/li&gt;
&lt;li&gt;Candidate documents&lt;/li&gt;
&lt;li&gt;Segments searched&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Full-text search is essentially a specialized database living beside the document database.&lt;/p&gt;

&lt;p&gt;Its data structures, compaction behaviour, scoring, and caching needs are different enough that treating it as a plain secondary index would be a mistake.&lt;/p&gt;




&lt;p&gt;Built by &lt;a href="https://www.google.com/search?q=Swaraj+Puppalwar" rel="noopener noreferrer"&gt;Swaraj Puppalwar&lt;/a&gt; under &lt;a href="https://lioran.group" rel="noopener noreferrer"&gt;Lioran Group&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Learn more:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://liorandb.com" rel="noopener noreferrer"&gt;LioranDB&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://lioransolutions.com" rel="noopener noreferrer"&gt;Lioran Developer Solutions&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://lioran.group" rel="noopener noreferrer"&gt;Lioran Group&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>liorandb</category>
      <category>nosql</category>
      <category>database</category>
      <category>indian</category>
    </item>
    <item>
      <title>Why LioranDB Uses LSM-Based Secondary Indexes</title>
      <dc:creator>Swaraj Puppalwar</dc:creator>
      <pubDate>Fri, 24 Jul 2026 18:53:25 +0000</pubDate>
      <link>https://dev.to/ultrontheai/why-liorandb-uses-lsm-based-secondary-indexes-3ajl</link>
      <guid>https://dev.to/ultrontheai/why-liorandb-uses-lsm-based-secondary-indexes-3ajl</guid>
      <description>&lt;p&gt;A document database usually stores a primary record by document ID.&lt;/p&gt;

&lt;p&gt;But applications also ask questions such as:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Find users where status = "active"
Find invoices where customerId = 42
Find posts where category = "rust"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Those queries need secondary indexes.&lt;/p&gt;

&lt;p&gt;LioranDB implements secondary indexing through an LSM-style index store.&lt;/p&gt;

&lt;h2&gt;
  
  
  The mutation path
&lt;/h2&gt;

&lt;p&gt;When a document changes, the DBMS creates index mutations.&lt;/p&gt;

&lt;p&gt;These mutations are written to an index mutation log and then applied asynchronously.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Document write
    ↓
Index mutation log
    ↓
Pending mutation queue
    ↓
Index memtable
    ↓
Immutable table
    ↓
Segment file
    ↓
Compaction
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This separates the primary document write path from heavier index maintenance.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why LSM?
&lt;/h2&gt;

&lt;p&gt;An LSM design converts many random updates into sequential batches.&lt;/p&gt;

&lt;p&gt;Instead of repeatedly rewriting one large index structure, the engine creates immutable sorted segments.&lt;/p&gt;

&lt;p&gt;Reads search across those segments and newer in-memory data.&lt;/p&gt;

&lt;p&gt;Background compaction later merges segments.&lt;/p&gt;

&lt;h2&gt;
  
  
  Different workers for different workloads
&lt;/h2&gt;

&lt;p&gt;LioranDB defines separate worker groups for:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Secondary index application&lt;/li&gt;
&lt;li&gt;Text index application&lt;/li&gt;
&lt;li&gt;Index flushing&lt;/li&gt;
&lt;li&gt;Secondary compaction&lt;/li&gt;
&lt;li&gt;Text compaction&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This matters because secondary and text indexes have very different costs.&lt;/p&gt;

&lt;p&gt;A secondary mutation may be a compact key-to-document mapping.&lt;/p&gt;

&lt;p&gt;A text mutation may generate many terms and postings.&lt;/p&gt;

&lt;p&gt;Treating them as identical would make scheduling less predictable.&lt;/p&gt;

&lt;h2&gt;
  
  
  Lag and safety limits
&lt;/h2&gt;

&lt;p&gt;Asynchronous indexing introduces index lag.&lt;/p&gt;

&lt;p&gt;LioranDB tracks conditions such as:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Pending mutations
Mutation log bytes
Lag in LSNs
Lag in milliseconds
Segment counts
Compaction debt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Soft limits begin rescue work.&lt;/p&gt;

&lt;p&gt;Hard limits trigger stronger backpressure.&lt;/p&gt;

&lt;p&gt;This prevents the primary writer from outrunning the indexing pipeline forever.&lt;/p&gt;

&lt;p&gt;LSM indexes are not free speed.&lt;/p&gt;

&lt;p&gt;They exchange immediate random writes for background complexity, read amplification, compaction, and lag management.&lt;/p&gt;

&lt;p&gt;Used carefully, that trade is extremely powerful.&lt;/p&gt;

&lt;p&gt;Used carelessly, it creates a segment confetti cannon.&lt;/p&gt;




&lt;p&gt;LioranDB is built by &lt;a href="https://www.google.com/search?q=Swaraj+Puppalwar" rel="noopener noreferrer"&gt;Swaraj Puppalwar&lt;/a&gt; at &lt;a href="https://lioran.group" rel="noopener noreferrer"&gt;Lioran Group&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Links:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://liorandb.com" rel="noopener noreferrer"&gt;LioranDB&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://lioransolutions.com" rel="noopener noreferrer"&gt;Lioran Developer Solutions&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://lioran.group" rel="noopener noreferrer"&gt;Lioran Group&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>liorandb</category>
      <category>nosql</category>
      <category>database</category>
      <category>indian</category>
    </item>
    <item>
      <title>Transactions in LioranDB: Read Timestamps and Write Sets</title>
      <dc:creator>Swaraj Puppalwar</dc:creator>
      <pubDate>Fri, 24 Jul 2026 18:52:18 +0000</pubDate>
      <link>https://dev.to/ultrontheai/transactions-in-liorandb-read-timestamps-and-write-sets-5h6n</link>
      <guid>https://dev.to/ultrontheai/transactions-in-liorandb-read-timestamps-and-write-sets-5h6n</guid>
      <description>&lt;p&gt;A database transaction is not just a function containing several writes.&lt;/p&gt;

&lt;p&gt;It defines what data the operation can observe and how its changes become visible.&lt;/p&gt;

&lt;p&gt;LioranDB separates transactions into read and write transactions.&lt;/p&gt;

&lt;h2&gt;
  
  
  Read transactions
&lt;/h2&gt;

&lt;p&gt;A read transaction stores a read timestamp.&lt;/p&gt;

&lt;p&gt;Every lookup uses that timestamp:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight rust"&gt;&lt;code&gt;&lt;span class="nf"&gt;get_at&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;read_timestamp&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;table&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;key&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A scan follows the same idea.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight rust"&gt;&lt;code&gt;&lt;span class="nf"&gt;scan_at&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;read_timestamp&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;table&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;range&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The timestamp allows the engine to define which version of a value is visible to that transaction.&lt;/p&gt;

&lt;h2&gt;
  
  
  Write transactions
&lt;/h2&gt;

&lt;p&gt;A write transaction contains:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Transaction ID
Read timestamp
Write set
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The write set is a list of operations:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight rust"&gt;&lt;code&gt;&lt;span class="n"&gt;Put&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;table&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;key&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;value&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="n"&gt;Delete&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;table&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;key&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Calling &lt;code&gt;put()&lt;/code&gt; does not immediately modify every persistent structure.&lt;/p&gt;

&lt;p&gt;Instead, the transaction accumulates operations.&lt;/p&gt;

&lt;p&gt;On commit, the complete write set is passed to the engine.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why collect a write set?
&lt;/h2&gt;

&lt;p&gt;This design enables the engine to:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Validate conflicts&lt;/li&gt;
&lt;li&gt;Assign a commit timestamp&lt;/li&gt;
&lt;li&gt;Append one logical transaction to the WAL&lt;/li&gt;
&lt;li&gt;Apply several operations atomically&lt;/li&gt;
&lt;li&gt;Collect commit statistics&lt;/li&gt;
&lt;li&gt;Route operations before publishing them&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A transaction can therefore fail before partially exposing its updates.&lt;/p&gt;

&lt;h2&gt;
  
  
  Isolation modes
&lt;/h2&gt;

&lt;p&gt;The engine configuration currently exposes two isolation choices:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;SnapshotIsolation
ReadCommitted
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Snapshot isolation provides a stable logical view and write-write conflict detection.&lt;/p&gt;

&lt;p&gt;Read committed exposes the latest committed state according to the engine's disk-mode semantics.&lt;/p&gt;

&lt;p&gt;Isolation is not a checkbox that magically creates correctness.&lt;/p&gt;

&lt;p&gt;Every read path, write path, index update, WAL record, and recovery operation must agree on transaction visibility.&lt;/p&gt;

&lt;p&gt;The transaction structs in LioranDB look compact because most of the complexity lives underneath them.&lt;/p&gt;

&lt;p&gt;That is usually a good sign.&lt;/p&gt;

&lt;p&gt;A clean transaction API should hide the machinery, not leak the whole engine through every method signature.&lt;/p&gt;




&lt;p&gt;Created by &lt;a href="https://www.google.com/search?q=Swaraj+Puppalwar" rel="noopener noreferrer"&gt;Swaraj Puppalwar&lt;/a&gt; under &lt;a href="https://lioran.group" rel="noopener noreferrer"&gt;Lioran Group&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Read more:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://liorandb.com" rel="noopener noreferrer"&gt;LioranDB&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://lioransolutions.com" rel="noopener noreferrer"&gt;Lioran Developer Solutions&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://lioran.group" rel="noopener noreferrer"&gt;Lioran Group&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>liorandb</category>
      <category>database</category>
      <category>nosql</category>
      <category>indian</category>
    </item>
    <item>
      <title>How LioranDB Scales Across CPU Cores With Partitions</title>
      <dc:creator>Swaraj Puppalwar</dc:creator>
      <pubDate>Fri, 24 Jul 2026 18:51:17 +0000</pubDate>
      <link>https://dev.to/ultrontheai/how-liorandb-scales-across-cpu-cores-with-partitions-15gp</link>
      <guid>https://dev.to/ultrontheai/how-liorandb-scales-across-cpu-cores-with-partitions-15gp</guid>
      <description>&lt;p&gt;A single global database lock is an excellent way to turn a 24-core machine into a decorative heater.&lt;/p&gt;

&lt;p&gt;LioranDB uses partitions to scale work across CPU cores.&lt;/p&gt;

&lt;h2&gt;
  
  
  Independent engine partitions
&lt;/h2&gt;

&lt;p&gt;A partitioned LioranDB node runs multiple independent storage-engine instances.&lt;/p&gt;

&lt;p&gt;Each partition has its own:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;WAL&lt;/li&gt;
&lt;li&gt;Checkpoint pipeline&lt;/li&gt;
&lt;li&gt;Flush pipeline&lt;/li&gt;
&lt;li&gt;On-disk directory&lt;/li&gt;
&lt;li&gt;Memtables&lt;/li&gt;
&lt;li&gt;B+ tree state&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The directory layout resembles:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;data/
└── partitions/
    ├── 0000/
    ├── 0001/
    ├── 0002/
    └── 0003/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Routing keys
&lt;/h2&gt;

&lt;p&gt;Keys are assigned to partitions using a deterministic hash.&lt;/p&gt;

&lt;p&gt;Conceptually:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight rust"&gt;&lt;code&gt;&lt;span class="n"&gt;partition&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;hash&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;key&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="n"&gt;partition_count&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The same key always reaches the same partition.&lt;/p&gt;

&lt;p&gt;A write therefore touches only the engine responsible for that key instead of contending on one global structure.&lt;/p&gt;

&lt;h2&gt;
  
  
  Parallel startup
&lt;/h2&gt;

&lt;p&gt;Partitions are also opened in parallel.&lt;/p&gt;

&lt;p&gt;LioranDB tracks startup metrics such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Total wall-clock open time&lt;/li&gt;
&lt;li&gt;Sum of partition open times&lt;/li&gt;
&lt;li&gt;Maximum partition time&lt;/li&gt;
&lt;li&gt;P50 and P95 open time&lt;/li&gt;
&lt;li&gt;Files opened&lt;/li&gt;
&lt;li&gt;Bytes read&lt;/li&gt;
&lt;li&gt;Peak parallel partition workers&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This distinction is useful.&lt;/p&gt;

&lt;p&gt;If four partitions each take five seconds but open concurrently, the serial sum is twenty seconds while wall-clock startup is closer to five.&lt;/p&gt;

&lt;h2&gt;
  
  
  Scans are different
&lt;/h2&gt;

&lt;p&gt;Exact-key operations route to one partition.&lt;/p&gt;

&lt;p&gt;A full range scan may need to scan every partition and merge the results into sorted order.&lt;/p&gt;

&lt;p&gt;That means partitioning improves point-operation scalability but makes global ordered operations more complex.&lt;/p&gt;

&lt;p&gt;This is a standard distributed-systems tradeoff appearing inside a single machine.&lt;/p&gt;

&lt;h2&gt;
  
  
  From multi-core to multi-node
&lt;/h2&gt;

&lt;p&gt;The partition abstraction is also the foundation for future node-level distribution.&lt;/p&gt;

&lt;p&gt;A partition can eventually be:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Owned by one node
Replicated to followers
Moved to another node
Routed through a cluster client
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Partitioning is therefore more than a performance optimization.&lt;/p&gt;

&lt;p&gt;It is the seam where a single-node database begins evolving into a distributed one.&lt;/p&gt;




&lt;p&gt;LioranDB is developed by &lt;a href="https://www.google.com/search?q=Swaraj+Puppalwar" rel="noopener noreferrer"&gt;Swaraj Puppalwar&lt;/a&gt; at &lt;a href="https://lioran.group" rel="noopener noreferrer"&gt;Lioran Group&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Explore:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://liorandb.com" rel="noopener noreferrer"&gt;LioranDB&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://lioransolutions.com" rel="noopener noreferrer"&gt;Lioran Developer Solutions&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://lioran.group" rel="noopener noreferrer"&gt;Lioran Group&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>liorandb</category>
      <category>nosql</category>
      <category>database</category>
      <category>indian</category>
    </item>
    <item>
      <title>Memtables: The Fast Write Buffer Inside LioranDB</title>
      <dc:creator>Swaraj Puppalwar</dc:creator>
      <pubDate>Fri, 24 Jul 2026 18:49:44 +0000</pubDate>
      <link>https://dev.to/ultrontheai/memtables-the-fast-write-buffer-inside-liorandb-1732</link>
      <guid>https://dev.to/ultrontheai/memtables-the-fast-write-buffer-inside-liorandb-1732</guid>
      <description>&lt;p&gt;Disk structures are durable, but updating them for every write is expensive.&lt;/p&gt;

&lt;p&gt;LioranDB uses memtables to absorb writes before flushing them to the on-disk B+ tree.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is a memtable?
&lt;/h2&gt;

&lt;p&gt;A memtable is an ordered in-memory map.&lt;/p&gt;

&lt;p&gt;In LioranDB, each entry contains either:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight rust"&gt;&lt;code&gt;&lt;span class="nf"&gt;Value&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;bytes&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;or:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight rust"&gt;&lt;code&gt;&lt;span class="n"&gt;Tombstone&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A tombstone represents a deletion.&lt;/p&gt;

&lt;p&gt;The memtable also tracks:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Approximate memory usage&lt;/li&gt;
&lt;li&gt;Minimum LSN&lt;/li&gt;
&lt;li&gt;Maximum LSN&lt;/li&gt;
&lt;li&gt;Entry count&lt;/li&gt;
&lt;li&gt;Put count&lt;/li&gt;
&lt;li&gt;Delete count&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The write path
&lt;/h2&gt;

&lt;p&gt;A simplified write path looks like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Application write
    ↓
WAL durability
    ↓
Mutable memtable
    ↓
Immutable memtable queue
    ↓
Background flush
    ↓
Disk B+ tree
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The active mutable memtable accepts new writes.&lt;/p&gt;

&lt;p&gt;When it crosses a size limit, the engine rotates it into an immutable memtable.&lt;/p&gt;

&lt;p&gt;That immutable table is no longer modified and can safely be flushed in the background.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why ordered maps?
&lt;/h2&gt;

&lt;p&gt;LioranDB uses an ordered map for memtable entries.&lt;/p&gt;

&lt;p&gt;This helps because the flush process can emit keys in sorted order, which is friendly to the B+ tree and bulk-write paths.&lt;/p&gt;

&lt;p&gt;It also simplifies range merging between:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Mutable data&lt;/li&gt;
&lt;li&gt;Immutable data&lt;/li&gt;
&lt;li&gt;On-disk pages&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Backpressure
&lt;/h2&gt;

&lt;p&gt;Background flushing cannot be allowed to fall behind forever.&lt;/p&gt;

&lt;p&gt;LioranDB therefore tracks limits such as:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Maximum immutable memtables
Maximum immutable bytes
Partition-wide queue limits
Maximum writer stall duration
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If the disk cannot drain the backlog quickly enough, the foreground write path slows down.&lt;/p&gt;

&lt;p&gt;That may sound undesirable, but controlled backpressure is much safer than consuming memory until the process dies.&lt;/p&gt;

&lt;p&gt;A memtable is not merely a cache.&lt;/p&gt;

&lt;p&gt;It is a pressure valve between CPU-speed writes and disk-speed persistence.&lt;/p&gt;

&lt;p&gt;Without that valve, the engine would either become slow on every commit or dangerously accumulate unbounded work.&lt;/p&gt;




&lt;p&gt;Built by &lt;a href="https://www.google.com/search?q=Swaraj+Puppalwar" rel="noopener noreferrer"&gt;Swaraj Puppalwar&lt;/a&gt; under &lt;a href="https://lioran.group" rel="noopener noreferrer"&gt;Lioran Group&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Links:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://liorandb.com" rel="noopener noreferrer"&gt;LioranDB&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://lioransolutions.com" rel="noopener noreferrer"&gt;Lioran Developer Solutions&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://lioran.group" rel="noopener noreferrer"&gt;Lioran Group&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>liorandb</category>
      <category>indian</category>
      <category>database</category>
      <category>nosql</category>
    </item>
    <item>
      <title>How LioranDB Protects Writes With a WAL</title>
      <dc:creator>Swaraj Puppalwar</dc:creator>
      <pubDate>Fri, 24 Jul 2026 18:48:45 +0000</pubDate>
      <link>https://dev.to/ultrontheai/how-liorandb-protects-writes-with-a-wal-4jbp</link>
      <guid>https://dev.to/ultrontheai/how-liorandb-protects-writes-with-a-wal-4jbp</guid>
      <description>&lt;p&gt;When an application inserts a document, the database cannot immediately rewrite every affected disk page and wait for all of them to be flushed.&lt;/p&gt;

&lt;p&gt;That would be painfully slow.&lt;/p&gt;

&lt;p&gt;LioranDB therefore uses a Write-Ahead Log, commonly called a WAL.&lt;/p&gt;

&lt;h2&gt;
  
  
  The core rule
&lt;/h2&gt;

&lt;p&gt;Before a write is acknowledged as durable, its log record must be persisted.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Transaction
    ↓
Append changes to WAL
    ↓
fsync WAL
    ↓
Acknowledge commit
    ↓
Flush data pages later
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If the process crashes before the data pages are written, the WAL can replay the committed operation.&lt;/p&gt;

&lt;h2&gt;
  
  
  Group commit
&lt;/h2&gt;

&lt;p&gt;Calling &lt;code&gt;fsync&lt;/code&gt; for every individual transaction would destroy throughput.&lt;/p&gt;

&lt;p&gt;LioranDB groups multiple transactions into one durability batch.&lt;/p&gt;

&lt;p&gt;A batch can be triggered by:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Enough pending bytes&lt;/li&gt;
&lt;li&gt;Enough waiting transactions&lt;/li&gt;
&lt;li&gt;A timeout&lt;/li&gt;
&lt;li&gt;Strict durability mode&lt;/li&gt;
&lt;li&gt;Shutdown&lt;/li&gt;
&lt;li&gt;A follow-up durability generation&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Conceptually:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Txn A ─┐
Txn B ─┼─→ One WAL append and fsync
Txn C ─┘
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;All transactions in that durable range can then be released together.&lt;/p&gt;

&lt;h2&gt;
  
  
  Durability modes
&lt;/h2&gt;

&lt;p&gt;The engine supports multiple WAL profiles:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Strict
Balanced
HighThroughput
UnsafeBenchmark
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;Balanced&lt;/code&gt; is the default.&lt;/p&gt;

&lt;p&gt;It groups commits over a very small time window while still syncing before acknowledging them.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;UnsafeBenchmark&lt;/code&gt; can acknowledge data in the operating system cache without an fsync, but it exists for benchmarking, not production durability.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why LSNs matter
&lt;/h2&gt;

&lt;p&gt;Every WAL record has a Log Sequence Number, or LSN.&lt;/p&gt;

&lt;p&gt;The engine tracks values such as:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Next LSN
Durable LSN
Checkpoint LSN
Pending WAL bytes
Oldest waiter age
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;These values tell the engine which operations are durable, which pages are behind, and which log segments may eventually be reclaimed.&lt;/p&gt;

&lt;p&gt;A WAL turns disk latency from a wall into a queue.&lt;/p&gt;

&lt;p&gt;The hard part is not merely appending bytes. It is coordinating batching, fsync, checkpoints, waiters, backpressure, and crash recovery without lying to the caller about durability.&lt;/p&gt;

&lt;p&gt;That is where database engineering becomes properly spicy.&lt;/p&gt;




&lt;p&gt;LioranDB is created by &lt;a href="https://www.google.com/search?q=Swaraj+Puppalwar" rel="noopener noreferrer"&gt;Swaraj Puppalwar&lt;/a&gt; at &lt;a href="https://lioran.group" rel="noopener noreferrer"&gt;Lioran Group&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;More information:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://liorandb.com" rel="noopener noreferrer"&gt;LioranDB&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://lioransolutions.com" rel="noopener noreferrer"&gt;Lioran Developer Solutions&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://lioran.group" rel="noopener noreferrer"&gt;Lioran Group&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>liorandb</category>
      <category>nosql</category>
      <category>database</category>
      <category>indian</category>
    </item>
    <item>
      <title>Why LioranDB Uses a Disk B+ Tree</title>
      <dc:creator>Swaraj Puppalwar</dc:creator>
      <pubDate>Fri, 24 Jul 2026 18:47:23 +0000</pubDate>
      <link>https://dev.to/ultrontheai/why-liorandb-uses-a-disk-b-tree-46c4</link>
      <guid>https://dev.to/ultrontheai/why-liorandb-uses-a-disk-b-tree-46c4</guid>
      <description>&lt;p&gt;A database needs more than a data file.&lt;/p&gt;

&lt;p&gt;It needs a structure that can quickly locate a key without scanning every document.&lt;/p&gt;

&lt;p&gt;LioranDB uses a disk-based B+ tree for this job.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is a B+ tree?
&lt;/h2&gt;

&lt;p&gt;A B+ tree is a balanced search tree designed for storage systems.&lt;/p&gt;

&lt;p&gt;It contains two main page types:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Internal pages
    Store separator keys and child pointers

Leaf pages
    Store actual keys and values
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A simplified tree looks like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;                 [m]
               /     \
       [a ... l]       [m ... z]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Every lookup follows a path from the root to one leaf.&lt;/p&gt;

&lt;p&gt;Because every level can contain many keys, the tree remains shallow even when the database contains millions of records.&lt;/p&gt;

&lt;h2&gt;
  
  
  Pages, not objects
&lt;/h2&gt;

&lt;p&gt;LioranDB stores B+ tree nodes inside fixed-size disk pages.&lt;/p&gt;

&lt;p&gt;Each page contains metadata such as:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Page magic
Page version
Page type
Page ID
Page LSN
CRC32 checksum
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The checksum helps detect corrupted pages.&lt;/p&gt;

&lt;p&gt;The Page LSN records the latest WAL position reflected by that page, which is useful during recovery and checkpointing.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why not use a hash table?
&lt;/h2&gt;

&lt;p&gt;A hash table is excellent for exact-key lookups, but it does not naturally support ordered scans.&lt;/p&gt;

&lt;p&gt;A B+ tree can efficiently execute:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Find user 100
Find every user from 100 to 200
Find every key starting with "email:"
Walk records in sorted order
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is important because database indexes frequently rely on range and prefix scans.&lt;/p&gt;

&lt;h2&gt;
  
  
  Bulk loading
&lt;/h2&gt;

&lt;p&gt;LioranDB also contains a bulk-load path for building a new B+ tree from sorted input.&lt;/p&gt;

&lt;p&gt;Instead of repeatedly traversing and splitting pages, the engine can construct leaf and internal pages in batches.&lt;/p&gt;

&lt;p&gt;That can avoid:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Repeated root-to-leaf lookups&lt;/li&gt;
&lt;li&gt;Online page splits&lt;/li&gt;
&lt;li&gt;Extra page decoding&lt;/li&gt;
&lt;li&gt;Unnecessary cache pollution&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A B+ tree may sound old-school, but it remains one of the most practical foundations for a disk database.&lt;/p&gt;

&lt;p&gt;Good database architecture is often less about inventing a new tree and more about implementing an existing one without setting the disk on fire.&lt;/p&gt;




&lt;p&gt;Built by &lt;a href="https://www.google.com/search?q=Swaraj+Puppalwar" rel="noopener noreferrer"&gt;Swaraj Puppalwar&lt;/a&gt; at &lt;a href="https://lioran.group" rel="noopener noreferrer"&gt;Lioran Group&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Explore:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://liorandb.com" rel="noopener noreferrer"&gt;LioranDB&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://lioransolutions.com" rel="noopener noreferrer"&gt;Lioran Developer Solutions&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://lioran.group" rel="noopener noreferrer"&gt;Lioran Group&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>liorandb</category>
      <category>indian</category>
      <category>database</category>
      <category>nosql</category>
    </item>
  </channel>
</rss>
