4 ms·
Microservices provide an abstraction. That is kind of the point. If you feel like the data yours service operates on would be better off stored in a redis datab
by MadWombat 7y ago
Microservices provide an abstraction. That is kind of the point. If you feel like the data yours service operates on would be better off stored in a redis database instead of an RDBMS, you can rewrite your persistence layer, test and roll out the new version of the service. As long as your APIs do not change, nobody cares how you produce responses to requests. In a monolith, this would be a nightmare. You don't have a single persistence layer to change, you have to go through every module, find all the places where this specific table or tables are being accessed and change retrieval and storage functionality everywhere.
- geggam 7y agoSeems to me you are talking about a database access layer instead of microservices. My understanding of microservices is a bunch of loosely connected services that can be changed with minimal impact to the others Problem with the ideal is in reality this never works as complexity grows the spaghetti code moves to spaghetti infrastructure ( Done a network map of a large k8s / istio deployment lately ? )
- hopia 7y agoThe impact would be minimal only if the API of the microservice didn't change. But in the same codebase too, if you have a module whose API doesn't change the changes from refactoring it would likewise be minimal.
- wtetzner 7y ago> Microservices provide an abstraction. So do modules/classes/interfaces etc. You don't need a layer of HTTP in between components to have abstraction. In addition, it feels like microservices solve a problem that very few people really have. I've never run into a case where I though "boy, I'd sure like to have a different database for this one chunk of code". If that did happen, then sure, split it out, but I can hardly believe that splitting your entire code base into microservices has a net benefit. The real problem in nearly every project I've worked on is complexity of business logic. A monolith is much easier to refactor, and you can change the entire architecture if you need to without having to coordinate releases of many different applications.