user9124444
user9124444

Reputation:

Relation of Microservices and DDD CQRS and ES

For the last couple of weeks I've been starting and trying to understand DDD CQRS, ES and Microservices. I think I've understood them individually but not as a single unit so this is why I have some misunderstandings that I hope to clarify.

So first what is the relation between Microservices and DDD, can you do one without the other? And secondly, does Bounded Contexts translate in the end into a microservice ?

Upvotes: 1

Views: 1530

Answers (4)

user14033345
user14033345

Reputation:

There is no relation between them. You can do microservices without ddd, cqrs or es. They server different purposes and while a microservice architecture focuses around high availability, scalability and other concerns more focused around the actual business needs, DDD focuses on coding style. CQRS falls under the same umbrella of concerns as microservices do.

Upvotes: 0

techagrammer
techagrammer

Reputation: 1306

I think microservices and DDD have different origin but we need both. See how:

DDD says how to break and design your software around the business domain

Microservices says break and design your business domain in smaller sort of independent services to scale

Now if you look closely both talk about break and design your software into smaller pieces, microservices in term of services(for scaling) and DDD in terms of Bounded Context(for design).

Also microservices need consistency which can be eventual only and DDD tactical strategy helps in designing eventual consistent system

To solve a big business problem we need both DDD and Microservices, and need to find a good cor-relation between them.

From my perspective no microservice can span a bounded context , also one bounded context may have multiple micorservice .And the dependecny between microservices is majorly governed by mapping between bounded context

Upvotes: 0

plainionist
plainionist

Reputation: 3563

Eventhough I agree with the answer from @rad Microsoft recently published an ebook about microservices and asp.net core in which they combine microservices and DDD successfully.

See https://www.microsoft.com/net/download/thank-you/microservices-architecture-ebook

Upvotes: 0

rad
rad

Reputation: 1937

No relationship between Microservices and DDD... And yes you can definitely do one without the other. Bounded context is domain level and microservice it's an implementation/infrastructure/architecture whatsoever, they can be related if you want to...

Domain Driven Design is a set of tactical and strategical design principles introduced by Eric Evans in 2003... to tackle complexity in software

Microservices is an architecture for designing an app as suites of independently deployable services

CQRS and Event Sourcing are a way to implement a Domain Driven Design (could be seen as building block in DDD), but they could be used outside DDD like the other building blocks.

Upvotes: 5

Related Questions