[Seaside] Concurrent requests from multiple sessions

Philippe Marschall philippe.marschall at gmail.com
Fri Mar 6 17:09:58 UTC 2015

On Fri, Mar 6, 2015 at 11:17 AM, wilwarin <Ondrej.Altman at seznam.cz> wrote:
> Hi all,
> Currently we are developing a web application in Seaside, and it is
> necessary for us to work in VAST. The application runs as a Windows service,
> and for a few days we are facing the following issue:
> - At one moment there are two users (let's call them 'A' and 'B') logged in
> in the application, so we have two different sessions.
> - 'A' requests a page with a long list of objects obtained from DB2, so it
> takes a number of seconds to get the results.
> - Less than one second after 'A''s request, 'B' requests another page, for
> instance an easy static page.
> - For the time the 'A''s request is handled, the 'B''s browser window
> freezes and waits for those number of seconds mentioned above.
> We searched really a lot, but still the results are not what we would
> expect. This issue makes as confused, because in the future the application
> should serve hundreds of users with very similar combinations of requests.
> We didn't know, where our problem lies, so we tried a similar test with a
> single page with a difficult calculation inside. Then we tried the same in
> Pharo to exclude the problem in VAST. Both with the same results.
> Is there anything we are missing? What should we do to achieve a parallel
> (or kinda better) processing of requests?
> Thank you very much for your responses.

The only Seaside limitation I'm aware of is a lock around every
session. So only one request of 'A' can be processed at any given
time. However this should not affect any other users. The lock is
there because sessions and components are mutable. Use the code from
Sven to verify Seaside and your webserver are not the issue.

In theory it is possible for Seaside to stream the response to the
client while rendering it on the sever. This should consume less
resources on the server (because not whole response has to be build in
the server) and should improve the feel of responsiveness on the
client because the browser can start rendering before the response if
fully received. However this requires server support, I don't know the
state of this in VA. Also you can't display an error page in case of
an exception. Also you have various other options like pagination our
loading via JavaScript.

Using multiple images which Seaside is possible but has pros and cons.
On the positive side you can make use of multiple CPUs and have better
availability. On the negative side you'll have to implement sticky
sessions (we support faking jvmRoute) and you'll have to juggle
multiple images.


More information about the seaside mailing list