geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Jencks <>
Subject web clustering componentization
Date Fri, 27 Jan 2006 00:36:43 GMT
I have some ideas about how to set up web clustering in terms of  
geronimo modules and configurations and connections between gbeans.   
I've talked with Jules and Jeff about this and think that they agree  
that this is a good starting point so I'll try to describe it and  
possibly even help implement parts of it.

There are quite a few questions I'm going to ignore, such as EJB SFSB  
clustering and the new session module James and Dain wrote and how it  
might relate to the web clustering stuff.  We have to start somewhere.

For me, one of the most important factors is that the clustering  
solution be pluggable, in particular that you be able to run geronimo  
without any clustering classes.  This means that each clustering  
solution needs to be packaged in one or more Configurations or  
modules and that communication to the clustering module be done  
through interfaces defined in a more core geronimo module.  It also  
implies that the all the web containers should communicate with the  
clustering implementation through the same interface(s).

I'm proposing that the interfaces be SessionManagerFactory and  
SessionManager, the factory being able to provide SessionManager  
instances.  I see the SessionManagerFactory being deployed as a GBean  
and made available to web containers through a gbean reference.

My understanding is that for both jetty and tomcat, the web app  
context needs an instance of a session manager.  Therefore I propose  
giving each web app context a reference to the session manager  
factory gbean.  At an appropriate lifecycle point it can get the  
session manager it needs.  In Tomcat IIUC a host or engine can also  
be where a session manager is configured.  We don't really need to  
support that directly since we can in our deployer push a reference  
to whatever "global" session manager may be configured down into each  
web app context.

I see the jetty and tomcat builders installing references to  
appropriate session manager factory gbeans.  IIUC there is a lot of  
configuration possible for at least WADI, and we should be able to  
support running multiple session manager configurations at once, as  

- there can be a default session manager (say WADI) configuration,  
and the name of its session manager factory gbean can be configured  
in the web app builder(s).  This will be used for distributable web  
apps that don't specify in their plan a different session manager  
factory gbean.

- a web app plan can contain an explicit reference to a specific  
session manager factory or an entire session manager factory/WADI  

- we can use a namespace driven xml-reference builder to construct a  
wadi configuration inside a SMF reference (maybe :-)

There are a couple loose ends I can see and probably lots more I can't:

-- I imagine we want to be able to have pluggable session managers  
for non distributable apps or in the absence of clustering.  I don't  
know if we'd want 2 "default" session manager factory gbeans  
available, one for cluster and one not, or if there is a better  
solution. Having 2 and having the builder decide which you get seems  
simplest at the moment.

-- We need to be able to support the non-wadi existing tomcat- 
specific clustering, and it is unlikely this can be coerced  
effectively into the proposed geronimo SMF and SM interfaces.  We  
could support this with another gbean and interface, but at the  
moment I'm leaning towards giving the web app context either a  
separate gbean reference to the tomcat specific clustering or  
directly installing the tomcat solution into the web app context.

Comments?  Flames?

david jencks

View raw message