-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Moran,

Moran Ben-David wrote:
>> Apache httpd and Tomcat do not share any memory, so there is not any
>> explicit memory-copying going on.
> 
> How do they share data?  For example, when Tomcat creates an HTTP
> response containing 50k of HTML, I assume that data exists in Tomcat's
> memory space.  How does that data move over to apache's so it can
> respond to the HTTP request.  If the apache and tomcat process don't
> use any shared buffers (in linux) wouldn't that mean the data is
> copied form tomcat's memory space to apache's?

Yes, but not explicitly. There's no memcpy or anything like that being
performed by either Tomcat or Apache httpd -- it's all being done by the
TCP/IP stack.

> I guess that actually answers my question: the data is (probably)
> copied between tomcat's memory space and apache's (under ajp13).
> However, would there be room here for an optimization that uses a
> shared_buffer to communicate b/w apache tomcat on the same machine?

That process is already significantly improved through the use of the
loopback network interface. Remember that everything goes through the
TCP/IP stack, even when the two processes are on the same machine. Most
TCP/IP stacks have magic loopback devices to improve
localhost-to-localhost communication. It is in the TCP/IP stack where
your proposed optimization must take place, not in Tomcat or Apache httpd.

> However, from my understanding that can also be achieved through the
> "jni" mod_jk worker.   Do you know of any good documentation on that
> worker?

Nobody uses the jni worker anymore. The jni worker was intended to be an
embedded Tomcat instance running from the mod_jk module, and is only
supported in very old versions of Tomcat (3.3 IIRC).

>  Are there limitations in doing this with newer tomcat's?

Yes: it is limited in that it cannot be done. I'll bet you could hack it
to work, but it would really suck.

> Again.. my apologies for not trying this out first.. I'm only asking
> because there seems to be very little in-process documentation out
> there (that doesn't reference very old tomcat versions).

That's because the JNI options are not applicable to new versions.

- -chris

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHEn6D9CaO5/Lv0PARAoJBAJ0XAYO3wxRhDv4ZI9UegS0f9yX6rgCfWgD5
5xuaroN1YOCJ06+dV0AgveE=
=QnjV
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to