From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Kesav Kumar
Sent: Tuesday, July 17, 2001 12:32 AM
To: Orion-Interest
Subject: RE: Clustering..
<snip>
This mechanism have one drawback: If you keep an object in session and later some place you get the reference of the object and modify the object the modifications won't get reflect across islands:
Example:
UserInfo info = new UserInfo() // Some kind of
object...
info.user_name = "oldName";
session.setAttribute("UserInfo", info) // At this point the info is
replicated to all cluster islands
//Later at any place of your code
UserInfo info =
session.getAttribute("UserInfo");
info.user_name =
"newName"; //This change won't replicated
//In some other program
UserInfo info =
session.getAttribute("UserInfo");
System.out.println(info.user_name) // If the request comes to the
same cluster where the modification occures you will get the "NewName" if the
request goes to another cluster you will get "oldname"
Work Around: If you do any kind of modifications to your session objects put the objects again into session using setSessionAttribute. Keep one thing in mind that when ever you call this setSessionAttribute method the session info is going to replicate across different islands.
<MS>I've noticed this too, is this according to the jsp/servlet specifications or just container specific? When you are using JSP's it is very awkward having to call setAttribute() after every <jsp:setProperty name="myObject" property="*" /> or similar.
This is the same problem which I faced and lead me to write my own session management.
Kesav Kumar Kolla
Voquette Inc
650 356 3740(W)
510 889 6840(R)
Voquette...Delivering Sound Information
-----Original Message-----
From:
[EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On
Behalf Of Duffey, Kevin
Sent: Monday, July 16, 2001
12:39 PM
To: Orion-Interest
Subject: Clustering..
Hi all,
I know how to cluster Orion..after all, its pretty easy. What I
want to know
from someone who knows..is if in the 1.5.2
version all the bugs (if there
were actually any) are
worked out. Does Orion cluster with no problems? Does
session fail-over and application context fail-over work without a
hitch
(providing all objects in the session and/or
context are serializable)? If
you have two machines in
an island, and the session begins on one..does it
automatically "copy" any session info to the other box for you? If you
shut
that box off, and all requests go to the 2nd box,
does the session still
exist with all objects still in
memory?
I take it each and every request on a clustered box requires the
session to
be duplicated exactly as is to the other
machine? If this is the case, at
what "rate" does Orion
copy out the session and anything else to another
server
in the island (or to each and every server in the island)? How does
this affect performance as compared to using just a single box
without
clustering..is it 2 to 3 times slower because of
not only copying its
session to one or more boxes, but
also having to deal with "merging" other
boxes
context/session information into its own? Or does a cluster simply
create the objects and session stuff on each box as its
generated (thus..its
not some background thread that
copies session info when it has time to
other
boxes)?
Is it equally good at clustering on the EJB tier (so scalability
on the EJB
tier or the front-end WEB tier is equally as
easy)?
Thanks.