Microservices is a trending term right now. The enterprise programmers' corner of the Internet seems to be stuffed to the brim with talk of microservices - Mark Russinovich, CTO of Microsoft Azure, even wrote a blogpost calling it a revolution. Chris Hart of Ramses.tech wrote at length about it, linking it to the Unix philosophy. By all accounts, microservices seem to be changing the world...
Or are they? On the 24th of March, we (WSO2) hosted a meetup in Colombo, based on Microservices. In it, Kasun Indrasiri and Afkham Azeez tackled what we think is a pressing question: what are microservices, and how are they different from what we're already doing?
By now, everyone knows what the monolith is - the dreaded single-unit architecture that ends up becoming a nightmare to deploy, build on and scale. It is self-contained and is, in essence, a silo unto itself.
Enter microservices: the philosophy that a single application should be composed of multiple fine-grained, loosely coupled services that are built and deployed independently of each other.
Kasun explored this concept in minute detail in an earlier blogpost, pointing out that microservices need to follow the Single Responsibility Principle: each microservice handles a limited and focused business operation, and as such should have very few operations and a simple message format. That's so you don't end up just building miniature monoliths. Harries Blog contains a diagram that illustrates this well:
However, in all of this, the software industry seems to be forgetting that such a development style has already existed for a while now. Some time ago one of the hottest buzzwords was Service Oriented Architecture, or SOA: essentially, unassociated, self-contained units of functionality communicating with each other to get a job done, usually with some kind of interface in between.
While the definitions of microservices seem less vague, Microservices, Kasun pointed out, is actually little more than SOA done right. Indeed, as Azeez noted, the software industry likes to reinvent old things by slapping a new name onto them. It's not a new paradigm, and nor is it a panacea; there are instances where it's not the most optimal route to take.
It's possible that 'microservices' started trending because we now have better and easier tools for facilitating this kind of development. Docker and Kubernetes have practically hammered in these basic concepts into a lot of developers' heads. All it needed was a name. For a more nuanced understanding of microservices, read "Scope Versus Size: a Pragmatic Approach to Microservices Architecture" by Asankan Abeysinghe, VP of Solutions Architecture at WSO2.
Either way, here's a toast to microservices - for keeping the spirit of SOA alive and kicking. .