Brands as large as Google, Amazon, Uber and Netflix have transitioned away from monolithic software architecture in recent years. Microservice architecture is the latest (and some would say the greatest) framework being deployed by development teams both large and small — but what other options are there?
With so many buzzwords and acronyms flying around, it’s a confusing environment for developers at times, let alone for the less code-savvy.
To keep you in the "know," CMSWire got in touch with the experts to help understand the fundamental differences between microservices,monoliths, SOAs and APIs.
Microservices vs Monoliths
San Francisco, California based Dialpad’s Co-Founder and VP of Telephony, John Rector recently offered this explanation regarding the difference between microservices and monoliths. To recap however, both terms refer to an architecture type. With microservices, developers segment and isolate sections of a software, resulting in, “little software components [that] talk to each other via APIs, [which can be] scaled independently,” says Rector. As for the monolithic architecture, this refers to the traditional approach of building a software as one, unified and often large component where everything runs on one machine, and if you need to scale up, you duplicate the whole system with more machines.
However, as is always the case with tech, things are changing. “There is a trend to transform monoliths into microservices because of the benefits of microservices. The transformation typically is done by sharding off well-understood sections of the monolith code and related data into services that can stand alone,” says Dino Dai Zovi, CTO and co-founder of NY-based Capsule8.
Microservices vs SOA (Service Oriented Architecture)
As it turns out, the difference between microservice architecture and service oriented architecture — also known as SOA — is relatively small. In fact, microservice architecture has technically evolved out of service oriented architecture, “service-oriented architecture was the first move towards a distributed horizontally-scalable infrastructure pattern and was more prevalent in the early to mid-2000’s,” says Dai Zovi
Since then, according to Dai Zov, many adopters of SOA realized that they gained more flexibility and performance by making the services more finely-grained. "This finely-grained SOA became known as microservices,” he says.
According to Marc Hornbeek, Principal Consultant — DevOps, at Irvine, California based Trace3, Microservice based application architectures is considered a refinement of Service Oriented Architectures (SOA) design concepts. "Both seek to partition an application into loosely coupled components to provide smaller, more manageable components and configuration options,” says Hornbeek. The goal of all of this to improve flexibility, quality, speed to market, redundancy and scalability.
Microservices Vs APIs
APIs, or application programming interfaces, are a totally different story. Some newbie developers get confused by the relationship between APIs and microservice architecture, but in actuality, they’re not truly comparable. Where microservices are siloed and isolated pieces of software that can work together whenever necessary, APIs facilitate that collaboration by enabling microservices to communicate with each other. “Microservices communicate with each other via APIs. Most microservices are defined by REST APIs today (replacing SOAP APIs). So APIs are how microservices communicate,” says Antony Edwards CTO of Testplant CTO.
API's play a crucial role in facilitating microservice archtiecture according to New Relic’s Senior Director of Strategic Architecture, Lee Atchison, “A successful microservice architecture requires APIs defined for communicating between individual services. Only when you have well-defined APIs as the communications path between services can you truly take advantage of the team scaling capabilities that microservice architectures offer,” he said.
To be clear, APIs aren’t exclusively used with microservices architecture. According to Atchison, APIs are used anytime two software components developed by different teams need to communicate with each other. "This can be two teams in the same company using an internal API for talking between microservices, or it can be a team in one company needing to make calls to an application developed by another company, he says.
So while all capable microservices need APIs — they work well with any two (or more) software components, whether they are monoliths, microservices or otherwise.