Breaking

Monday, May 24, 2021

What is Event Driven Architecture || event driven architecture big data

 

What is Event Driven Architecture?

what is event driven architecture

Introduction 

In this article we will be talking about event-driven talk about architecture whenever we talk about micro services we know that they involved a number of micro services talking to each other you have  a number of common components you would have a number of common infrastructure related components like Naming services API gateways centralized logging and a lot of stuff like that and whenever you are going for a micro services kind of architecture even driven architectures  are preferred you want to make your processes as event-driven  as possible in this article we’d be talking about what is event-driven architecture and what are the advantages of even driven architectures let’s take  a simple use case I have an order  whenever there is an order.


 I would want to update this talk I would want to send an  email and SMS and I would want to start initiating the packaging and delivery requests what are the ways you implement.
 it is by implementing a very simple component which does all these together the second approach which is typically how we do things in a microservices architecture is you would create an order you end and  put it in the queue.
and there would be individual services which will be listening on the order event and doing the appropriate things so the stock service would take care of updating this talk the email service would take care of sending an email

 SMS service would take care of sending an SMS and packaging services would take care of sending the packaging and the delivery request so we have two kinds of architectures our teacher one which is like one component doing everything our teacher to where you have even created  and individual components would handle  this specific event now how do you make the choice one to go for so if you are in a very simple organization with a few thousand requests not a huge load not huge scalability requirements and in those  kind of architectures you can stick with the approach one which is to create single component which does everything 


however when you have huge amount of scalability requirements you are sending millions of emails in that kind of a situation the event driven architecture might be the best one to  go for now why am I saying that let’s look at that right now one of the most important thing that you would want in an architecture is it to give you a lot of flexibility right.
 so you’d want maintainability you’d want to be able to easily maintain stuff and you would be able to easily maintain stuff when you have separation of concerns and in this specific architecture you have a lot of  separation of concerns right  so you have an order service which is responsible for just talking an order and putting it in the queue it does it does not worry about  how somebody is going to process the order what are the next steps that involved in processing and order.

 the  advantage is whenever you’d want to do an additional step when an order is received all that you need to do is have a new service listening on to the queue and reacting to that specific event so this is easily extensible and also easily maintainable because each of these services have individual responsibilities



 so you know exactly what a package service does SMI service always responsible for sending SMSs out whether the event is from an order service or whether it’s an update order request or any other requests it knows what  kind of events it needs to listen to you and what kind of SMS is that it needs to send out so this is specific and tailored  for that  SMS service so you have individual components with specific responsibilities which is really easy to maintain so that’s number one flexibility and maintainability the second reason why you want to go for this kind of an architecture when you have huge load is scalability so when you have these kind of architectures. 

1 comment:

Post Top Ad

Pages