Re:The Majestic Monolith
by lmm on Tuesday March 01, 2016 @04:10AM
(#11201615)
Interesting - very much not my experience. I think part of this is a question of typed languages (and structured build systems) vs. dynamic - with a typed language you can have strongly enforced separation between different parts of the codebase without needing to split them across a network connection.
> Even with a small team, microservices allow us to make small iterative changes to services without touching other parts that are working as they should be.
My experience is this should be the case anyway. Having the ability to "find usages" in the IDE, and lots of compile-time enforcement, gives me a lot of confidence that changes haven't affected anything unrelated.
> It's easier to find and patch bugs when they can be pinned down to a smaller codebase and fixed in isolation (most can be).
True but not something I find microservices help with. Any decent debugging/introspection tools are going to give you better information than a network sniffer.
> Local development becomes easier - you can spin up just the services you need for the feature you're developing instead of the entire system.
Don't forget the overhead of the network layer though. Particularly if you're using service discovery (and if not you have a config problem), I find running two or three microservices locally is heavier than running a monolith that contained the equivalent of ten of those services, and it's a fiddle to start the right ones during development. As long as the codebase remains a size that can be comfortably run on a single machine (and start up reasonably quickly, and all be open in the same IDE at the same time, and so on), it's much easier to just run the whole thing.
> It's easier to get "up to speed" when you need to add a feature when you're working with small codebases (and often only need to touch one or two at a time).
True up to a point - there's an intimidation factor, but I don't think it's actually any harder to understand a folder in a repo of ten folders than a repo that's separated from the other ten. And separating creates a barrier to organically expanding your understanding. If you have distinct build modules then project encapsulation is enforced just as much as for microservices.
> Even with a small team, microservices allow us to make small iterative changes to services without touching other parts that are working as they should be.
My experience is this should be the case anyway. Having the ability to "find usages" in the IDE, and lots of compile-time enforcement, gives me a lot of confidence that changes haven't affected anything unrelated.
> It's easier to find and patch bugs when they can be pinned down to a smaller codebase and fixed in isolation (most can be).
True but not something I find microservices help with. Any decent debugging/introspection tools are going to give you better information than a network sniffer.
> Local development becomes easier - you can spin up just the services you need for the feature you're developing instead of the entire system.
Don't forget the overhead of the network layer though. Particularly if you're using service discovery (and if not you have a config problem), I find running two or three microservices locally is heavier than running a monolith that contained the equivalent of ten of those services, and it's a fiddle to start the right ones during development. As long as the codebase remains a size that can be comfortably run on a single machine (and start up reasonably quickly, and all be open in the same IDE at the same time, and so on), it's much easier to just run the whole thing.
> It's easier to get "up to speed" when you need to add a feature when you're working with small codebases (and often only need to touch one or two at a time).
True up to a point - there's an intimidation factor, but I don't think it's actually any harder to understand a folder in a repo of ten folders than a repo that's separated from the other ten. And separating creates a barrier to organically expanding your understanding. If you have distinct build modules then project encapsulation is enforced just as much as for microservices.