multiple processes, one model

goran at krampe.se goran at krampe.se
Wed Mar 29 07:26:26 UTC 2006


Hi all!

Chris Muller <chris at funkyobjects.org> wrote:
> When each Seaside session has its own copy of the model, multiple
> processes are not an issue, and Magma sees them as independent clients
> so the concurrency detection works too.  It is the only approach with
> potential to scale to multi-machines / processes as described on the
> Magma Seaside page.
> 
>  - Chris

I have been toying with having a single readonly session shared by
multiple Seaside sessions (Processes) and then have a smaller pool of
writeable sessions which I grab one from when I want to make
modifications (commits).

In my scenario this could actually work out pretty simple because I use
a Command pattern anyway (all of my modifications are done using
messages to the top object which in turn instantiates "Commands" that
are applied), and most users will tend to mostly read and not write, or
at leat write pretty seldomly.

That means I could get away with one large (after a while it would get
large unless I stub things out) readonly model + say 10 partial models
(one for each writeable session in the pool).

So 1+10 models for serving say 150 concurrent sessions seems much better
than 150 models. :)

regards, Göran


More information about the Magma mailing list