Over the years application architecture have evolved. The evolution was driven by a need to address challenges posed by real world application requirements. We started from monolithic, client/server, n-tier and API first application architectures.
Microservices is an architectural pattern that has evolved as a response to continuous delivery & continuous integration (CD/CI), infrastructure automation, domain driven design, distributed teams, application and interaction complexity among others.
Though microservices architecture has been promoted as the cure all for all modern application development ailments and is seen as the successor for API first application development, its implementation needs far more thought and pragmatism. Development teams fall for the buzz worthiness of this architectural pattern and frequently mis-implement it in practise.
Here we won’t dwell much on what Microservices architectural pattern is. Rather we will present some common pitfalls in its implementation and provide an extension pattern (Orchestration) that is pragmatic.
What Is Microservices Architecture?
Microservices architectural style is an approach to develop a single application as a suite of services which can be independently developed and deployed. Each service runs in its own process and communicates with the external world, often using REST principles. Each service is self contained and provides a set of features that can be independently serviced.
The term “Microservice Architecture” has sprung up over the last few years to describe a particular way of designing software applications as suites of independently deployable services. While there is no precise definition of this architectural style, there are certain common characteristics around organisation around business capability, automated deployment, intelligence in the endpoints, and decentralised control of languages and data.Martin Fowler
A pictorial representation comparing monolithic vs micro services architectures.

Common Implementation Pitfalls
While the canonical way (see above) of developing micro services is prescribed, frequently during implementation we see some variations. Most of the time it is due to cost considerations , development teams running short on time and to reduce interaction complexity. Let us explore some “Microservices Architectures” from real world implementations.
Single Database Microservices
Though the development team starts nice and good, they make the choice of each service talking to the same database store. Reasons given are costs, reference and relational data etc.
Coarse Grained Microservices
Instead of having granular services which is based on the Single Responsibility Principle, they create a couple of coarse grained services which bundle most of the features within it. If any new service needs to be developed, they add it to the best fit coarse grained service. So over a period of time there will be no difference between this architecture and a monolithic one.
Knot Anti Pattern Microservices
This type of Microservices architecture is more insidious, in the sense that it develops overtime. It starts off as a pure form micro services and then over a period of time as more fine grained services are added, the complexity of interaction manifests as an Anti Pattern called Knot. By then it is too late as significant resources and time would have already been spent on developing it. So there will be resistance all around in fighting the inertia and fixing this. Moreover organisationally there is no single role who will be willing to change this. So they continue building it with increasing complexity and its attendant issues.


Microservices Orchestration
We have till now seen how Microservices Architecture in practise leads to sub optimal implementations. Moreover these implementation patterns occur over a period of time and have very good reasons for its evolution. So what can we do to avoid this? Is there a pattern that can alleviate most if not all of the evolutionary pitfalls? Can we establish an architecture that accepts this evolutionary implementation pressure and provides a prescription for it? The answer is yes. It is Microscervices Orchestration. We create a symphony of micro services which when conducted properly produces melodious music instead of cacophony.
Conducting The Symphony
In order to conduct orchestration in a repeatable and consistent way, we need to create Recipes for each higher order service calls. Recipe : Is an ordered configuration of underlying micro services where the sequence of inputs and outputs to and from a service are defined to achieve a higher order feature.
