The term “microservices” doesn’t exactly set the pulse racing but you hear it a lot at the moment. So, what’s the big deal? When I started to investigate, my enthusiasm levels didn’t improve much, but then I began to get it – and it’s big.
The microservices approach is a huge shift in how companies build, deliver and use software. Large applications are broken down into small, loosely coupled, composable pieces that are autonomous (that is, they have the freedom to act independently).
Netflix, Amazon, Twitter, Paypal and Soundcloud are based on microservices apparently, and when you do a Google search, it calls up to 70 microservices. Who knew?
Suddenly I’m all ears – let’s cut to the benefits so we all stay awake.
According to Sequoia, the mega-venture capital firm, microservices offer four main advantages:
- Agility – by breaking down functions to a near-atomic level and abstracting them, development teams only need to update the relevant bits of an application instead worrying about integration within monolithic applications. Development processes that used to take months can now take only weeks.
- Efficiency –a thoughtful approach to microservices should result in far more efficient use of code and underlying infrastructure. Users report substantial cost savings – in some cases reducing the amount of infrastructure needed by an application by 50 percent.
- Resiliency – the dispersion of functionality across services should mean no single point of failure. The result is systems that perform much better with minimal downtime and can scale seamlessly and on demand.
- Revenue – faster iteration and less downtime add up to more revenue. Plus user retention and user engagement increase as your product continuously improves.
How it works
If that’s whetted your appetite, here’s more on how microservices work.
According to flow.ci, “Applications with traditional monolithic architecture can’t cope with the challenges of the rapidly changing market conditions…Microservices are the opposite of the traditional monolithic architectural style.”
Nanalyze gives this useful analogy of web advertising, “If we use the ‘3 layer approach’, then the presentation layer is how the ad is displayed in the article. The logic layer determines which ads to show you. The data layer is the actual ads themselves. If we wanted to change the way our ads behave, we’d have to make changes across all three layers. Instead, let’s just create one software program with all three layers that does nothing but service ads. Because its only job is to serve ads, it’s consequently very scalable. Moreover, anyone can use it.”
This diagram illustrates things well.
Google, Amazon and Facebook have been running microservices for over a decade. However, according to Sequoia, the right building blocks for mass adoption are now in place, which is why we’re hearing so much about them. The building blocks are:
- Containers, which are akin to how containers transformed the shipping industry; software containers create a standardized frame for all services. This standardization simplifies what was once a painful integration process in world of heterogeneous (diverse) infrastructure.
- APIs’ rapid adoption has created a standardized format for communications.
- Scalable cloud infrastructure, whether private or public, delivers the resources needed, on demand, to scale and operate services effectively.
Microservices are not interesting (on their own)
There’s a bigger picture too around what this approach means for businesses.
Chris Richardson, a software architect and entrepreneur points out that microservice architecture is actually a better term than microservices because “the latter suggests that a single microservice is somehow interesting.”
Over on LinkedIn, Tushar Agrawal, Technical Expert at Walmart eCommerce, says there are five core principles of a successful microservice architecture:
- single responsibility principle, whereby one – and only one – capability is provided by a service.
- isolation – build and maintain a single capability without impacting other functions.
- autonomy – microservices are autonomous and self-governing, so, “Consumers can choose to accept or reject the promise offered by provider, but cannot direct it to behave in a particular way.”
- data encapsulation – as microservices encapsulate the data (or state) and behavior as a single unit, persistent data for each service must be private. Consumers can only access the data through its published interfaces or APIs.
- inter-process communication as microservices interact with each other to fulfill a user’s request or perform a business function.
Agrawal writes, “Moving from distributed monoliths to true microservices can sometimes be challenging due to organization culture, appetite for innovation, technical skills and understanding of concepts. Microservices architecture is a discipline. Like any other discipline it has a set of rules, design patterns and core principles that must be applied for a successful implementation. It is a paradigm shift that requires strict adherence to core principles of single responsibility, isolation, autonomy, private data and loosely coupled interaction among services.”
A real revolution
TM Forum’s Barry Graham, Senior Director, Agile Business & IT program, agrees, saying, “A microservices architecture will give you some benefits but for a real revolution the change has to impact the entire business approach. Now that we have a highly flexible software platform we need agile operations processes like DevOps-inspired continuous integration to allow the whole business to change rapidly. We also need to match our business processes to its supporting software by breaking our large monolithic processes into standardized reusable components.”
What all this adds up to is that reaping the benefits of a microservices architecture requires true business transformation, encompassing IT, processes, people and culture. This holistic transformation is what TM Forum is focused on helping its members to achieve.
Nik Willetts, Deputy CEO, discusses this in more detail in the video below.
At TM Forum Live! in Nice in May, we’ll look at microservices more closely: Chris Boyd, Director of Digital Architecture and Transformation, Telefónica, will share his views on the operational and organizational challenges of microservices and Eric McMurry, Director, CTO Office, Oracle, will outline the business case for them. Book your place now.