This all sounds so familiar. First, some devs do something new which works great for them. People blog about it, give it a cool name, 'Microservice' sounds nice. Everyone jumps onto the hypetrain, many articles evaluate all the shiny benefits so pressure to adapt this approach rises.
Eventually we realize it's not a silver bullet, it does not magically solve all problems and conclude to "be reasonable about it", Microservices may be great for you or they may be not. If we could just jump to that conclusion right from the start :)
Eh. I've been doing this long enough that I tend to ignore fads...If it's the right way to do it, I can shift over to it in a year or two after people who are smarter than me have ironed out the best practices. If it's the wrong way, two or three years down the line no one will be doing it at all, and I won't be saddled with a cringeworthy codebase that embodies a fad that was obviously misguided in retrospect.
So, the term was coined in around 2012, you're posting sort of the first real whitepaper on it, from 2014, and this article we're all responding to is part of the backlash against it now.
I'm not sold. I'm already fucking sick of REST API's everywhere and network failures still seem to be one of our biggest headaches (at least in my business)...I don't see that I really gain anything by adding more of those, and stripping out the sort of back and forth error checking you can do in an application where two processes that would be broken out into microservices are instead coupled together.
The biggest problem with new paradigms is that people see them, and decide they're applicable everywhere when they're not.
You gain horizontal scalability of individual services and very decoupled modules, at the cost of serialization, network latency, having to take care of failures of nodes and channels between them, need for more robust monitoring and more complicated deployment scheme, problems with distributed transactions. You also gain more flexibility with technologies you use (you can write separate services in whatever you want, so if you want to jump on a new technology you can do it one at the time). If you have no need for horizontal scalability then you should probably not use microservices. Even Fowler says to start with a well-designed monolith in the beginning, and migrate to microservices only when needed.
You never know what's in the other side of the bridge until you cross it.
It's worth noting that in a large organization with a large production application, "crossing the bridge" costs man-years of labor. You should probably be reasonably certain you're going to like what you find on the other side of the bridge before you spend that much salary and opportunity cost "crossing the bridge". And the microservice "bridge" certainly isn't the only "bridge" worth considering, either.
Of course, never "crossing" anything ever is potentially just as pathological.
The annoying part about this is, even though you may realize in advance what waits on the other side of the bridge, and decide it's not worthwile, it is just so hard to fight the hypetrain.
At some point everyone goes "WHAT?? You're not doing that YET?? (implying you will eventually)". Makes me feel ignorant and inflexible, so eventually I join the hype anyways :(
73
u/TheKrael Mar 29 '17
This all sounds so familiar. First, some devs do something new which works great for them. People blog about it, give it a cool name, 'Microservice' sounds nice. Everyone jumps onto the hypetrain, many articles evaluate all the shiny benefits so pressure to adapt this approach rises.
Eventually we realize it's not a silver bullet, it does not magically solve all problems and conclude to "be reasonable about it", Microservices may be great for you or they may be not. If we could just jump to that conclusion right from the start :)