-
- Event Notification
Address change in CRM can be sent to Quoting System through the event. e.g. address changed.
– Reverse the dependency from CRM to Quote system.
– Message becomes a thing(object) to record and pass around.
– events vs commands
– pub/sub is nice as subscribers can sub independently.Cons: How to know what’s happening after the publishing event. - Event-carried State Transfer
– Downstream system stores necessary data copied from the upstream system. – This helps the event receiver doesn’t request detail of the event for action.Cons: replicated data -> eventual consistency. - Event Sourcing
– Rebuild state from the event log.
– Often comes with a snapshot.
– e.g. Source Control System.
– e.g. Bank account history.Pros:
– Audit
– Debugging
– Historic State
– Alternative State<
– Memory Image: Have state in memory rather than RDB.Cons:
– Unfamiliar, External Systems may not provide historic state, Event Schema, Event Identifiers.
– Complexity: Asynchrony, Versioning. - CQRS
Separate model/logic for the update process from the reading process.
- Event Notification
Reference: GOTO 2017 • The Many Meanings of Event-Driven Architecture • Martin Fowler