On Mon, 21 May 2001, Synovic, Michael wrote:

> > Hi,
> > 
> > I've be researching struts for a little while now and can not figure out
> > how struts handles scalability and system failure issues, since the entire
> > state management system seems to rely on using the session object.
> > 

You can use either request scope or session scope.  If you don't need
internationalized messages, there is no need for sessions at all.  If you
do, then you need a session per user with a Locale object in it.

For general scalability and system failure support, Struts relies on the
features of whatever application server you are running your application
on.

> > Is there something I am missing? If struts only maintains state through
> > the session object, what happens in a web clustered environment? Is struts
> > assuming a one server configuration only? Or is struts assuming some kind
> > of web affinity (sticky IP) solution for web farms, but if so how does
> > struts handle issues like when a web server goes down, or when it needs to
> > come off line for maintenance? 
> > 

The servlet spec is very clear about this scenario.  In a distributed web
application, at any point in time, all requests for a specific session
MUST be handled by the same JVM.  The application server is free to
migrate a session around, but only "in between" requests.  This guarantees
to the application developer that session attributes work the same in a
distributed and non-distributed environment (although, of course, your
session attributes need to be Serializable in a distributed environment).

Beyond that, support for various failover and controlled shutdown cases
are "quality of service" features of individual application servers.  They
are not controlled or managed by Struts or any other development
framework.


> > Mike Synovic
> > 
> > 
> 

Craig

Reply via email to