Hacker News new | ask | show | jobs
by lmm 3479 days ago
> Now the argument is always "well if you and your team were just better coders and more disciplined that wouldn't happen" but in the real world it is shown to be incredibly difficult to actually have a team that is that disciplined and microservices give a real hard barrier to enforce that discipline.

I agree that you need enforcement. But by having a multi-module project in a good build system you can enforce decoupling at build time, without the overhead of a network bourdary.

1 comments

Very true, but decoupling is only 1 of the benefits of microservice. Polygot environments, scalability, etc also come with microservices vs modules.

As with everything its about the right tool for the job and a lot of organizations are more than happy to trade network overhead for the other bullet points microservices offer.

Polyglot I've concluded is more trouble than it's worth - you always end up wanting to reuse code between modules, so a good general-purpose language for everything is much better than multiple languages. Scaling is a nice problem to have - it makes sense to split out services when you need to do so to scale, but it's not worth the overhead until you need it (particularly if you have enforced decoupling already, because that ensures that you will be able to cleanly factor out services when the time comes).

The more experience I get the more I think "right tool for the job" is bad advice. It makes it sound like tool choice is always 50-50, whereas actually in a lot of cases it's more like 95-5. I've worked at a number of organizations using various architectures, but the one that was most gung-ho for microservices was by far the least successful, I think as a direct result of their approach to microservices.