by JAlexoid · 3y ago · 0 comments
This substitution is what is commonly known as a Strawman argument. You misrepresented an argument, to discredit it easier.
Eventually everyone provides a service to someone, I guess, but there is a clear division between those who serve end users and those who serve the servers. The service that places your food down on the table at the restaurant is not thought of in the same was as those who get to the food to the restaurant. The latter camp is often known as a supplier, but we in tech call them a microservice instead. There is no suggestion that all services are microservices.
Right now I work in an environment, where user account information is copied to every single microservice's internal DB... to minimize access time to that information...
Restaurant provides you with a service - one single interface.
Imagine if a restaurant used a microservice architecture? You'd be spending your time going from the fridge to the cooks, moving your food from one to another(because no cook will do the whole recipe), then going to the dish storage, having a separate cook arrange your food on your plate, etc.
In terms of access time, what does that gain you over a bog standard shared database? With careful planning, you can likely achieve the lowest access times using a shared database. There is so much more room for optimization at every level.
The reason actual microservices (teams only communicating via API contracts) must carry out this practice of duplicating data is because a shared database requires non-API communication for various things, like enabling schema changes. If you can call up someone on another team to talk about how to upgrade the database and reach a shared understanding, what do you need API-only communication for?
Did your organization become confused about why they are doing that and then invented a performance argument to justify it?
The architecture of my organization was created by ardent microservice advocates, that took the definition of a microservice and treated it like a bible. Based on the conversations I had here, there are still people that treat microservices as sacrosanct.
The more I work with microservices, the more I'm convinced that microservice first architecture is garbage.
The copying of the data is the solution to data access latency.