On Mon, 1 Oct 2001, Aaron Bannert wrote:

> What are the main advantages to using an in-process VM as opposed
> to an out-of-process VM bridged over some form of IPC (like
> mod_webapp/mod_jk/mod_jserv)?

Well, using in-process VM ( like mod_jk ) has many more benefits than
just reduced request/response latency.

Think about mod_perl - it's not just about 'faster CGIs'.

Right now the 'integration' between tomcat and apache is in a very
bad shape, the web server is used mostly as a proxy ( that adds a
significant overhead, apache+tomcat can be slower than tomcat standalone),
and to servle static files ( that are not password protected ).
Authentication can be done only by tomcat, and having apache send messages
to tomcat to authenticate for static pages would kill any performance.

In general, tomcat can't benefit from most of the features the web server
provides, and the web server can't benefit from any feature that tomcat
provides.

And the difference between a method call ( even via JNI ) and
IPC - it's pretty significant. But that's nothing compared with
the fact that via JNI you can avoid a lot of memcopy, use existing
( and optimized ) methods, have access to a powerfull API,
hook deeply into apache.

> I would imagine request/response latency is reduced, but how well does
> it scale, and how does it deal with issues of robustness?

It doesn't scale very well in a multi-process model, and it's as robust as
the Java VM. The main problem with multi-process model is the sessions.
But that can be resolved ( especially if you take advantage of mmap ),
and you still gain a lot from the deep integration.



Costin

Reply via email to