[Seaside] purge expired sessions

Sebastian Sastre ssastre at seaswork.com
Sun Feb 22 18:56:56 UTC 2009


oh I missed that, you're right. #unregistered sends #expire. It's working like a
charm.
The only thing I don't agree is the decision on when to do it. Rigth now is
decided by this policy:
shouldCollectHandlers
	^ handlersByKey size \\ 10 = 0
which guarantees some waste of RAM and I prefer a time to time policy that well
tuned will not. I've added a timer on a service responsible object that sends
every X minutes this housekeeping:
	WARegistry allSubInstancesDo:[:anApplication|
		anApplication unregisterExpiredHandlers] 
greetings,
sebastian


> -----Mensaje original-----
> De: seaside-bounces at lists.squeakfoundation.org 
> [mailto:seaside-bounces at lists.squeakfoundation.org] En nombre 
> de Julian Fitzell
> Enviado el: Sunday, February 22, 2009 15:32
> Para: Seaside - general discussion
> Asunto: Re: [Seaside] purge expired sessions
> 
> It should send #unregistered or something... no?
> 
> On Sun, Feb 22, 2009 at 7:27 PM, Sebastian Sastre 
> <ssastre at seaswork.com> wrote:
> > ah true. Now I get it. Strange that 
> #unregisterExpiredHandlers is not taking
> > advantage of sending #expire to the the iterated sessions. 
> For me it would be
> > interesting because I override expire (sending always super 
> expire) in
> > subclasses of WASession releasing stuff.
> >
> > Thanks for the tip Julian,
> > best,
> > sebastian
> >
> >
> >> -----Mensaje original-----
> >> De: seaside-bounces at lists.squeakfoundation.org
> >> [mailto:seaside-bounces at lists.squeakfoundation.org] En nombre
> >> de Julian Fitzell
> >> Enviado el: Sunday, February 22, 2009 14:53
> >> Para: Seaside - general discussion
> >> Asunto: Re: [Seaside] purge expired sessions
> >>
> >> WARegistry>>unregisterExpiredHandlers ?
> >>
> >> It should be called periodically as sessions are created (whenever
> >> #shouldCollectHandlers returns true).
> >>
> >> So expired sessions will not be garbage collected 
> immediately but they
> >> should eventually be released.
> >>
> >> Julian
> >>
> >> On Sun, Feb 22, 2009 at 6:28 PM, Sebastian Sastre
> >> <ssastre at seaswork.com> wrote:
> >> > Hi there,
> >> > I'm on seaside 2.8 and I'm seeing expired sessions not
> >> being collected. Of
> >> > course #clearHandlers helps but that isn't helpful in a
> >> production serving image
> >> > because it will force expiration of sessions of users
> >> navigating the app.
> >> >
> >> > I wanted to know if you do (or why you don't) make a method
> >> to call from time
> >> > that will remove from the WARegistry handlers dictionary
> >> the expired sessions.
> >> >
> >> > Or maybe better, why not to remove sessions from there
> >> immediately after they
> >> > expire so unuseful things can be collected ASAP.
> >> >
> >> > thanks,
> >> >
> >> > sebastian
> >> >
> >> > _______________________________________________
> >> > seaside mailing list
> >> > seaside at lists.squeakfoundation.org
> >> > 
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
> >> >
> >> _______________________________________________
> >> seaside mailing list
> >> seaside at lists.squeakfoundation.org
> >> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
> >
> > _______________________________________________
> > seaside mailing list
> > seaside at lists.squeakfoundation.org
> > http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
> >
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside



More information about the seaside mailing list