[Catalyst] Session handling under heavy usage

Yuval Kogman nothingmuch at woobling.org
Wed Mar 22 20:19:08 CET 2006


On Wed, Mar 22, 2006 at 10:42:54 -0800, apv wrote:
> On Wednesday, March 22, 2006, at 10:30  AM, Yuval Kogman wrote:
> >The probability that two simultanous requests will both want to
> >*write* to the session data is low, so that's why this locking crap
> >hasn't been done yet (it's slow and hard).
> 
> Oh... that is not so good and comes as a bit of a shock to hear you say it
> since I've been admiring your work on Catalyst for a long time.

tee hee

> The probability of race conditions in any kind of read/write
> system is very low but since it absolutely will happen given
> enough time, locking is mandatory for anything that could be
> considered professional.

I agree, but there is a big problem with this: we need per session
locking which is very difficult to scale. When an app reaches the
stage where it grows to the scale that ajax requests do happen
simultaneously and edit the session in both requests, then that site
needs to be looked at, to find a locking solution that makes sense.

I know *how* to implement this, right down to the interface, but:

a. there are higher priorities
b. i think that in the name of righteousness people might use this
even when not necessary


> Or else it should have a big note in the BUGS which says:
> 
> "May infrequently drop, erase, or corrupt your session data at seemingly
> random, and impossible to predict intervals."

It currently says that ;-)

> Your fan (and fan of safe data),

Wow!

For the record I'm also a fan of safe data...


-- 
 ()  Yuval Kogman <nothingmuch at woobling.org> 0xEBD27418  perl hacker &
 /\  kung foo master: /me supports the ASCII Ribbon Campaign: neeyah!!!

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


More information about the Catalyst mailing list