Return-Path: Delivered-To: apmail-jakarta-tomcat-dev-archive@jakarta.apache.org Received: (qmail 1625 invoked by uid 500); 7 May 2001 18:19:15 -0000 Mailing-List: contact tomcat-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: tomcat-dev@jakarta.apache.org Delivered-To: mailing list tomcat-dev@jakarta.apache.org Received: (qmail 1440 invoked by uid 1059); 7 May 2001 18:18:41 -0000 Date: Mon, 7 May 2001 11:18:41 -0700 (PDT) From: "Craig R. McClanahan" X-Sender: craigmcc@localhost To: tomcat-dev@jakarta.apache.org Subject: Re: [PROPOSAL Tomcat 4.x] Cluster In-Reply-To: <3AF6DC8B.3A538E6F@razorfish.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Rating: localhost 1.6.2 0/1000/N On Mon, 7 May 2001, Bip Thelin wrote: > [SNIP] > > Do we really need to lock a session for each request and then > replicate it? Sorry I might be confused, you mean a request for a > session or a request as in generating a new request object(http > request). If we assume that a session is only in use in one JVM at a > time(which I think we can assume) then that session doesn't need to be > locked it just needs replication when it's changed. > The servlet spec *requires* that all requests for a given session, at any point in time, be served by a single JVM. Whether and when replication happens seems to me like a quality of service issue for different implementations of the cluster -- I don't think a single answer will suffice here. I can conceive of everything from never migrating an existing session (essentially what the current "load balancing" support provides) to duplicating every single change live. An interesting question is, how do you detect when a session has been "changed"? Obviously, you can detect setAttribute/removeAttribute, but what about changes to the *internal* state of the attributes themselves that the session does not know about? (I understand, but haven't verified, that some J2EE containers expect you to call setAttribute again, on the same attribute, to tell the container that you've modified something). Craig