I'm comparing 2 different approaches of J2EE application architecture:
- Divide independent parts as modules of one big web app.
- Divide independent parts as different web apps running on same server.
Between these approaches I prefer the second one because it allows me to make changes without redeploying the whole application. Imagine that you want to change something in app2. In the case of one big app you have to redeploy the whole application. In the second case you have to only redeploy app2.
But I have some doubts about resources consumption such as memory usage and CPU usage. I personally think that each J2EE application, no matter how large it is, has some minimal limit of memory it will necessary use. This minimal limit is what is needed for context loading, web framework config files, jar libs and other things. My hypothesis sounds like "Having many web apps running on same server leads to multiplication of wasting of default minimal resources." Is the picture below correct? Does one big application save me from default resorces overhead multiplication shown on the picture?