<story><title>Event Sourcing (2005)</title><url>https://martinfowler.com/eaaDev/EventSourcing.html</url></story><parent_chain></parent_chain><comment><author>criticaltinker</author><text>&lt;i&gt;&amp;gt; Reversal is the most straightforward when the event is cast in the form of a difference. An example of this would be &amp;quot;add $10 to Martin&amp;#x27;s account&amp;quot; as opposed to &amp;quot;set Martin&amp;#x27;s account to $110&amp;quot;. In the former case I can reverse by just subtracting $10, but in the latter case I don&amp;#x27;t have enough information to recreate the past value of the account.&lt;/i&gt;&lt;p&gt;I&amp;#x27;ve used the event sourcing pattern with great success in the context of an exceptionally complex web application for my day job. The front-end would create an &amp;#x27;event&amp;#x27; for every action the user took. This allowed us to seamlessly implement client-side undo&amp;#x2F;redo functionality with surprisingly little effort, a market leading feature our users really appreciated.&lt;p&gt;One key insight we had was the necessity of capturing the state change as a &lt;i&gt;difference&lt;/i&gt;, as Martin explains. This turned out to be tremendously powerful. We were able to build a variety of other features on top including detailed analytics of how users were using our app, and session replay for training and debugging, among other things.</text></comment>
<story><title>Event Sourcing (2005)</title><url>https://martinfowler.com/eaaDev/EventSourcing.html</url></story><parent_chain></parent_chain><comment><author>swyx</author><text>We debated the precise meaning of Event Sourcing when I was writing my Temporal.io explainer (&lt;a href=&quot;https:&amp;#x2F;&amp;#x2F;www.swyx.io&amp;#x2F;why-temporal&amp;#x2F;&quot; rel=&quot;nofollow&quot;&gt;https:&amp;#x2F;&amp;#x2F;www.swyx.io&amp;#x2F;why-temporal&amp;#x2F;&lt;/a&gt;)&lt;p&gt;Basically the source of the debate - to do &amp;quot;proper&amp;quot; event sourcing, do you need to rerun the computations each time you roll back&amp;#x2F;forward, or is it enough to simply restore state?</text></comment>