I need to setup a hosting environment for around 100 customers per one GlassFish server (v 3.1). Each customer needs custom configured application that can be run independently from each other. (JDBC, JMS, possibility to restart single app) Running single virtual machine would be preferred, as launching 100 JVMs each using 750MB of RAM doesn’t sound like a good idea.
So far I have tested the following solutions, but unfortunately, neither of these has met my requirements:
Deploying application on separate Domains. This solution was insufficient because of JVM Ram usage and complexity of running multiple management consoles on multiple ports (we don’t need that much separation)
Deploying application on multiple instances (named targets on Glassfish) on the same domain. This solution was insufficient because it creates separate JVM process for each instance and consumes too much RAM (several hundred MB for each instance). Otherwise it was closest to what we need.
Deploying application on multiple virtual hosts on the same instance. This solution was unacceptable because in Glassfish each virtual server doesn't have a separate configuration.
Can anyone suggest what is the best practice / recommendation for using GlassFish to host multiple application instances? Are we “doomed” to reserve 1GB of ram per customer? Coming from IIS environment, we had separate Application Pools each using 3-5MB of RAM at startup.
UPDATE
About my dependency and sharing in my app: In the idea I want to realize on Glassfisf server, each application needs separate resources (JMS and JDBC). This is not a problem, I can customize it per application even per virtual hosts enabled on one instance (I can recognize the virtual server by getting server name from Http Request and prepare separate resources and configuration files in instance directory to apply configuration to this specific virtual server).
My 'independency requrements' are:
Is this idea possible to be realized on one Glassfish instance with hundred applications deployed (enabled on instance/virtual host)? Maybe deploying applications under different names (like described here: home.java.net/node/676678) might be a good solution in my case? Does anybody have an experience in deploying one hundred times the same application with different configurations that way?
Thanks,
Olgierd
if you use the GF 3 stack you will notice that this product was refactored to take benefits from the OSGi architecture.. So now you can deploy bundles or even .wab files (web application bundles) in GF3.This architecture will enable you to :
But in your question I can't understand how to model different processes with a single Java Virtual Machine.... One Virtual Machine means 1 process (at the OS level) and you can't do anything against that..
The OSGi platform brings you many advantages regarding SLA requirements for your applications and for software modularity... HTH Jerome
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With