Java Magazine, Jan/Feb 2018
Order_ 123 Order ORACLE COM JAVAMAGAZINE JANUARY FEBRUARY 2018 72 beyond CRUD Event sourcing alone doesnt imply that the application has to be implemented using an event driven or CQRS approach However in order to apply CQRS you need to model applications with event sourcing Event Driven Applications In contrast to the benefits of an event sourced system the motivations behind event driven applications difer If you want to model distributed systems such as microservices that aim to maintain a consistent state throughout several systems you need to take transactions into account Because distributed transactions dont scale well you split up a transaction into several transactions that still maintain consistency at least in an eventually consistent way An event driven architecture see Figure 2 realizes use cases that involve multiple systems by collaborating via commands and events For ordering a cup of cofee at a café for example you would first attempt to place an order which results in an OrderPlaced event or an error Co ee order system Bean storage system Figure 2 Example event driven architecture validateOrder OrderAccepted placeOrder OrderPlaced completeOrder OrderCompleted
You must have JavaScript enabled to view digital editions.