Please enable JavaScript.
Coggle requires JavaScript to display documents.
Session 3 - Event Driven (Advantages/Disadvantages (Great autonomy of the…
Session 3 - Event Driven
Broker
-
Components
Broker
-
-
Event channels can be message queues, message topics or a combination
-
Challenges
-
Coordination
If there is something that needs to happen when a process is done, we need to wait until the end.
-
-
Mediator
-
Components
-
Mediator
Receives the event and orchestrates the event by sending additional asynchronous events to event channels
-
-
Challenges
-
Unified notification
It is easy, cause we know when the changes are done
-
Evolution
-
When we need to add a new process, we have to change the entire mediator
There will be a team responsible with the mediator, which can become a bottleneck.
CQRS
-
Components
Command
-
-
Anemic models, only contain data.
Change the state of an object (entity), also known as modifiers or mutators.
Query
-
-
Only return the state of an entity, without changing it's state.
Command Handlers
-
Can Take care of additional operations: authorization, logging, reporting.
-
Considerations
Eventual consistency
If there is no other update to the data, eventually all accesses will return the last updated value
It's a type of weak consistency: the system does not guarantee that subsequent accesses will return the updated value
-
Definition
-
-
-
Made of highly-decoupled, single-purpose event processing components
-
Advantages/Disadvantages
-
Great responsiveness, because of the asynchronous property
-
-
-
-
Possible loss of events, messages, state