As a business gets bigger, they require more functionalities and thus you can’t help but add new models/controller to the existing Rails application and sometimes it becomes a monolith. If you are facing a monolith application which has become unmaintainable and difficult to deploy, you need to know some ways to manage it. If your team has to go through thousands of lines in order to understand the project and to make some changes, it is time to split them.
When to split application
- When your tests run for more than 20 minutes.
- Models grown to several hundred or thousands.
- Independent functionality.
- When developers cannot work independently to develop/deploy their own modules.
- Using microservices.
- Using ‘faster’ technologies.
- Add a bunch of servers.
- Modules can be reused.
- Deployment goes smoothly independent of whole big application.
- Easy to add features.
- Reduces testing time to test one module instead of all.
- Big applications tend to be harder to maintain that the small ones.
- Having set of small applications allows us to focus on working on isolated parts.
- We might have more chance of not breaking other parts of the application.
- Reliability and fault tolerance.
- Easy to migrate or upgrade.
- Technology diversity.
- If any single application function is not working entire application doesn’t goes down.
- Makes it easier for a new developer to understand the functionality of a service.
- Presentation layer – Components that handle HTTP requests and implement either a (REST) API or an HTML-based web UI. In an application that has a sophisticated user interface.
- Business logic layer – Components which are the core of the application where business rules are implemented.
- Data-access layer – Components having access to infrastructure components such as databases and message brokers.
Subscribe For Latest Updates
Related Posts