by simplotek · 3y ago · 0 comments
This is simply not true. Microservices are a solution primarily to an organizational problem and secondarily to the problem of allocating and managing computational resources. The organizational problem is solved by the hard boundaries and loose coupling imposed by operating and consuming independent services. Allowing a team to own and operate their services allows them to have more control over all aspects of a their life cycle, reducing the scope of other stakeholders to what contract their interfaces need to comply with.
Those who naively shit on microservices seem to be totally oblivious to what it would be like if all we had were monoliths. We tried that already. It's awful, and we learned from that mistake. Well, some of us did.
"A" solution does not mean the only solution or the best solution. They're often treated as the only solution though.
They are often, and by far, the best solution though, specially taking into account the tradeoffs of whatever alternative you come up with.
Specially massive monoliths in a monorepo.
It makes no sense to mindlessly crap on operating services, specially when compared with alternatives. I get that some people feel the need to vent their personal frustrations, but this does not mean they have a point.
Are you trying to solve a problem with code organization? I've heard of folders, they do a pretty good job. Most of the time though, microservices tend to get in the way of delivering VALUE to the company I work for ... because someone thinks 'this is the way.' I was hired to deliver VALUE, not beautiful code, not code that follows this year's 'best practices' that aren't, or even bad code.
I will always write easy, simple, and clear code that delivers VALUE. Microservices usually get in the way of doing that, for basically arbitrary reasons.
As I've already said in this thread, microservices solve primarily organizational problems. They define concrete organizational barriers and limit discussions with stakeholders on issues pertaining to service contracts, and ensure that service owners have complete freedom, responsibility, and clear accountability, on all aspects of their design, maintenance, and operation.
Scalability is a welcomed benefit but lower in importance, below reliability and perceived performance.
Any other discussion on microservices boil down to strawmen.
Having it all together is perfect for code re-use and testability.
It's also very easy to know if you broke the bigger picture while working on a subsystem of the monolith because the test-suite will tell you.
In my humble opinion, monoliths are unpopular because not much thought went into the original design of the code and as a consequence there are large chunks of technical debt interfering with everybody's work. It certainly doesn't help that many popular frameworks don't give you the design architecture to grow big apps.
But the good news is that if you don't split your teams, you also have more engineers on hand to refactor the codebase to be more manageable.
They are not better than modules. The problem is that dynamically typed languages can't support proper modules, so microservices are their only alternative (so far).
They are. You don't control your runtime environment with modules, nor your deployment. You create problems due to the need to manage releases and deployments. You can break everyone's work if you make a mistake, which worsens the problem. You are unable to pick and choose what technologies you use. Etc etc etc.
With a service, you just tell everyone where it is and what's the interface, and leave it to everyone else to work around that.