[Catalyst] Announcement - New session plugins

Yuval Kogman nothingmuch at woobling.org
Wed Nov 2 00:58:56 CET 2005


By the way, a to be implemented aspect is concurrency safe sessions,
with two models:

The simple model is locked access. Basically, the hash returned by
$c->session is locked using Hash::Util.

If the app requests write access to the session, an exclusive lock
is acquired, the session data is reloaded, and the hash is unlocked.

At any time the user may unlock the session data (at which point it
will be dumped to disk). This will happen automatically at finalize
time.

This first model will be built into Catalyst::Plugin::Session as a
optional feature.


The more complicated, but potentially better performing model is, at
finalize time, to lock, then check that the data hash hasn't changed
since we loaded it. If it didn't change we simply overwrite it and
unlock. If it did change we load the new version, and trigger
a callback with the alien version, the current version, and the
common ancestor so that the user can merge.

This might be useful for apps which take a long time to process
requests, or something like that.

I won't implement it till I'm asked to do so. If I do implement this
it will be a plugin.


These two variants will require a new plugin,
Catalyst::Plugin::Semaphores, which will try to support
engine/platform independent within a running catalyst application.

That will take a while, since I don't have much time for non work
nowadays. If this is urgent for you in some way please prod me, and I'll try
to get to it faster.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.rawmode.org/pipermail/catalyst/attachments/20051102/66c1673c/attachment.pgp


More information about the Catalyst mailing list