Microservices: Flexible Software Architecture for Enterprises

By:
Sidestream
Last Update:
August 15, 2023

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:

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).

Diese modulare Kopplung der einzelnen Dienste ist der größte Unterschied zur monolithischen Softwarearchitektur. Bei einem Monolithen ist die Anwendung eng gekoppelt. Zwar gibt es auch here modulare Ansätze wie die service-oriented architecture (SOA), bei denen kleinere Services eine Rolle spielen, allerdings sind diese nach wie vor in einem festen System deployt und teilen sich eine Codebasis. Dadurch wird beispielsweise bei Ausfällen das gesamte System beeinträchtigt. Einzelne Änderungen und Fehler der Module können in einer Kettenreaktion die anderen Module beeinträchtigen. Bei Microservices hingegen sind die einzelnen Module unabhängig und können so einzeln gepflegt und betreut werden.

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:

  • 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. 


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 hier.

Conclusion

Microservices ermöglichen einmal eine schnellere und agilere Entwicklung von komplexen Anwendungen. Am meisten profitiert aber das Deployment und der Betrieb von dieser Form der Softwarearchitektur. Mit der flexiblen, modularen Microservice-Architektur können neue Features, Verbesserungen und Bug-Fixes deutlich schneller und häufiger durchgeführt werden, ohne dass das gesamte System darunter leidet. Um den Text mit unserem Vergleich mit Lego abzuschließen: Die bunten Steine haben sich aufgrund ihrer variablen Einsatzweise gegenüber anderen Spielzeugen durchgesetzt. Wir sind überzeugt, dass auch de Microservices das gleiche Potenzial haben.