[Catalyst] Session handling under heavy usage

Rusty Conover rconover at infogears.com
Wed Mar 22 20:22:20 CET 2006


On Mar 22, 2006, at 11:58 AM, Edric wrote:

> "May infrequently drop, erase, or corrupt your session data at  
> seemingly
> random, and impossible to predict intervals."
>
> that is exactly what happens to me :-(
>


The use of Hash::Merge might be helpful, but again you're going to  
have to find a contention algorithm that works for you app.  Last  
write wins might not always work.

You could also track the signature of the session when its loaded  
from the store,  versus the signature of the one currently in the  
store when you attempt to write, then merging the data if the session  
has changed before write.  Of course the store needs to respect  
locking while this operation is occurring.

Rusty
--
Rusty Conover
InfoGears Inc.
Web: http://www.infogears.com


> apv <apv at sedition.com> 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. 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. 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."
>
>
> Your fan (and fan of safe data),
> -Ashley_______________________________________________
> Catalyst mailing list
> Catalyst at lists.rawmode.org
> http://lists.rawmode.org/mailman/listinfo/catalyst
>
>
> Yahoo! Mail
> Use Photomail to share photos without annoying attachments.
> _______________________________________________
> Catalyst mailing list
> Catalyst at lists.rawmode.org
> http://lists.rawmode.org/mailman/listinfo/catalyst



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.rawmode.org/pipermail/catalyst/attachments/20060322/bde7738c/attachment.htm 


More information about the Catalyst mailing list