Hi all,

Recently I've been experimenting with ways to speed up the bootstrap
of the Java runtime to support mass virtual hosting.

I thought I'd share my findings here.

Here's a summary of the use case:
- you're hosting hundreds or thousands of apps, published under
corresponding virtual hosts
- you can't pre-declare, pre-load and pre-start them all
- you need to activate an app when you get a request for it
- and clean up its resources after the request has been processed.

and the mechanisms I experimented with:
- bootstrap the part of the runtime that's independent of any app, once
- load the app composite on the first request for it
- cache the app composite model
- activate/deactivate its components + start/stop them for each request
- do that for each HTTP request handled by our ServletHost

The good news is that supporting that only involves a few little
tweaks to our usual runtime node startup sequence.

I'm planning to share that experiment with the community for review there:
http://svn.apache.org/repos/asf/tuscany/sandbox/sebastien/java/vhost/

and hoping to help generate ideas to better address this type of use case.

I'm really busy at work this week but will try to commit this code
when I find some time over the weekend.
-- 
Jean-Sebastien

Reply via email to