Reputation: 590
I have an application which is packaged as a single ear file deployed on WebSphere. Inside the package, the code is organized in to UI files, Business Logic files and Database related files. Now, is this a monolithic application or a 3-tier architecture?
What is the difference?
Upvotes: 1
Views: 4872
Reputation: 389
Remember that a EAR and what is in it is a packaging choice. Your same application can be deployed in multiple ears in multiple Java EE containers on one or more servers. The EJB-jars and WARs are intended to do that. With Java EE you choose how to distribute you application across the containers and nodes based on what make sense.
Technically a tiered application is one where the layers can be independently deployed, distributed and accessed. I.e. my business logic can be on 5 servers in 9 ejb containers and accessed by 3 user interfaces that could be desktop, mobile, web etc. And possibly parts of different applications.
The more traditional definition of a monolith was an application that wasn't tier. Specifically that its parts cannot be composed in to other applications at runtime
Upvotes: 0
Reputation: 10876
You are comparing wrong things. Monolithic application need to be compared against Micro Services. In monolithic application; you deploy all the features/api end-points in a single EAR/WAR file; i.e. single JVM. In micro-services they are deployed in multiple JVMs. Note that in Monolithic architecture also you have multiple REST end points exposed.
3 tier, or 2 tier or N tier architectures is a different concept. It says how many subsystems/modules your application is divided like database layer, client layer, application logic layer. Hence, monolithic as well microservices both can be n tier applications.
Upvotes: 6