You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by jean-frederic clere <jf...@fujitsu-siemens.com> on 2001/01/25 16:38:27 UTC

TOMCAT + mod_jk or mod_webapp

Hi all,

I am wondering where to put put my energy mod_jk or mod_webapp.

Looking the repositories I have found the following:

./jakarta-tomcat/src/native/mod_jk/apache1.3/mod_jk.c
./jakarta-tomcat/src/native/mod_jk/apache2.0/mod_jk.c
./jakarta-tomcat/src/native/mod_jserv/mod_jserv.c
./jakarta-tomcat-4.1/connectors/apache-1.3/mod_webapp.c
./jakarta-tomcat-4.0/connectors/apache-1.3/mod_webapp.c                         

Does this means that tomcat-4.x will use mod_webapp instead mod_jk?

Cheers

Jean-frederic

Re: TOMCAT + mod_jk or mod_webapp

Posted by "Craig R. McClanahan" <Cr...@eng.sun.com>.
jean-frederic clere wrote:

> Hi all,
>
> I am wondering where to put put my energy mod_jk or mod_webapp.
>
> Looking the repositories I have found the following:
>
> ./jakarta-tomcat/src/native/mod_jk/apache1.3/mod_jk.c
> ./jakarta-tomcat/src/native/mod_jk/apache2.0/mod_jk.c
> ./jakarta-tomcat/src/native/mod_jserv/mod_jserv.c
> ./jakarta-tomcat-4.1/connectors/apache-1.3/mod_webapp.c
> ./jakarta-tomcat-4.0/connectors/apache-1.3/mod_webapp.c
>
> Does this means that tomcat-4.x will use mod_webapp instead mod_jk?
>

That is the current plan -- although there has been some discussion of people
wanting to get together and port the mod_jk connector to Tomcat 4.0 as well.
The primary difference in approach is that mod_webapp knows what a web
application is about, and communicates the configuration information from
web.xml back to the Apache side of the connector.

If you'd like to work on mod_webapp, the stuff in the "connectors" directory is
where to look (for the Java side as well right now, until the code stabilizes
some, so we don't break the nightly build on Tomcat 4.0).

If you'd like to work on mod_jk for Tomcat 4.0, speak up here and see if others
are interested as well -- we can easily make room in the CVS tree for the Java
stuff (and share the C side with Tomcat 3.x to ensure commonality).  I can
provide some suggestions on how to integrate the Java side of this into the rest
of Tomcat 4.0, but won't be able to do anything in the way of coding for it.

>
> Cheers
>
> Jean-frederic
>

Craig



Re: TOMCAT + mod_jk or mod_webapp

Posted by "Pier P. Fumagalli" <pi...@betaversion.org>.
jean-frederic clere <jf...@fujitsu-siemens.com> wrote:

> Hi all,
> 
> I am wondering where to put put my energy mod_jk or mod_webapp.
> 
> Looking the repositories I have found the following:
> 
> ./jakarta-tomcat/src/native/mod_jk/apache1.3/mod_jk.c
> ./jakarta-tomcat/src/native/mod_jk/apache2.0/mod_jk.c
> ./jakarta-tomcat/src/native/mod_jserv/mod_jserv.c
> ./jakarta-tomcat-4.1/connectors/apache-1.3/mod_webapp.c
> ./jakarta-tomcat-4.0/connectors/apache-1.3/mod_webapp.c
> 
> Does this means that tomcat-4.x will use mod_webapp instead mod_jk?
> 
> Cheers
> 
> Jean-frederic

This is more or less the plan. The protocol on which mod_webapp is built is
especially targeted to solve issues coming from the concept of
web-application in the new Servlet specification. It's not very performant
right now, it's kinda crappy, but it works, and my effort is for 100%
compliancy with WatchDog (the Servlet test suite).

I heard voices of people willing to port the AJP-13 to Tomcat-4.0, so that
would allow to use ALSO mod_jk with the 4.0 release, but I'm not planning to
work on that part...

    Pier

-- 
Pier Fumagalli  <http://www.betaversion.org/>  <ma...@betaversion.org>
----------------------------------------------------------------------------


[PATCH] Ajp13 dsp file revisited

Posted by Keith Wannamaker <Ke...@Wannamaker.org>.
This patch corrects the MS VC include directory in the new 
3.3 directory structure:

http://www.apache.org/~keith/jk/dsp.txt

Keith


Re: TOMCAT + mod_jk or mod_webapp

Posted by "Pier P. Fumagalli" <pi...@betaversion.org>.
Dan Milstein <da...@shore.net> wrote:

> Pier,
> 
> Glad to hear that you're willing/interested in integrating the mod_webapp
> protocol into mod_jk.  I don't know exactly how easy it would be, but I
> think it *would* be a big win (you'd get lots of tested C code, load
> balancing for free, easy upgrade path for users, etc).

Heyhehyhey... Slow down... I said that I won't even THINK ABOUT IT until
mid-march as I have to move to the other side of the planet, and want to
have a quality release of mod_webapp before that.... :) :) :)

But we can start talking about it after that :)

> I've recently discovered that I'll have a chunk of free time in March.  I'll
> try to use some of that to document/explain what is going on in the mod_jk C
> code (which I am pretty close to understanding, currently).  Maybe we can
> work together then to try to support the mod_webapp protocol with mod_jk.
> BTW, I do think the mod_jk C code, for all it's initially forbidding lack of
> comments, is actually very intelligently thought out.

Well, I never understood how that thing works... You know, we old C farts
are kinda stubborn. After my "kid" mod_jserv I stopped thinking in C, and so
far it still didn't come back...

> Let's keep our eye on this going ahead.

Let's talk about it after I move to London :) :) :)

    Pier

-- 
Pier Fumagalli  <http://www.betaversion.org/>  <ma...@betaversion.org>
----------------------------------------------------------------------------


Re: TOMCAT + mod_jk or mod_webapp

Posted by Dan Milstein <da...@shore.net>.
Pier,

Glad to hear that you're willing/interested in integrating the mod_webapp
protocol into mod_jk.  I don't know exactly how easy it would be, but I
think it *would* be a big win (you'd get lots of tested C code, load
balancing for free, easy upgrade path for users, etc).

I've recently discovered that I'll have a chunk of free time in March.  I'll
try to use some of that to document/explain what is going on in the mod_jk C
code (which I am pretty close to understanding, currently).  Maybe we can
work together then to try to support the mod_webapp protocol with mod_jk. 
BTW, I do think the mod_jk C code, for all it's initially forbidding lack of
comments, is actually very intelligently thought out.

Let's keep our eye on this going ahead.

-Dan

> The protocol has been designed especially for solving webapp-related issues,
> and its implementation can be easily (???) done in JK, but I never
> understood that code at all. Right now I want to have a "final release" of
> WebApp before March the 10th (as I'll be returning to Europe shortly after
> that). After that, I'll be more than happy to consider anything, but right
> now I have only 6 weeks and a lot of stuff to write :) :) :)
> 
>     Pier
> 
> --
> Pier Fumagalli                                 <ma...@betaversion.org>
> I'm selling my Sony Vaio Z505. Check out <http://www.betaversion.org/~pier/>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
> For additional commands, email: tomcat-dev-help@jakarta.apache.org

-- 

Dan Milstein // danmil@shore.net

Re: TOMCAT + mod_jk or mod_webapp

Posted by Pier Fumagalli <pi...@betaversion.org>.
Dan Milstein <da...@shore.net> wrote:
> 
> Great to hear that you want to contribute some work!
> 
> [...]
> 
> OTOH, Pier is writing a brand new plugin/protocol/connector for TC 4
> (mod_webapp), which promises some big improvements (mainly in ease of
> configuration and compliance with the servlet spec).

Correct...

> It's not clear how mod_jk / mod_webapp will coexist in the future --
> personally, I'd like to see the best pieces from both merge, but I don't know
> when/if/how that's going to happen.  If he's interested in help, you could
> presumably work with him there.

The protocol has been designed especially for solving webapp-related issues,
and its implementation can be easily (???) done in JK, but I never
understood that code at all. Right now I want to have a "final release" of
WebApp before March the 10th (as I'll be returning to Europe shortly after
that). After that, I'll be more than happy to consider anything, but right
now I have only 6 weeks and a lot of stuff to write :) :) :)

    Pier

-- 
Pier Fumagalli                                 <ma...@betaversion.org>
I'm selling my Sony Vaio Z505. Check out <http://www.betaversion.org/~pier/>


RE: TOMCAT + mod_jk or mod_webapp

Posted by Keith Wannamaker <Ke...@Wannamaker.org>.
Hi, Dan, thanks for your informative response.

|File Upload was badly broken with mod_jk/ajp13 in both 3.2 and 3.x 
|-- some basic bugs have been fixed in both of those repositories,
|but have not yet been released.  Just so you know.

I am working with source from jakarta-tomcat cvs head, but so far 
I have only been working with mod_jk/ajp12 .. I had discounted ajp13
because of its 'experimental' tag, but I'll turn my focus there.

|Where in RFC 1867 (which I just spent a while looking through)
|does it discuss the issues you mention (early response by the 
|servlet + consumption of the body)? 

At the end of 1867 s 5.2, it specifies that the 'web server' has
the perogative to reject large uploads.  My opinion is that a servlet
should have the same perogative.  However, in ajp12, servlet responses
are checked only after the entire request body (file upload) has been 
written to the server.  I think this architecture is the 'basic bug' 
to which you refer.  A failure case (again ajp12) would be:

mod_jk/ajp12                         servlet
------------                         -------
sends headers			       reads headers, decided rq is too big
sends 8k body chunk
sends 8k body chunk                    do some work
sends 8k body chunk .. send blocks
  because tcp buffer is filled.      sends friendly html response
                                     closes socket
send unblocks with ESHUTDOWN,
  return 500

Worse, mod_jk/ajp12 does not consume the remaining bits after the
socket shutdown above.  Apache considers that the incoming bits are
a persistent connection and begins parsing a new request from the
uploaded file bits mid-stream.

So I had tweaked ajp12 to use select and to pay attention to servlet
responses, but it appears that is the basic architecture of ajp13,
so I'll take a look at it and see if it succeeds in this case.

Many thanks again,
Keith W.

Re: TOMCAT + mod_jk or mod_webapp

Posted by Dan Milstein <da...@shore.net>.
Great to hear that you want to contribute some work!

As to mod_jk / TC 4.0, that's a complicated question.  mod_jk is currently used by a lot of people, and will continue to be for a while (I think), since I expect a lot of people to continue to be using the 3.x source in the near future.  So any work you do there will definitely be greatly appreciated.  It's also been around for a while, and isn't changing much day-to-day (and is thus a good place for you to work).  I am working on an AJP13 connector for TC 4, which will allow people to use the mod_jk plugin with TC 4.

OTOH, Pier is writing a brand new plugin/protocol/connector for TC 4 (mod_webapp), which promises some big improvements (mainly in ease of configuration and compliance with the servlet spec).  It's not clear how mod_jk / mod_webapp will coexist in the future -- personally, I'd like to see the best pieces from both merge, but I don't know when/if/how that's going to happen.  If he's interested in help, you could presumably work with him there.

Some questions:

Where in RFC 1867 (which I just spent a while looking through) does it discuss the issues you mention (early response by the servlet + consumption of the body)?  Or is that in a different RFC?  Or is it more in the nature of a bug in the current code?  Just so I can understand clearly.

Do you have test cases where this fails?  If so, what version of TC, what web server and what connection protocol (e.g. ajp12, ajp13) were you using?

File Upload was badly broken with mod_jk/ajp13 in both 3.2 and 3.x -- some basic bugs have been fixed in both of those repositories, but have not yet been released.  Just so you know.

Once I have a better understanding of what you're looking to do, I can help steer you towards the right place in the mod_jk C code (or the servlet engine-side java code).

-Dan


Keith Wannamaker wrote:
> 
> Hi,
> 
> I'd like to extend mod_jk to let servlets be RFC 1867 compliant.
> Specifically, when transmitting a (large) body of a request
> on the ajp connection:
> 
>  a) mod_jk should be prepared to receive a response from
>     the servlet at any time during the send of the body; and
>  b) mod_jk should consume the remainder (if any) of the
>     request body if a servlet response is received prior to
>     the completion of the transmission of the body.
> 
> Two question-
> 
>  a) Does anyone have up-front input about making such a change?
>  b) Is there a better place to do the work than on mod_jk in jakarta-tomcat?
>     (ie jakarta-tomcat-4.x?)
> 
> Thanks for the input,
> Keith
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
> For additional commands, email: tomcat-dev-help@jakarta.apache.org

-- 

Dan Milstein // danmil@shore.net

RE: TOMCAT + mod_jk or mod_webapp

Posted by Keith Wannamaker <Ke...@Wannamaker.org>.
Hi,

I'd like to extend mod_jk to let servlets be RFC 1867 compliant.
Specifically, when transmitting a (large) body of a request
on the ajp connection:

 a) mod_jk should be prepared to receive a response from
    the servlet at any time during the send of the body; and
 b) mod_jk should consume the remainder (if any) of the
    request body if a servlet response is received prior to
    the completion of the transmission of the body.

Two question-

 a) Does anyone have up-front input about making such a change?
 b) Is there a better place to do the work than on mod_jk in jakarta-tomcat?
    (ie jakarta-tomcat-4.x?)


Thanks for the input,
Keith


Re: TOMCAT + mod_jk or mod_webapp

Posted by cm...@yahoo.com.
> Hi all,
> 
> I am wondering where to put put my energy mod_jk or mod_webapp.

I would say both :-) 
Each has certain advantages, and the best solution is to combine the 2.

My preference is to add the protocol used by mod_webapp to the list of
protocols supported by mod_jk. I think that gives us the most - mod_jk is
quite stable and tested ( and ported on many platforms/web servers
). People who prefer stability can still use the Ajp12 protocol ( the most
tested ), while people wanting the latest/greatest protocol can use the
webapp protocol. 

Everyone will be best served by merging the features and combining what's
best in the 2 - instead of "choosing" between them. 

( BTW, the C side has little to do with the Java side - mod_jk + webapp
can be used with whatever version of tomcat you like - all versions of
tomcat will benefit of the improvements in the C side )



Costin

( BTW, I keep repeating that - the only way to get out of the current
situation is to merge what's best. That should be the main goal if
we want to move forward as a community - but that's a different story. )
 



> 
> Looking the repositories I have found the following:
> 
> ./jakarta-tomcat/src/native/mod_jk/apache1.3/mod_jk.c
> ./jakarta-tomcat/src/native/mod_jk/apache2.0/mod_jk.c
> ./jakarta-tomcat/src/native/mod_jserv/mod_jserv.c
> ./jakarta-tomcat-4.1/connectors/apache-1.3/mod_webapp.c
> ./jakarta-tomcat-4.0/connectors/apache-1.3/mod_webapp.c                         
> 
> Does this means that tomcat-4.x will use mod_webapp instead mod_jk?
> 
> Cheers
> 
> Jean-frederic
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
> For additional commands, email: tomcat-dev-help@jakarta.apache.org
> 

-- 
Costin