Docker vs. Monoliths: Differences between microservices and monolithic applications (part I).

Monolithic applications responded to the needs of their time. The arrival of cloud capabilities motivates the emergence of Docker and solves specific business needs that monolithic applications were not covering properly.

Technology
Written by:
Isidro Nistal
Tags:

As we mentioned in the first article of the series, Docker or container is a lightweight, self-contained and executable software package with everything an application needs: code, system tools, libraries and configurations.

According to this premise we could think that Docker can run in any environment and that it will always behave in the same way.

The short answer is... YES GO FORWARD.

The long answer is a bit more complex, it's not Docker, but everything around the use case, environments and applications that influences how to deal with these little self-contained pieces.

Characteristics of monolithic applications

Technology must always respond to a business need and the technologies that support it. Monolithic applications responded to the needs of their time. They performed the function for which they were designed, ran in powerful data centers, often housed in the physical offices of companies, and were adapted to the languages and limitations of the technologies of the time.

Advantages and disadvantages of monolithic applications

The advantages would be:

  • SMALL APPLICATIONS: Good for small applications.
  • EASY TO DEVELOP: Easy to develop.
  • DEPLOY: Easy to deploy.
  • SMALL TEAMS: Easy to work alone or in small teams.

The disadvantages would be:

  • FRAGILE: they respond worse to errors, any problem in one part of the application pulls down the entire platform and that implies solving deployment and debugging of the entire platform.
  • LOW STABILITY: the only option for growth is to grow the entire platform and that is expensive. The creation of new functionalities requested by the product department implies touching the whole platform.
  • COMPLEX: the learning curve of the platform for new incorporations is very large and requires a very general vision to be able to operate on the platform.
  • BUTTERFLY EFFECT: updating any part of the application may have repercussions in other parts of the application that are intrinsically linked and generate errors in places not expected at the beginning.

And along came Docker, and more things that were needed, to disrupt everything.

Docker

Docker is intrinsically linked to the Cloud.

The advent of cloud capabilities motivates the emergence of Docker and solves specific business needs that monolithic applications were not adequately meeting.

Advantages of Docker

  1. It is MODULAR: it allows greater control of the platform and faster development of functionalities with less interdependence.
  2. It is SCALABLE: there is no need to grow the entire monolith to accommodate new use cases or platform growth. Each part grows in its own way and within the cloud environment the use of resources is optimised by using only what is necessary at any given time.
  3. It allows companies to grow dynamically and costs to be optimized to the size of the platforms and the number of customers.
  4. The best in each component: the interoperability provided by Docker can be leveraged by choosing the best for each element of the ecosystem: programming languages, self-contained open source tools, external providers that contribute a piece of the puzzle.
  5. Everything is interchangeable and interoperable depending on the business needs of the moment.
  6. Productivity curve: the adaptation of the company's human resources to the platform is:
  • More gradual: new profiles can be productive relatively quickly without having to control the entire platform.
  • The company may look for profiles specialized in one of the parts of the platform.
  • The company can outsource certain parts of the platform that are not part of its core or that do not compensate its maintenance and management (messaging, databases...).

7. The productivity of the development team increases and the adaptation period in high turnover environments is drastically reduced.

By now you should be convinced that Dockerizing has many advantages (some disadvantages too but that's not what this article is about) and if you are starting a new project or if you see a clear migration path you might want to run your application in Docker.

In the next article we will talk about "How to deploy a Docker distributed application in the cloud and not die trying..." we give you a hint, Kubernetes is the tool to take all the advantages of Docker to the next level without dying trying.

RECOMMENDED READING Why everyone's talking about Docker in the Industrial IoT

Barbara OS supports the execution of packaged applications in Docker containers. If you are interested in this topic and want to know more click here.