velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Will Glass-Husain" <wgl...@forio.com>
Subject Re: Switching from PHP to Java/Velocity, Performance?
Date Thu, 13 Apr 2006 16:45:29 GMT
Stateless means that there is no in-memory user session.  Track the
user id in a cookie and retrieve any relevant info from the database
each request based on the user id and URL parameters.  This works well
for simple apps which don't need to remember much info from page to
page (I think of Flickr where most stuff is driven by URLs).  The
advantage of that without a user session in memory, you can send the
user request to any server in your cluster.  Not a requirement
(there's other ways to handle this problem) but just an idea.

You'll still need to use a cluster-based cache for database queries. 
This is where a lot of the performance savings can come in.  Possibly
you'd use an abstraction layer (like Spring or Hibernate) that will
let you change cache systems from a single server cache to a clustered
cache when you need to.

WILL


On 4/13/06, Dominik Bruhn <dominik@dbruhn.de> wrote:
> Hy,
> what does "stateless" mean? Does it mean that you don't save data between
> requests? So no caching?
>
> Thanks
> Dominik
>
> Am Thursday 13 April 2006 17:07 schrieb Will Glass-Husain:
> > Another point - if you do clustering you might consider a stateless
> > app.  (This is very common for PHP).  This solves a lot of the session
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: velocity-user-help@jakarta.apache.org
>
>


--
Forio Business Simulations

Will Glass-Husain
wglass@forio.com
www.forio.com

---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org


Mime
View raw message