Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

what is the difference between event driven and domain driven design Microservices?

What is event driven design and Domain driven design?
What are the specific benefits using of Domain driven design, event driven design in MicroServices.

like image 370
G SriHAri Avatar asked Jan 10 '20 05:01

G SriHAri


People also ask

What is event-driven in microservices?

An event-driven architecture uses events to trigger and communicate between decoupled services and is common in modern applications built with microservices. An event is a change in state, or an update, like an item being placed in a shopping cart on an e-commerce website.

Is microservices a domain-driven design?

Domain-Driven Design Microservices Approach Microservices are small functions that solve a particular business problem. Decomposing your monolithic applications into microservices requires you to define these business functions into domains of expertise called Domain-Driven Design (DDD).

Is DDD same as microservices?

DDD provides an avenue to facilitate the development of highly cohesive systems through bounded contexts. Microservices is an implementation approach that encourages you to focus your service boundaries on the business domain boundaries.

What is the difference between event sourcing and event-driven?

To be clear, Event Sourcing is about using events to represent state. In Event Driven Architecture, events are used to communicate with other service boundaries.


1 Answers

Event sourcing as an implementation strategy for the persistence of state, e.g. of aggregates. This strategy should not be exposed beyond the boundaries of aggregates. The events from event sourcing should therefore only be used internally in the corresponding aggregate or in the context of CQRS to build related read models.

Domain events, on the other hand, represent a specific fact or happening that is relevant regardless of the type of persistence strategy for aggregates, for example, for integrating bounded contexts.

Event sourcing and domain events can of course be used both at the same time, but should not influence each other. The two concepts are used for different purposes and should therefore not be mixed.

Please, read from the link below to learn more: check here

like image 193
Mayank Tripathi Avatar answered Sep 19 '22 05:09

Mayank Tripathi