Interview: when monolithic architecture is a good idea?
Marta Skiba: the topic of our conversation is quite perverse. One of the dominant trends today is the transformation from a monolith to a microservice architecture. However, reality is not only black and white, right?
- Filip Dziedzic: [laughs] you’re right. Our motto is “it depends” and it fits perfectly on this point as well. The monolithic approach is considered to be much more conservative. Thanks to the constant development of cloud infrastructure, microservices are equated with modernity. Both approaches seem to be two distant poles and the choice may seem obvious. In the case of IT software, often what is taken for granted in the beginning does not fulfill its purpose in practice. And yet, we should expect the efficient operation of the system.
Marta Skiba: in that case, I do not envy investors who must make specific business decisions…
- Filip Dziedzic: investors most often rely on the contractor’s experience in this regard. Even when they come to us with a specific idea, we do not stop there. The role of a good contractor of a dedicated system is to get to know the specifics of the client’s activities as much as possible. It is necessary to focus not only on the project budget, but above all on the dynamism of development typical of the entire sector of the economy. The client’s business strategy for the coming years is also important. Very often it is the monolithic architecture that will be better at start. After all, managing distributed architecture requires a lot of experience. Not every company has to bear the costs associated with it.
Marta Skiba: that is, a comprehensive approach is the basis? The real trick is to individually adapt the system architecture to a specific client?
- Filip Dziedzic: this is exactly the essence of dedicated software. It is the art of individual approach, usability and creating optimal user experience. We cannot forget about the profitability of the entire project. The monolithic architecture, thanks to the work on one common code, ensures a quick initial implementation. It will work very well in the case of systems that are not too extensive or in those industries where we do not observe too high rapid growth. Microservices, on the other hand, provide higher autonomy and scalability. However, managing them at the stage of design works is a challenge. A common approach is to start working on a monolith, and if more complex needs arise in the future, ensure a smooth migration of the monolith to microservices. Everything is considered in the context of ROI and individual business goals of clients.
Marta Skiba: so each approach has its pros and cons. Therefore, let’s focus on showing the basic criteria that should be considered when choosing the architecture of a new system. Ready?
- Filip Dziedzic: sure! After all, we face this question with every client. It should be emphasized that the strength of monolithic architecture is its simplicity. It is easy to monitor one code and test the changes. Often, at the design stage, the monolith can be described extremely efficiently. Its implementation is similar as well. Of course, when the system architecture is transparent. With microservices, the situation is more complex. We design and implement a system based on autonomous services that are interconnected by a network of mutual dependencies. In the case of simple systems, it often seems like an unnecessary expense to disperse all the code. The most important thing is to compare the assumptions of the designed system with the real needs and capabilities of the client. Only this approach will bring the intended results.
Marta Skiba: monolithic architecture is “easier” because everything is contained in one source code?
- Filip Dziedzic: The development team works on one code here, but the term “easier” does not fit here. There are never easy paths and simple decisions in creating dedicated software. Yes, monolithic applications are easy to debug. The connections between the various elements of the system are clearly visible here. The implementation is also easier, because all data is usually contained in one database. This approach fits best with fairly simple systems or the ones without clear domain boundaries.
Marta Skiba: it all seems too simple …
- Filip Dziedzic: you are tempted to say the traditional “it depends”. The fact is that monolithic architecture, as a traditional approach, is familiar to most programmers. Working methodologies are widespread and there is no need to spend extra time training the development team. Perhaps for this reason it all may seem simple. However, we cannot be only optimistic about this approach.
Marta Skiba: so are there also weak points?
- Filip Dziedzic: this weakness appears when you need to efficiently develop a monolithic application. Any modification here should be made carefully and with the utmost care. Even an apparently small change can disrupt the functioning of the entire system. The situation is similar in the case of scaling: even if we need to scale one module, we still have to scale the entire system at the same time.
Marta Skiba: microservices solve these problems?
- Filip Dziedzic: using this approach can quickly solve many problems of enterprises. First of all, individual services can be deployed and developed faster. We are dealing here with better scalability and greater autonomy. Problems arise when we start to consider microservices to be the golden recipe for all difficulties. Firstly, if the development team does not have a lot of experience, even the microservices architecture optimally suited to the needs will not work properly. A clear structure and hierarchy of microservices is also extremely important. Without it, making replacements or updates can do a lot of damage. Microservices will only work if all teams understand the intricacies of the entire project perfectly.
Marta Skiba: so much depends on the development team?
- Filip Dziedzic: if the team of programmers is small or the project budget does not allow to increase it, the implementation of microservices will not be a good idea. The specificity of this architecture requires dividing employees into teams that will work on the development of individual services. It would be optimal if each such team had a variety of skills, tailored to properly implement and maintain this particular service. For that reason, companies very often start with creating a system based on a monolithic architecture.
Marta Skiba: it’s all about matching the optimal method. Considering many aspects of the activities of course
- Filip Dziedzic: this is why there are no obvious answers to these questions. I think it is worth summarizing our considerations as clearly as possible. If we know / assume from the beginning that a new application should grow dynamically, microservices are a more rational choice. In situations where the system architecture is simple and the priority is a quick start, it is worth choosing a monolith. Of course, everything should always be considered individually. At Opsenio, we understand it perfectly. We design and implement systems based on microservices architecture and we appreciate its advantages. At the same time, we implement effective monolithic applications that fully meet the business needs of enterprises. The choice must be dictated by the good of the client, never the convenience of programmers or the current trend.
Marta Skiba: thanks for the explanation. But what if we really don’t know which option is best for us?
- Filip Dziedzic: nothing simpler: let’s talk about it individually