[Seaside] Seaside and REST

Lukas Renggli renggli at gmail.com
Fri May 4 07:34:24 UTC 2007

> In general, I have tried to find the point at which sessions are
> created or looked up and confess I haven't been able to find it.  I
> would like to intercept that point and either always find the same
> session or simply skip the session creation.  I'm not too clear how
> to do that.

Looked up:
WAApplication>>handleRequest: aRequest

WAApplication>>handleDefaultRequest: aRequest

However keep in mind that a session can only handle one request at
once, because it contains state specific to a particular request. This
would lead to a major slowdown of your application. Moreover
backtracking of the states would completely be mixed up between the
different users. Also people would hit expired pages all the time,
because their callbacks get thrown out of the cache.

You should probably look at WARequestHandler, create a subclass and do
whatever you like in there. The file-library is also working like this
and it doesn't use session state.

> The simple example is a blog.  Seaside is great for editing the blog
> - lousy if your blog were to get digged.  At present I'd probably do
> the read-only part of the blog using HttpView and the editing part
> using seaside.

In my opinion this is not worth the trouble and complexity. Have a
look at my Pier web site that also includes a blog. I get around 500
unique visitors a day, not counting the search engines and feed
readers causing a major amount of traffic. At this point the requests
are easily handled by a single image creating a new session for every
user. The CPU load is mostly low. The slow response speed is dominated
by the slow internet connection, not by Squeak or Seaside.

Seaside 2.8 will use far less memory, as long as you don't use #call:
and #answer: excessively.


Lukas Renggli

More information about the Seaside mailing list