> 2- Sacha.
> a- create in VM CMP that is just a hashmap of HTTPSessions. NO
> DATABASE CALLS JUST IN VM. the net result will be jetty making
> calls to the one node serving http sessions (he doesn't know
> which one just uses the code above). It should be reasonably
> fast as you only need the network stack to serialize from one vm
> to the other and there is no DB work involved AT ALL. Can you
> create that CMP engine? the only finder should be the find by primary key.
>
> b- when that is working and he is working with it, you can get
> really fancy and say "you have a replicated EJB HTTPSESSIONS on
> your own node, we populate the cache as the loadbalancers send
> requests your way (they can be really dumb) and we use ejbLoad to
> bring the state here, register with JavaGroups for multicast
> notifications of state change, the colocation will be done
> automatically with the stuff that you and bill put in the proxies
> etc etc....
>
> does this make sense? can you indulge me and try this?
Marc,
Yes, I can try this (and anyway, I will have to: you propose this since
September... I can't make this last longer... ;) )
While very elegant, the problem I have with this solution concerns
scalability.
With the current SFSB code, if you have 10 nodes, state is not owned by the
all 10 nodes. Instead, we create sub-partitions. For example, we would have
5 sub-partitions, each containing 2 nodes, and each node would contain its
own state + the backup of the other node in its same sub-partition. Thus,
while the number of node grows, the load is totally linear and we do not end
up with each node having to store in-VM the state of 10 nodes! This imply
that when you work with a particular SFSB, its stub *knows* which are the
members of the sub-partition and will not ask for its state to node 7, if
only node 1 and 2 own its state.
In the case you describe, the findByPrimaryKey call can be run on any node.
Thus, the location (read "location" not "colocation") problem i've described
in my previous post: how to make the findByPrimaryKey call nice enough to
address the call a good node of the cluster for a particular sessionId.
As for caching, optimisations, ... it would be possible only when working
with a well-parameterized hard load-balancers that would always direct calls
to the same node: the own that owns a copy of the sate. in this, no network
call is necessary to get the state. But if the calls are made on a "bad"
node, each time an invocation comes in, the persistence engine will need to
contact a "good" node to get the state.
Otherwise, we need to implement a distributed-cache engine. Currently, this
distributed-cache (hit-miss) engine is only available *inside* a
sub-partition.
You follow me?
Cheers,
Sacha
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development