(no title)
jamalaramala | 1 year ago
One of the main reasons why companies move from monoliths to microservices is to promote ownership and accountability in large codebases.
In a monolith where everyone owns the code, developers can break each other's code.
With microservices, each team becomes responsible for one part, and (as long as they keep their SLAs) they can't break each other's code.
When something fails it's easier to identify who needs to fix what.
Microservices don't make much sense for small teams if they don't need or don't have the headcount to split responsibilities.
fluoridation|1 year ago
zbobet2012|1 year ago
Now sometimes folks (the Windows team famously did this) build systems which identify which tests to run based on changes that occur in the codebase, but that's _not_ easy.
jamalaramala|1 year ago
lolinder|1 year ago
Defining a clear public contract in most existing programming languages that cannot be violated by a lazy programmer is tricky. Java's package-private should be the answer but is too blunt and ends up requiring a team to make things public so they can use them. C# has a bit more control that might make clear contracts possible (I haven't tried), but not everyone wants to use it because Microsoft. And most of the popular languages at the time of the rise of microservices had basically no mechanism for defining public versus private interfaces.
Microservices allow you to do that in any language— your HTTP API is your public interface. Anything inside of that is physically impossible to access without adding an explicit build-time dependency, which would be trivial to catch in code review.
Yes, code review could theoretically solve the same problems, but in practice no organization is that disciplined. You need tooling, and those tools didn't exist yet when microservices came to be. We're seeing them develop now (Rust's visibility modifiers are very powerful, and monorepo tools are starting to develop lints that can impose module boundaries on languages that lack them natively), and it's not a coincidence that around the same time we're seeing a lot of people moving back to monoliths.
sebazzz|1 year ago
Well, they still can and do break someone else's code. It is just breaking someones code with more steps in between. And who is at fault isn't necessarily as clear cut.
breckenedge|1 year ago
SideburnsOfDoom|1 year ago
There are co-ordination costs to microservices. But there are also independence benefits.
jamalaramala|1 year ago
SideburnsOfDoom|1 year ago
When done well, microservices work as a unit of deployment. The team that owns the service code deploys it on their own pace. Sure there is process to follow, but it involves 10 people in that microservice team not 100 people for the monolithic app. This allow for smaller batches and independence of development.
mangodrunk|1 year ago
ciupicri|1 year ago