O'Reilly Software Architecture Conference in London

Microservices

Microservices, Microservices, Microservices!

Microservices is in the center of events right now, and it was clear at the conference, O’Reilly Software Architecture Conference in London, that many people wanted to know how it works, and how relate to them.

What are Microservices?

Microservices is an architectonic concept that unlike the classical way to build a large-scale application that does it all, instead uses small components that does parts of a larger process.

Traditionally, you have a large code base with a large-scale application doing everything in the entire process, a so called monolithic applications. Usually it has several layers – an UI layer, a business logic layer, and a database layer, that all collaborate within the application. It is developed and maintained by several different roles within a company. A company can for example have a team of interface experts focusing on the UI layer, and a team of database experts aiming for the database layer. This can lead to unfortunate, since the teams are too focused on their specific area, and can have problems cooperating – an “us against them” mind set.

In the microservices way of thinking, the area experts have a close cooperation in the divided components. The teams have better understanding for each other’s needs, and will feel a greater responsibility to solve their parts in an optimal way. Microservices also force the different teams to use and think of how APIs are designed and used during the entire life cycle of the product, enabling the services a more natural and easy to use interface.

Pros with Microservices

Since microservices are meant to do one or a few things, it is easier to reason about the logic of separate services. The idea is that different services have different needs and requirements, you should for example to be locked to always use the database, something that is very common in monolithic applications. If a SQL Server database isn’t needed to do the job that the service requires, something more suitable should be used.

To make changes in the human teams in different microservices is easier since the logic of the services isn’t large and complex. It can for example relate to restructures of different kinds in a company, or simply when a new employee should start to work.

Another pro with microservices is that deploys are easier. You don’t need to rebuild and install the entire application on all relevant servers just because a small part of the application has been changed. It is enough to replace the microservice that manages the current change, making the deployment easier and more secure.

Cons with Microservices

The breakup of a monolithic application to microservices also introduces another type of communication than the applications normally uses internally. Instead of this internal communication, you move towards external communication. This can lead to problems that you normally don’t have to consider when communicating internally. For example network latency, and different types of problems that can arise in parallel or asynchronous communication.

It can be difficult to get an overview of the entire system if the system is scattered over several services and servers. Trouble shooting and testing can be a problem if you don’t think your solution through, or if you lack the proper tools to manage the services and log data that they generate.

Another difficulty in the adaption from monolithic application to microservices is that you have to consider the human factor. To change a team can be an extensive adaption for a company, and you can’t forget that it is also an extensive adaption for the people in the teams. It means a new way of communicating, and a new way to manage work. From working with a project to working with a product (i.e. the microservice).

The Future

It will depend on the type of work you should carry out how useful it will be to go over to microservices. Some types of work and services are more suitable than others for microservices. As usual it is the large-scale companies as Netflix and Google that push this trend with microservices, which can mean that it is more beneficial for larger companies.

Time will tell if it is also favorable with microservices for smaller companies and applications.

Ralf Lindberg

Ralf Lindberg Solution Architect