Microservices: preparing for the new generation of cloud applications

Microservices represent a radically different approach to the design, development, deployment, and management of traditional monolithic applications.

Distributed computing has been evolving for twenty years. The mid-1990s saw the development of component technology with Corba, DCOM and J2EE. A component was defined as a reusable code unit, with immutable and shareable interfaces between disparate applications.

The component architecture was out of step with the traditional mode of application development, including dynamic link libraries (DLLs).

However, each component technology used a communication protocol of its own (RMI for Java, IIOB for Corba and RPC for DCOM): the interoperability and integration of applications built on platforms with different languages ​​were only more complex.

Evolution of microservices

With the adoption of standard XML and HTTP protocols for cross-platform communication, the service-oriented architecture (SOA) has attempted to define a set of interoperability standards.

Thus, the standards for Web services that originated in the SOAP protocol (Simple Object Access Protocol) were entrusted to a committee called Oasis.

Publishers such as IBM, Tibco, Microsoft, and Oracle have begun offering enterprise application integration products based on the principles of service-oriented architecture.

Despite the success of these products with businesses, young Web 2.0 companies have begun to use the Representational State Transfer ( REST) ​​protocol for distributed computing.

As JavaScript gained ground, JavaScript Object Notation (JSON) and REST quickly became de facto standards for the Web.

Main features of microservices

Microservices are functional units of high precision. They are designed to do just one thing perfectly. Each microservice has exactly one known entry point. This is reminiscent of the attribute of a component but with a major difference: the assembly.

Microservices are not just libraries or code modules: each is a functional unit that takes the form of a complete assembly with operating system, platform, framework, runtime environment and dependencies.

Each microservice is an autonomous and independent process that does not depend on other microservices. He does not know or recognize the existence of other microservices.

Microservices communicate with each other through platform-independent programming interfaces (APIs). These APIs are usually exposed as REST endpoints or can be called via lightweight messaging protocols such as RabbitMQ. Their modularity makes it possible to avoid synchronous and blocking calls as much as possible.

Transition to microservices: favorable factors

Current applications rely on continuous integration and deployment for fast iteration. To take advantage of this approach, the application is subdivided into small independent functional units.

Each unit is assigned to a team that is responsible for improving it. With this feature, teams can quickly deliver new versions of microservices without disrupting other parts of the application.

The evolution of the Internet of Things (IoT) and machine-to-machine communication (M2M) requires different structuring of the application modules. Each module must take care of a single task that is part of the overall workflow.

For each part of an application, developers choose the most appropriate languages, frameworks and tools.

Container technology , be it Docker , Rocket or LXD, allows you to take code from one environment to another. Developers can seamlessly transfer code written on their development machines to virtual machines, or to the public or private cloud. Each container that runs is a complete set, from the operating system to the execution code of the task.

The code-based infrastructure is a powerful concept: it allows developers to manage the underlying infrastructure through a program. It can dynamically provision, configure and orchestrate a few hundred virtual servers. Combined with containers, this feature provides powerful tools like Kubernetes for dynamic deployment of clusters running microservices.

For each part of an application, developers choose the most appropriate languages, frameworks and tools. Thus, a large application can consist of microservices written in Node.js, Ruby on Rails, Python, R and Java. Each microservice is written in the most appropriate language for the task.

This is also the case of the permanent storage layer. Web applications increasingly require object storage , semi-structured and structured data storage, and caching in memory to ensure persistence. Microservices facilitate the adoption of a multilingual strategy in terms of coding languages ​​and databases.

Benefits of microservices

With microservices, developers and operators can develop and deploy self-adaptive applications. Since each microservice is independent and independent, it is easy to detect and replace a faulty service without disrupting other services.

Microservice technology enables companies to invest in scalable and reusable components.

Unlike monolithic applications, those based on microservices can evolve selectively.
Instead of launching multiple instances of the application server, you can scale a particular microservice on demand. When the load moves to other parts of the application, a microservice used previously undergoes a load drop parallel to the scaling up of another. The underlying infrastructure is better valued: there is no need to provision new virtual machines, just provision new instances of microservices on existing machines.

Developers and administrators will be able to choose the advanced technologies that work best with this or that microservice. They will be able to combine various operating systems, languages, frameworks, runtime environments, databases and control tools.

Finally, microservice technology allows companies to invest in modular and reusable components. Each microservice works like a Lego brick that can be plugged into a stack of applications. If companies invest in a set of microservices elementary, they can then build by assembly applications for various uses.

Microservices: first steps

The easiest way to get started with microservices is to use Docker. Its tools and ecosystem make it an excellent platform for start-ups for the Web as well as for traditional businesses.

Organizations can subscribe to hosted container services, such as Google Container Engine or Amazon EC2 Container Service , to learn about deploying and managing container applications.

Once this knowledge is gained, they will be able to deploy the infrastructure in on-site containers.

Leave a Reply

Your email address will not be published. Required fields are marked *