They can also be useful for handling SaaS subscriptions. You can use events to audit or debug state changes in your system. That’s it, your job and reputation is saved! Other use-cases If your site uses event sourcing, you can revert the account balances to their previous uncorrupted state, fix the exchange rate and replay all the events until now. With event sourcing, there’s no need to panic! In this case, every account which sent and received money in a last seven days are in a corrupt state.
Imagine that you just started working on a beautiful Monday morning when it suddenly turns out that you made a mistake and used a wrong currency exchange for the whole past week. In our hypothetical example, you are working on an online money transfer site, where every customer has an account balance. The current state is your latest source code, and events are your commits. Good examples for Event Sourcing are version control systems that stores current state as diffs. This current state may only exist in memory. The State of your application is like a user’s account balance or subscription at a particular time. It’s achieved in a way that every state change gets stored as a sequence of events.
NODE SPYPARTY REAL LIFE SOFTWARE
NODE SPYPARTY REAL LIFE HOW TO
How to Debug Node.js with the Best Tools Available.The Definitive Guide for Monitoring Node.js Applications.Node.js End-to-End Testing with Nightwatch.js.CQRS (Command Query Responsibility Segregation) Explained.
Understanding the Module System, CommonJS and require.Node.js at Scale is a collection of articles focusing on the needs of companies with bigger Node.js installations and advanced Node developers. We’ll also take a look at some Event sourcing examples with code snippets.
Event Sourcing is a powerful architectural pattern to handle complex application states that may need to be rebuilt, re-played, audited or debugged.įrom this article you can learn what Event Sourcing is, and when should you use it.