Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jetty-dev] Using jetty embedded to create a multiprocess web application server

Hi,

We have some decent new and powerful servers in where we want to put together several corporate web applications built in house. Some of them are quite stable and some others are under heavy development still, with updates nearly everyday. Right now we are using JBoss, we deploy the .war to the servers deploy directory and that's it.

This approach has several problems as JBoss is a single process, because we want the apps to share the server but be independent otherwise:
  • We would like to reinstall, stop and restart an application, even with datasources and db drivers included WITHOUT affecting the other apps on the same server.
  • After several redeployments we face the PermGem error (even tweaking the java startup options) and we are forced to shut down the JBoss server AND all applications at once.
So the ideal web server for us is one that shares the server BUT NOT the same process for all webapps:
  1. It creates a parent process listening on port X.
  2. For each .war that it encounters on a deploy directory it creates a NEW PROCESS to serve that webapp context.
  3. For each request that goes to AppX it RESENDS it to the process serving AppX individual webapp (with a socket a connector, whatever).
  4. If a .war changes the parent process is killed and restarted clean (ZERO PermGem space problems!)
  5. For N webapps we will have N+1 processes running them (including the main port listener/deployer process)
  6. We can kill or reconfigure each app without affecting others anyhow.
  7. (We could even restart the main process without affecting the child processes if we make it smart enough.)
Is there something like this in the jetty project?
If not: 
Are there the building blocks we need?
I guess we need at least a "ConnectionResendHandler" that resends the http request to another port (or host:port) and get the response back from there to the client.

Thanks for your help,

Jose



Back to the top