Hacker News new | ask | show | jobs
by super_mario 2058 days ago
Absolutely agree with you. But with advent of microservices architecture patterns, it is possible to keep service code within bounds of maintainable size.
3 comments

I'm by no means an expert architect yet, but has the argument for microservices in smaller orgs basically become:

"Since y'all can't seem to use classes and interfaces correctly, let's physically separate the software so changing the service contracts becomes a bigger pain in the ass"?

I'm not even trying to be sarcastic. I'm genuinely curious. I feel like 90% of the benefits of microservices would be accomplished with discipline and good code review, but those things of course are more easily said than done.

(I understand your Facebooks and Netflixes benefit from having completely separate teams responsible for services with more autonomy, but I'm talking about small to midsize orgs that seem to have adopted microservices.)

Microservices are different from language abstractions (classes, etc.) In two important ways:

1. More decoupling means you can use an entirely different langauge

2. Services can be deployed, restarted, etc. independently.

But that comes with disadvantages. The contract then becomes message passing and serialization/deserialization, which is fairly primitive. You can't pass functions/callbacks, and simple static checks become a whole validation problem. It also limits your ability to use interesting types across services.

The XML craze 20 years ago tried to tackle all of these problems (remember XML schemas?), but it became unweildly and didn't really succeed despite a huge enterprise push.

In a mid-size shop is another language an advantage?
It certainly can be. Sometimes you start in one language but then need to integrate with something else that really only works well with a different language.
The more I do this, the more I come to believe that boundaries, no matter how you do them, are the million dollar question.
Or it's the other way round.

In certain languages, developers may find it difficult to maintain code quality and good design in a codebase of a certain size. So they find other ways of achieving good design by introducing service boundaries.