Condividi tramite


Microservices == Microdatabases

I've been playing in the microservices conversation for quite a while now, and just wanted to callout a really nice codebase/walkthrough at https://github.com/dotnet-architecture/eShopOnContainers

While we're on the topic, the first question I often hear is "what is a microservice?" or "what is the difference between a microservice and SOA?" Seeing as how microservices doesn't even have an actual definition, it's more than a fair question.  If someone is familiar with SOA, then my favorite place to begin discussions is with this image, and to point out something that most folks don't immediately apprehend.

It is very common (and usually required) to split and duplicate data across the data stores for each microservice.

This blew my mind when I first considered it, but it makes perfect sense, and is a completely reasonable (and appropriate!) thing to do.  In the image below, we'll want to service/release/version/enhance each of the microservices independently.  Let's take Ordering for example. If we don't store enough Identity information in the Ordering service to allow for folks to create orders while the Identity service is being rev'd, we've still got a horizontal dependency that makes those 2 services monolithic in practice.

Microservices == Microdatabases + duplication :)