Over the past two years, the Cartesi Rollups node evolved organically as we understood its requirements. Some design decisions made a lot of sense in the past, but now it is time to re-evaluate them. In particular, the node evolved as multiple microservices developed by different people. This division of labor allowed multiple teams to work on it simultaneously but made the node a non-cohesive software. For instance, running a node has always been challenging; even today, with Sunodo, the complexity is hidden but still there. Moreover, the fractured node design makes it very cumbersome to implement new features, such as improving data availability.
In this post, I want to share my vision that we should rewrite the node as a more uncomplicated monolithic application. This simplification would make it much easier for anyone to understand the code base and for the node unit to work on new features. As a side effect, running the monolithic node will be much easier because it will be a single application instead of multiple ones. I also expect a monolithic node to be much more reliable because there are fewer moving parts.
There is a general concern about the scalability of monolithic applications. Monolithic applications generally don’t scale infinitely like micro-services because they are not designed to do so. However, even though the current node has several microservers, it also doesn’t scale. So, moving to a monolithic architecture won’t be a software performance regression. Moreover, we should avoid the temptation of premature optimization. We still don’t have hundreds of Cartesi applications running on production, so we shouldn’t worry about this use case for now.
Once we have a simple and easy-to-understand code base, we will be better positioned to adapt it to fit our needs, regardless of what they will be.