<?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: yash</title>
    <description>The latest articles on DEV Community by yash (@yashvardhanreddy_pamiredd).</description>
    <link>https://dev.to/yashvardhanreddy_pamiredd</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%2F4114597%2F50370562-2b9d-4ac9-a03e-45a4fcbbc990.png</url>
      <title>DEV Community: yash</title>
      <link>https://dev.to/yashvardhanreddy_pamiredd</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/yashvardhanreddy_pamiredd"/>
    <language>en</language>
    <item>
      <title>Building an Append-Only Storage Engine from Scratch in TypeScript</title>
      <dc:creator>yash</dc:creator>
      <pubDate>Mon, 07 Sep 2026 21:09:59 +0000</pubDate>
      <link>https://dev.to/yashvardhanreddy_pamiredd/building-an-append-only-storage-engine-from-scratch-in-typescript-1ip8</link>
      <guid>https://dev.to/yashvardhanreddy_pamiredd/building-an-append-only-storage-engine-from-scratch-in-typescript-1ip8</guid>
      <description>&lt;h1&gt;
  
  
  CargoDB ⚡
&lt;/h1&gt;

&lt;p&gt;A lightweight, append-only key-value storage engine and binary blob store built with in-memory offset indexing, isolated bucket partitioning, and automated zero-downtime log compaction.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;GitHub Repository:&lt;/strong&gt; &lt;a href="https://github.com/yash-pamireddy/cargo-engine" rel="noopener noreferrer"&gt;https://github.com/yash-pamireddy/cargo-engine&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  The Core Concept
&lt;/h3&gt;

&lt;p&gt;Most applications default to running heavy database daemons or splitting workloads across multiple cloud vendors—using an external database for JSON records and S3 for media uploads. &lt;/p&gt;

&lt;p&gt;CargoDB explores a minimal, high-throughput alternative inspired by log-structured architectures like &lt;strong&gt;Bitcask&lt;/strong&gt;:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Sequential Disk Writes:&lt;/strong&gt; Incoming writes and deletions are strictly appended to the end of the log file. This eliminates random disk write overhead and fragmentation.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;O(1) In-Memory Index:&lt;/strong&gt; Keys are mapped to byte offsets and record lengths directly in RAM, allowing reads to jump straight to the exact position on disk with a single seek.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Zero-Downtime Compaction:&lt;/strong&gt; Overwrites and tombstoned deletions are cleaned up during background compaction passes without taking the engine offline.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Unified Blobs &amp;amp; Records:&lt;/strong&gt; Store raw media (images, PDFs, archives) alongside structured JSON payloads inside isolated tenant buckets.&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  Architecture Flow
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
text
               [ Put / Set / Upload / Delete ]
                              │
                              ▼
                 ┌─────────────────────────┐
                 │  Append-Only Disk Log   │ ──&amp;gt; Fast sequential writes
                 └─────────────────────────┘
                              │
                              ▼
                 ┌─────────────────────────┐
                 │ In-Memory Offset Table  │ ──&amp;gt; Maps Key ➔ { offset, length, mime }
                 └─────────────────────────┘
                              │
                              ▼
                      [ Reads: O(1) Seek ]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

</description>
      <category>typescript</category>
      <category>node</category>
      <category>database</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
