|we could imagine to have two layers...
|
|1) the persistence layer: we keep it as for SFSB with sub-partitions, ...
|
|2) the cache layer: here we implement a new, very simple,
|distributed cache.

ok, but I still think that making the cluster fully symmetrical will go to
good height and will keep the coding and *administration* so simple that it
would be silly not to do that in first iteration.

|The first time a findByPrimaryKey occurs, the cache will not contain the
|data and a "costly" find will determine who owns the state for the
|particular sessionid. The result is cached in the distributed cache.

yes, that cache is the EJB cache for the entity but the cache implementation
is really a distributed invm cmp.

|For the next invocations, if the call is performed on the same node (thanks
|to the nice load-balancers), the cache will use the local value.

I see you would have the load balancers be smart enough to know that a given
session is living on a node.

Even if we don't assume this for now it would work.  I am pretty sure that
we can go the distance with 5 mirror nodes in circle or the pyramid, the
circle has no network overhead the pyramid minimizes state synchro while not
limited front end machines.  My gut feeling is that circle is the way to go
it is simple to code and simple to administer (fully symetric), plus pyramid
is what SAP did.

|If the data
|is modified on another node, the cache is invalidated throught multicast.

For example that is simple. Also simple locking would be useful, must be
optional.


|Petit papa No�l...

Ouais ben c'est toi le petit papa noel... ecoute, rien que le CMP "hashmap"
qui ne fait RIEN du tout dans la DB serait un super "plus" pour jetty.  On
parle pyramide avec un CMP engine et le reste au dessus. Ensuite inVm
cluster et notif et on a un cercle... a tester gamin c'a peut aller loin,
pour pas cher, ca va etre simple et robuste. Simple robuste pas cher, j'aime
c'est notre domaine ca, le mass-technology... go mon para go

marcf
|
|> -----Message d'origine-----
|> De : [EMAIL PROTECTED]
|> [mailto:[EMAIL PROTECTED]]De la part de
|> Sacha Labourey
|> Envoy� : lundi, 24 d�cembre 2001 17:35
|> � : marc fleury; [EMAIL PROTECTED]
|> Objet : RE: RE: [JBoss-dev] distributed HttpSessions - advice...
|>
|>
|> > 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
|>
|


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

Reply via email to