Before, We jump into the EDA, let's understand the standard guidelines for system design or generally reactive manifesto. Which is something is community driven guidelines that are indented to give cohesive approach to system.
So, the core of the reactive manifesto is make system message driven, more specifically "async" messaging.
Based on the above three foundations, we should be able to build a system that is responsive.
Now, we have our core setup let's understand What is an event ?. In simple words, an event is a statement of facts that happened in the past. Let's talk about an example of a Retail application.
So, In an application, we have a checkout service and that service wants to talks to other services such as "Inventory", "Shipping", "Contact".
In the messaging model, if the inventory wants to know what the checkout is doing, the checkout will send a message directly to inventory to let it know a checkout happens. and to others as well directly to Shipping and to Contact service OR these services can message directly to checkout as well "Conversational Messaging", till now the message is sitting on a host machine.
When we design the event application our event producer might web app, mobile app, etc.. this will enable the events logs being produced by all the producing applications.
Event logs can be used to Trigger an action In the case of IoT when any device turns on, It spins a pod on the Infra and that pod is a function as a Service (FaaS) that sits on top of Serverless Infrastructure and turns down when our function finishes by sending the event.
With event logs we can optimize and custom data persistence, so can be possible that our Inventory service will consume data from stream send by web application m it will modify the local data and produce in the event backbone and this new stream is giving the most correct inventory data to any other application in the system.
Important things which happen here is we can save all our data raw or transformed in a Data Lake, this will help heavy application like AI.
Another thing that EDA enables is stream processing which is built on top of the Apache Kafka streams API.
Benefits of Event/Driven Architecture
- Asynchronous
- Scalable and Failure Independent
- Auditing and Point-in-time recovery
Till now we have seen an overview and benefits of EDA that sit on top of reactive manifesto ideas for system designing.
In the next post, we will learn more about this in detail with some demo examples, Until then
Happy coding and keep sharing!!