<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Concurrency on Martin C. Richards</title>
    <link>//www.martinrichards.me/tags/concurrency/</link>
    <description>Recent content in Concurrency on Martin C. Richards</description>
    <generator>Hugo</generator>
    <language>en</language>
    <lastBuildDate>Sat, 17 Jan 2026 10:00:00 +0200</lastBuildDate>
    <atom:link href="//www.martinrichards.me/tags/concurrency/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Real-Time Ledger Systems: Optimistic Locking in a Double-Entry Ledger</title>
      <link>//www.martinrichards.me/post/ledger_p1_optimistic_locking_real_time_ledger/</link>
      <pubDate>Sat, 17 Jan 2026 10:00:00 +0200</pubDate>
      <guid>//www.martinrichards.me/post/ledger_p1_optimistic_locking_real_time_ledger/</guid>
      <description>&lt;h1 id=&#34;optimistic-locking-in-a-double-entry-ledger&#34;&gt;Optimistic Locking in a Double-Entry Ledger&lt;/h1&gt;&#xA;&lt;p&gt;Ledgers are a deceptively simple problem to tackle. At a certain scale, leveraging a simple &lt;code&gt;SELECT FOR UPDATE&lt;/code&gt; works perfectly well—wrap everything in a transaction, and move on.&lt;/p&gt;&#xA;&lt;p&gt;But the moment you need concurrent writes to the same accounts, hundreds of transactions per second, and real-time balance consistency—everything changes. Suddenly, pessimistic locking becomes your bottleneck. Every read blocks, every write queues, and your payment API starts timing out under load.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
