- On July 15, 2019
What are Microservices?
Microservices are an approach to software development that treats an application as a collection of services. They use a high degree of granularity to distinguish these services and include minimal protocol to couple these services together. The primary benefit of microservices is to increase an application’s modularity, allowing developers to understand its functions more easily. They also enable the use of small teams to independently develop, implement and test applications. Additional benefits of microservices include support for the continuous delivery/continuous integration (CD/CI) model of software development.
Systems analysts don’t officially recognize a formal definition of microservices, but they generally agree on some of its defining characteristics. These include the requirement for the services to be small in size and developed autonomously, but bounded by contexts. These services should have fine-grained capabilities, which distinguish them from service-oriented architecture (SOA). Developers can implement microservices with a variety of hardware and software, depending on requirements of the particular environment.
The earliest formal reference to microservices occurred in 2005, when Dr. Peter Rodgers used the term “Micro-Web-Services” in a presentation at the Web Services Edge conference. Software architect Juval Löwy expressed similar ideas about highly granularized services during the same period, saying that loosely-coupled services using Unix-like pipelines would be the next stage of Microsoft architecture. A project at Hewlett Packard Labs used “Micro-Web-Services” in 2005 to make the software in large-scale systems more robust.
One of the earliest uses of the term “microservices” occurred in 2011 at a software architecture workshop held near Venice, Italy. Participants used this term to describe an architectural style they were already exploring. This group also formally adopted “microservices” as the most appropriate name for this new architecture the following year.
Architect James Lewis also specifically addressed the use of microservices in 2012 in his case study “Microservices – Java, the Unix Way,” which he presented at 33rd Degree in Kraków. Adrian Cockcroft pioneered microservices at web scale for Netflix, describing this style as “fine-grained SOA.” Amazon was also an early pioneer of microservices, as were leading architects such as Evan Bottcher, Dan North, Graham Tackley and Joe Walnes.
Evolution of Enterprise Software
Enterprise software is designed to meet the needs of organizations rather than individuals. The most common users of this software include businesses, governments, internet-based groups and charities. Enterprise software has evolved from monolithic architectures to SOAs and then to microservices architectures.
Separate functions such as user interfaces, data input and output, data processing and error handling are all integrated in a monolithic architecture. Software began modularizing these functions into loosely-coupled, independent modules long before the term “SOA” was ever used, simply because it’s good engineering practice.
The use of SOAs began around 1999 as part of Web 2.0. However, it didn’t receive popular recognition as a distinct architectural style the web became a practical interface for enterprise software, around 2003. This development allowed web clients to interact with server-side proxies, which could then leverage the resources of multiple modules.
SOA’s granularity has become finer over time, as software architects have continued to narrow the scope of services. This process was largely impractical with the first-generation SOA tools and infrastructure available in the early 2000s. However, advances in cloud computing such as improved server virtualization and Platform-as-a-Service (PaaS) have greatly facilitated the process of managing individual services.
Role of Microservices in DevOps and CD/CI
DevOps is a set of software development practices that combine development (Dev) with operations (Ops), primarily for the purpose of shortening the systems development life cycle. It also allows developers to deliver updates more frequently, ensuring that software remains aligned with business objectives. Systems engineers can theoretically practice DevOps with any architectural style, but microservices architectures are quickly becoming the standard for DevOps. The small size of the services is particularly beneficial for the continuous release of software, which is a requirement for CD/CI systems.
Microservices also fit in well with the DevOps ideal of making functional changes to enterprise software with small teams. The ability to easily scale microservices without impacting the rest of the system is another significant benefit for a DevOps environment. Microservices also create modules with plug-and-play functionality already built into them, allowing CD/CI pipelines to maintain their flow of deployments. Furthermore, the high degree of containerization for these modules also makes them system agnostic, meaning they run on any system.