Hi guys..
I'm one of the other folks that have voiced some desire to implement
distributed sessions and distributed servlet container functionality in
Tomcat (although I only want to work on 4.0!). I'd love to collaborate
with others on the design and implementation. More below:
Craig R. McClanahan wrote:
>
> The biggest problem I have with integrating session replication into
> AJPxx is that it means this will only work if you're running Apache
> connected, versus when Tomcat is running stand alone. Even in that
> environment, does the Apache instance really need to know what's going
> on? Wouldn't it just be a case of updating the cookie to include the
> new "router" information when you migrate a session from one JVM to
> another?
>
> Personally, I'd like to see a session migration mechanism that works
> between the "back end" Tomcat instances. There are probably few
> enough of those (in most use cases) that you can maintain a spiderweb
> of persistent connections that is used only to communicate session
> migration information.
>
I'm still wrestling with how it's best designed, but I agree that it
probably has nothing to do
with AJP. It should work no matter what web server you're using. I
believe that it can.
Also, the idea of a spiderweb of TCP connections is what I had in mind
also, since then if one
machine goes down or is unreachable, the system knows almost
immediately, and can
take appropriate action with the remaining servers in the cluster. I
like it.
> Just as a small technical detail -- the servlet spec says that an
> application *must* run within a single JVM unless it marks itself as
> <distributable/> in the deployment descriptor -- don't forget to check
> for that.
>
Yep, this is a feature of "distributed servlet containers" as defined by
the Servlet 2.2 and
2.3 specs.
> As to what version of Tomcat to work on, no matter what the future
> holds it seems like the current 3.2 code base is not really
> appropriate for major innovation. I would only point out that the 4.0
> architecture has an interface (org.apache.catalina.Store) behind which
> session migration stuff can easily be hidden -- as well as support for
> persistence, swapping, and other advanced features -- without
> modifying the remainder of the servlet container.
>
I'm looking into that already, and have been following all discussion about
making (any version of) Tomcat distributable. But, I haven't begun
designing/coding yet (mostly due to lack of time).
Anyone who has ideas: I'm listening, and I'd sure like to discuss
how you think we should make this work.
--
Jason Brittain
Software Engineer, Olliance Inc. http://www.Olliance.com
Current Maintainer, Locomotive Project http://www.Locomotive.org