> When you work with a SFSB, the client keeps a
> reference on the bean. This
> reference (stub) contains the list of target server
> that own a copy of the
> state (generally a subset of the whole cluster
> members). Fine.

hehe "why I love EJBs by Marc Fleury"

What you are describing and what Julian wanted is the capacity to do a 
"findByPrimaryKey(id)" on the session id.... when I say that the SFSB will work I mean 
"just the part that replicates state in VM across nodes".

The "persistence engine" here should be a JavaGroups based replicator, you have most 
of that logic built.

> Now, we have a location-problem: how could the
> "getStateForSession" be
> performed will minimal impact (i.e. minimize network
> round-trip delays).
> Either we use a dummy solution that will first find a
> bean with a given
> session id and then get its state or we use a
> customized-way. The first
> solution is a LEGO solution i.e. we use what is
> already present and build a
> new concept but may not be really really smart in
> term of performance
> (imagine the work needed for each HTTP call!)
> 
> For the customized-way, we may have some kind of
> service (we can implement
> it as a SLSB, of a JMX service) that Jetty contact to
> get the state of a
> given sessionId. As Jetty could reuse this service,
> only a single call to
> this service is needed for each http call:
> getStateForSession. Any
> optimization is then done in this service. Two
> implementation ideas (at
> least):
> 
> 1) Each node contains a kind of lookup table
> (SessionId, Targets) which
> hold, for a given sessionId, the list of nodes that
> own a copy of the state.
> The service then contact, sequentially, each of these
> target until a working
> one is found (well, most of the time, the first will
> be ok). In the
> background, the SessionState service (already
> implemented for SFSB) is used.

Does the following make sense

come in with an Http request, you have a session. 
You lookup the Entity EJB, with the primary key of the session, if you have configured 
the bean to be replicated on the node where you are, then the first "ejbLoad" would 
dump the state on the target node, this is transparent and simple.

The entity semantic is what we need to locate an entity "httpsession" that exists 
across the nodes.  We can download the "ejbLoad" state and cache the state on that 
node, the refresh should be done with the SFSB way of propagating change to the 
cluster. It would be a custom persistence engine for EJB in JBoss.  I think it also 
shows the power of EJB in JBoss and how customizable they are.

We never really showed the power of externalizable interceptors and plugins 
persistence per bean, this is the time and place to do it. 

marcf

______________________________________________________________________
View this jboss-dev thread in the online forums:
http://jboss.org/forums/thread.jsp?forum=66&thread=6221

_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to