Some say microservices architecture is proof that SOA is still alive. I contend that microservices architecture replaces SOA due to deficiencies in how SOA has been implemented as well as the original intent.
In the mid-1990s there was a surge of investment for implementing enterprise applications to replace the aging homegrown legacy applications. These new applications managed complex activities around accounting, supply chain, human resource and manufacturing. They also were easy to integrate with other facets of the business, including existing legacy applications that were not going away and new and emerging web applications for customer and internal use.
Out of necessity, there was a rise in the number of point-to-point integrations occurring. Over time, the web of point-to-point integrations became so complex to manage that even small changes resulted in major failures. To correct this problem, a category of software emerged to make integration easier by simplifying the control plane that focused on cataloging the endpoints, fostering connections and marshalling the data. These control planes were identified as enterprise application integration (EAI). Early EAI products did not inspect or act on the data.
Somewhere along the line, vendors became aware that there was another underlying issue: The old system and the new system used different vocabularies and message structures. Initially, the consumer of the EAI tool output did the translation itself, but then vendors saw an opportunity to increase the capabilities of the EAI tooling to also become a data plane. So, then, the EAI tooling would also handle mapping and translation.
Now, if your source systems never change, the value of an intelligent middleware that acted as a control and data plane seems both logical and of great value. However, when the source systems change, middleware comprised of dynamic routing and mappings from the source to the target becomes a considerable limitation. Any change to the source requires comprehensive regression testing on the entire system, and you must hope you have an example of every permutation of every message that may ever be delivered as input to ensure the change does not introduce future problems.
Having been an integration consultant during this era, I can attest to weekly failures due to message combinations that no one had ever conceived of during testing.
So, what does any of this have to do with SOA and microservices?
The above approach I just described evolved with the products that acted as a control and data plane morphing into the enterprise service bus (ESB). The ESB became the cornerstone of the SOA strategy and together they formed the strategy for modernizing legacy systems. Hence, SOA, as it was ultimately delivered, ended up being an expensive mapping exercise from legacy data structures and messages to a newly appointed business language, also called the canonical representation. In some cases, these new SOA services would derive these new business data structures by querying and massaging data from multiple legacy systems, while in other cases, new business logic would be made available via the bus expanding the ecosystem of available capabilities.
With SOA, the canonical message became the product of innovation and, hence, ultimately its downfall. Perhaps unfairly so, but, SOA never fostered continued modernization of the legacy systems into re-platformed and redeveloped services. It was about exposing the systems of record, both data and process, for inclusion into business processes, facilitating minimal changes to the legacy systems all handled through intelligent pipes.
While digital transformation may be a popular concept that every business is now chasing, SOA’s failure demonstrates that simply exposing the existing systems was not enough to become the agile business we strive to be. Indeed, the systems of record that are brittle, burdened with technical debt and developed in a monolithic fashion were already impairing businesses’ ability to compete long before Uber and Airbnb came into existence. The appearance of these businesses just increased the urgency to address the legacy issue.
Enter microservices architectures. First, I’ll reiterate my favorite soapbox topic: Putting a legacy app inside a Docker container does not in and of itself define a microservice. A microservice follows specific tenets of design. One of these tenets—and one that is very relevant to this discussion—is smart endpoints and dumb pipes. I find this design principle very interesting, considering what I’ve stated above about SOA. For me, it’s clearly a rebellion against SOA strategies.
Also, I believe microservices approaches legacy modernization from a slightly different perspective. Microservices architectures by nature focus less on tooling (they’re polyglots by design) and more on the contextual bindings to business domains. Additionally, as someone eloquently stated on Twitter (which I cannot find now and so will paraphrase here), a microservice should be designed to be easily deleted without impacting the operations of the system. I believe the statement illustrates that a well-designed microservice isn’t intertwined with other services nor does it share intimacy of design.
Some will debate—present company included—that this is what SOA was supposed to deliver. Unfortunately, this was not how it got implemented. So, this time we reduce the scope. Instead of a SOA service that represents the entire business domain, we deliver smaller, more well-focused entities representing subsets of the business domain. Subsequently, these services are designed to operate more independently, allowing them to better align with greater use of agile techniques.
In microservices, architecture agility is the product of innovation. Ultimately, the improvements in speed, cost and quality are why microservices will succeed where SOA has failed.