Introduction to Monolithic
The Characteristics
- The application business logic consists of many modules.
- Business logic to access database, notification, payment gateway, etc.
- The application is packaged as single archive file.
- Despite a modular, it’s packaged as single WAR file.
The Benefits of the Monolithic
- Simple to develop
- Focus to develop with single application.
- Easy to make radical changes to the application
- Easy to change the code, database schema, build, and deploy.
- Easy to test
- Easy to deploy
- Copy the WAR file to server.
- Easy to scale
The Drawbacks
When the application outgrown in many cases it will more complex so that the development, testing, deployment, and scaling became much more difficult.
- Complexity
- At times the application more complex, it’s too large for the developer to fully understand.
- Fixing bugs and implementing new features have become difficult and time consuming (missed deadline).
- Development
- Building large application takes a long times.
- Day-to-day development tasks slow.
- Deployment
- Deploying changes into production is a long and painful process (once a month, late on a Friday or Saturday night).
- Complexity of code base impact to Continuous Integration (CI) server must run the entire test suite.
- Scaling
- Complexity of code base make scaling the application is difficult. That’s because different application modules have conflicting resources requirement.
- Delivering
- Due to the application more complex and large size, testing the application is difficult so that it’s one reason delivery unrealible cause lack of reability, lack of testability.
- A bug in one module (e.g. a memory leak), crashes all instances of the application.
- Technology
- The architecture make it difficult to adopt new frameworks and languages.
- Quite often, they must maintain an application written using an obsolete technology.
Architecture approach Solutions
- Migrate to a new architecture : the Microservices architecture.
- Develop the business logic for a service.
- Refactor an existing monolithic application to services.