Elod Horvath wrote:

> "Craig R. McClanahan" wrote:
> > Because this question comes up occasionally, I would be interested in
> > understanding more about what might motivate a desire to have more than one
> > instance of the controller servlet.  Do you have some particular use cases in
> > mind where this would be helpful?
> >
>
> I'll take a stab at this...I've been meaning to for a while but
> have been too busy to sit down and write up my issues.
>

Elod, thanks (as always) for your thoughtful and detailed analysis.  I'm going to be
on an airplane a lot this week, so I'm going to spend a bunch of that time thinking on
these issues.  My original vision was that you would deal with these kinds of
complexity and (functional) scale issues by using multiple cooperating webapps.  Now,
I want to think about that a little more.

If I can define a non-backwards-incompatible way to implement multiple controllers
later (that we can all agree to), I'm game to go ahead with a 1.0 release now --
otherwise, this is definitely something that should be determined (one way or the
other) before a 1.0 final release.

In the mean time, I'm sure you've thought of a few of the following workarounds within
the current architecture, based on the idea of using separate webapps but establishing
a means of sharing stuff:

* Are you using container-managed security for login authentication?
  If so, the container might have "single sign on" features that manage
  the cross-app authentication questions.

* Most servlet containers (although not required by the spec) offer a means
  to declare a set of classes to be "global" to all web apps.  Normally, this
  is done by establishing a classloader that is the (shared) parent of the
  classloaders used for each web app.  One nice feature of such global
  classes is that global statics are shared -- so you can easily build an
  infrastructure for in-memory sharing between webapps.

* Alternatively, it is also feasible to use external mechanisms (databases,
  EJBs, etc.) to share information between webapps -- although there are
  likely to be performance impacts if the amount of shared data is high,
  and/or the rate of change to this data is high.

Craig


Reply via email to