<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Event-Sourcing on Java &amp; Software Architecture Knowledge Hub</title><link>https://samirsahoo.github.io/design-patterns-hub/tags/event-sourcing/</link><description>Recent content in Event-Sourcing on Java &amp; Software Architecture Knowledge Hub</description><generator>Hugo</generator><language>en-US</language><copyright>© 2026 Samir Kumar Sahoo (https://github.com/samirsahoo). All rights reserved.</copyright><atom:link href="https://samirsahoo.github.io/design-patterns-hub/tags/event-sourcing/index.xml" rel="self" type="application/rss+xml"/><item><title>CQRS and Event Sourcing</title><link>https://samirsahoo.github.io/design-patterns-hub/microservices/data-consistency/cqrs-and-event-sourcing/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://samirsahoo.github.io/design-patterns-hub/microservices/data-consistency/cqrs-and-event-sourcing/</guid><description>&lt;h2 id="simple-definition"&gt;Simple definition&lt;a class="heading-anchor" href="#simple-definition" aria-label="Link to this section"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;strong&gt;CQRS (Command Query Responsibility Segregation)&lt;/strong&gt; uses &lt;strong&gt;different models for writing and reading&lt;/strong&gt;. Commands change state through a write model that enforces business rules; queries read from one or more read models shaped for the screens and APIs that use them.&lt;/li&gt;&#10;&lt;li&gt;&lt;strong&gt;Event sourcing&lt;/strong&gt; stores an entity&amp;rsquo;s state as the &lt;strong&gt;sequence of events&lt;/strong&gt; that happened to it (&lt;code&gt;OrderPlaced&lt;/code&gt;, &lt;code&gt;ItemAdded&lt;/code&gt;, &lt;code&gt;OrderShipped&lt;/code&gt;) instead of its current values. Current state is derived by replaying the events.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;They are independent patterns that combine naturally: event sourcing produces a stream of events, and CQRS projections consume it to build read models.&lt;/p&gt;</description></item><item><title>Stream Processing: Logs, Change Data Capture, Event Sourcing and Windows</title><link>https://samirsahoo.github.io/design-patterns-hub/data-systems/stream-processing/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://samirsahoo.github.io/design-patterns-hub/data-systems/stream-processing/</guid><description>&lt;h2 id="simple-definition"&gt;Simple definition&lt;a class="heading-anchor" href="#simple-definition" aria-label="Link to this section"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;p&gt;Batch processing assumes the input is &lt;strong&gt;bounded&lt;/strong&gt;: a known, finite size, so a job can finish. Real data is &lt;strong&gt;unbounded&lt;/strong&gt;: users keep clicking, sensors keep measuring, orders keep arriving. Running batch jobs every day means results are a day late. &lt;strong&gt;Stream processing&lt;/strong&gt; handles each event shortly after it happens.&lt;/p&gt;</description></item><item><title>Designing a Stock Exchange</title><link>https://samirsahoo.github.io/design-patterns-hub/system-design/case-studies/stock-exchange/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://samirsahoo.github.io/design-patterns-hub/system-design/case-studies/stock-exchange/</guid><description>&lt;h2 id="overview"&gt;Overview&lt;a class="heading-anchor" href="#overview" aria-label="Link to this section"&gt;#&lt;/a&gt;&lt;/h2&gt;&#10;&lt;p&gt;An exchange matches buy and sell orders for securities. Its requirements are unlike a typical web system: &lt;strong&gt;latency is measured in microseconds&lt;/strong&gt;, &lt;strong&gt;fairness&lt;/strong&gt; demands a strict, deterministic order of events, and &lt;strong&gt;correctness&lt;/strong&gt; cannot be compromised. ByteByteGo describes how a modern exchange achieves microsecond latency by keeping the &lt;strong&gt;critical path&lt;/strong&gt; short and doing everything on it in memory. Follows the &lt;a href="https://samirsahoo.github.io/design-patterns-hub/system-design/introduction/"&gt;18-step framework&lt;/a&gt;.&lt;/p&gt;</description></item></channel></rss>