I read the Reactive Manifesto .
But I could not understand the core differences between event driven architectures
and message driven architectures
. And as a result, I also could not understand the exact reason behind why the reactive manifesto
prefers Message Driven systems
instead of the Event Driven
one.
I also had a look at this interview, where Martin Thompson
discusses the reactive manifesto.
But still, I could not clearly distinguish between these two architectures, their advantages and use cases.
Events are messages As discussed above, in Message Driven systems, each component send items to a fixed recipient. In Event Driven systems, on the other hand, each component produces items of data with a fixed sender and shares them with any consumer.
The difference between events and messages is that events are used for intra-stack communication, whereas messages are used for inter-stack communication.
Reactive architecture is an architecture approach aims to use asynchronous messaging or event driven architecture to build Responsive, Resilient and Elastic systems.
In request-response architecture, an application's components communicate via API calls. The client sends a request and expects a response before performing the next task. In event-driven architecture, the client generates an event and can immediately move on to its next task.
Without sharing the view, I try to explain the claim:
An event implies a certain semantic, while a message is more about syntax. Thus a message may contain an event, but also something else (e.g., an error statement).
By focusing on the mechanism message, a better decoupling can be gained, since the semantic can be re-interpreted.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With