Microservices: Flexible Software Architecture for Enterprises

In this article, we give an introduction to microservices and why this software architecture is particularly suitable for business applications. We are fans of microservices and develop most of our projects this way. Therefore, in the following we will clarify what microservices actually are, what advantages they offer and which technologies are underlying. We'll also give an example of an application that we implemented using microservices.


Let's start at the beginning:

Microservices - flexible Software Architecture

What are microservices?

As indicated above, microservices are the basis of a modern form of software architecture. In this approach, a single application consists of many loosely linked smaller services that can be deployed and programmed independently. To function as a single application, the individual modules communicate via interfaces (APIs).


This modular coupling of the individual services is the biggest difference to the monolithic software architecture. In a monolith, the application is tightly coupled. Although there are modular approaches such as service-oriented architecture (SOA), in which smaller services play a role, these are still deployed in a fixed system and share a code base. This means, for example, that the entire system is affected in the event of failures. Individual module changes and errors can affect the other modules in a chain reaction. With microservices, on the other hand, the individual modules are independent and can thus be maintained and supported individually.


This results in some advantages of microservices compared to non-modular software architectures.

The advantages of microservices for enterprises

Our development approach aims to combine agile development and planning reliability. Microservices are ideal for this. This type of software architecture and the modularity described above can be thought of like Lego. The individual bricks of a set are the various services and the assembled structure is the application. One can exchange or remove the bricks from the structure as desired. These possibilities also exist with microservices. This modularity has many advantages that are especially beneficial to enterprise applications. 


We have listed the most important ones below:


The individual modules

  • can be implemented independently. New elements can be added without having to change the entire application. This allows software development to respond to new requirements and circumstances and add new features if needed.
  • can be managed by small teams and programmed with different programming languages and stacks. This makes it possible to implement each use case with the most suitable technology. 
  • thus create the possibilities to be maintained, replaced and scaled independently. This means that the entire application does not have to scale if only individual building blocks are overloaded.


The services can be of different sizes. A module can contain only one script, but also the entire frontend or backend. In general, microservice architecture enables fast and reliable deployment of large, complex applications, making them suitable for versatile business applications. 


Programming Languages for Microservices


Tools and technologies 

As described in the advantages above, individual services can be implemented in a variety of programming languages. Just about any modern language can be used in a microservices architecture. However, there are certain tools and technologies that have become mandatory for microservices and are not infrequently mentioned in the same breath.


Docker Container 

One of these are containers. The term container has been coined most by the open source software Docker. The name could not be more appropriate. Just like in transport logistics, containers serve as standardized packaging. Only in this case, not for goods, but for code. Containers package isolated applications in reusable formats. This functionality is ideally suited for microservices. All components such as the code, system tools and libraries can thus be stored in a so-called "Docker image" for the individual services. This allows the individual services to run autonomously, since all the necessary information can be stored in a container. Unlike virtual machines, containers do not contain their own operating system. This makes them leaner. 


Kubernetes: The helmsman in the container ship 

The word Kubernetes comes from the Greek and can be translated as helmsman. Put simply, Kubernetes is just that: The open source software is a container orchestration system. Kubernetes can be used to automatically control the deployment, scaling and management of containers. The goal of the system is to enable optimal packing density of different container-based applications. This makes for more efficient use of resources and can thus reduce infrastructure costs. However, if you only have a few containers, Kubernetes do not necessarily make sense. A little leaner is the control using Docker Compose. 


Enough theory: what might a microservice application look like? 


Sample application: Knowledge management in the enterprise with the Toolbox

We developed the so-called Toolbox for the service company gempex. The box is used to store knowledge gained from consulting assignments and to make it available to all consultants. To make this possible, we implemented the application as a modern, container-based web application. The toolbox is hosted in Docker containers on Amazon Web Services (AWS). By using the cloud, gempex employees can use the application regardless of their location, allowing them to work directly at the customer's site. The box has its own user management system and is therefore independent of the rest of the company's system. Due to the architecture in different containers and the possibility to use different technologies, the application could be implemented quickly without compromising on security. In addition, the modularity means that implemented containers, such as the user management system, can also be reused for other projects at gempex.


Read more about this project here.



Knowledge Management with a Web Application

Conclusion

Microservices allow a faster and more agile development of complex applications. However, deployment and operation benefit the most from this form of software architecture. With the flexible, modular microservice architecture, new features, enhancements and bug fixes can be done much faster and more frequently without affecting the overall system. To conclude the post with our comparison to Lego: The colorful bricks have won against other toys in popularity because of their variable deployment. We are convinced that the microservices also have the same potential.

DE