Apr 12, 2018
By: Jason Smith
Organizations as large as Amazon, Soundcloud and Netflix have already made successful transitions from monolithic architecture to microservices in recent years. But it’s not just the big guns; a Gartner study from 2016 found that approximately 68 percent of organizations were either investigating or developing a microservice architecture (and yes, dotCMS is part of that crowd!).
But what’s all the fuss about?
The term microservices, also known as microservice architecture, is an umbrella term. Thus, you’ll come across slightly varying definitions depending on who you’re talking to.
At its core, microservice architecture involves developing software applications using smaller modular services rather than building software as one, large unified block of code called monoliths. Microservices work independently with other services, giving the software greater flexibility. Yet, well-built microservices can also work together when needed, ensuring end users never feel like their experience is fragmented in any way.
Microservices came about when organizations realized their traditional monolith IT systems became increasingly rigid as they experienced more growth. Companies noticed that their monolith systems were unable to adapt to the ever-changing consumer needs, particularly since the Internet of Things (IoT) era started forcing brands to adopt an API-first strategy to content management.
It’s also important to distinguish between microservices and containers. The difference is that a microservice is a piece of software, while a container is a means of running a process inside an isolated (or contained) environment. Although containers and microservices work brilliantly together, they don’t work together exclusively. A microservice can run inside a container, but it doesn’t have to. Similarly, a container doesn’t have to house a microservice.
A recent microservices survey by Lightbend, which compiled the views of over 2,100 developers and IT specialists, found that larger enterprises see microservices as a path to modernization, with 36 percent of microservices efforts being related to modernizing legacy applications,
A monolithic system is traditional. It’s an amalgamation of a variety of services that serves as a single unit. To give you an example, a retail company which operates a monolithic system may have the following services:
In monolith systems, each of the above-mentioned services is dependent on each other (i.e. they are tightly coupled). Even though monolith systems are easier to develop and incur lower overhead costs in comparison to microservices, it is this over-reliance between the services which causes significant problems in the future.
As organizations scale, their monolithic systems become progressively complex and more difficult to manage. This results in problems such as:
So, what makes microservices so different?
Agile Development, which some refer to as ‘DevOps’, means having a number of small teams working on individual, smaller projects so that those projects are able to get a team’s undivided attention. This enables the individual projects to be completed quicker. Microservice architecture fits into this development model perfectly, as each small team can own and focus on one service. A recent study showed that projects managed under agile development tend to be 28 percent more successful than traditional project management techniques.
By assigning a small team of 6-8 people to work on each microservice using the DevOps model, developers can, in theory at least, work more effectively and efficiently. But in order for DevOps to successfully develop and maintain a microservice architecture, strong project management is essential. Since multiple teams will be working on different elements, there is a possibility that some conflicts between the different teams will arise. For example, one team will feel that a certain task is not associated with their assigned microservice and could come back to management and say, “well, that’s not our problem”.
With a strong culture of collaboration and project management, DevOps can enable developers to work more effectively than they otherwise would with a monolithic system. This is reflected in the aforementioned Lightbend survey, with by 30 percent of respondents claiming that microservice architecture helped them increase development velocity for new releases.
Ensuring software applications are kept up-to-date and in-line with changing consumer trends is crucial. Microservice architecture offers better agility in terms of deploying updates as and when required. Since microservices are loosely coupled, developers can add new features and upgrades without having to upgrade the entire system.
And with smaller services containing a lightweight codebase, deployment cycles consist of a shorter build time and testing phase.
In addition, the microservice architecture can allow for various modifications to be implemented. Developers can add new frameworks, data sources, and lists without having to undergo a system-wide reconfiguration. Hence the affinity between containerization and microservice architecture.
Systems created with microservices can be scaled independently and separately using pools and clusters. This provides a great deal of flexibility for developers where they can scale each service one at a time. Hence allowing a system to expand without requiring a significant amount of time and resources.
Having a system that is readily scalable can help organizations to meet rising consumers demands without experiencing any major delays or disruption. Organizations can also plan their marketing campaigns more realistically as they will be able to predict their optimum user capacity far in advance as they roll their system out in a phase-by-phase manner.
To put it bluntly, there’s a reason why some of the biggest players in the software industry to dumping the monolith in favour of the microservice. The former presents significant pains when it comes to scalability, deployment, and agile development — while the latter presents the antidote to those pains.
Investing in microservices may be costlier up front, but with speedier development processes, faster scalability, and the ability to more easily adapt to constantly fluctuating IoT-driven market, that investment makes a whole lot of sense.
Get a complete demo of the dotCMS Content Management System. This webinar covers all the major features of the platform, including editing and managing content, creating pages, creating content types, building custom workflows and more.Get On-Demand Demo
Content is driving eCommerce sales like never before. We explored why, and what role microservice architecture has in delivering data-driven content that drives sales.
Wondering about the benefits of containers? Here’s what all the hype is about.
Website accessibility is fast becoming a priority for brands large and small. Here’s how to improve the accessibility of your website, and your search engine optimization, at the same time.