NYCPHP Meetup

NYPHP.org

[nycphp-talk] aggregate views on serialized session data WAS: session size important?

Mitch Pirtle mitch.pirtle at gmail.com
Fri Apr 22 14:42:28 EDT 2005


On 4/22/05, csnyder <chsnyder at gmail.com> wrote:
> 
> Oh, and, pay special attention to your garbage collection routines - a
> session table with 800,000 stale records is not a pretty sight.

I never did get ADOdb's session_expiration stuff working to clean out
those records, and was forced to find another solution. I ended up
omitting reference to that altogether for an article on using ADOdb
and got in the John Lim Doghouse for it too (gasp!)

So, I've taken two different approaches to get the "There are X people
online" view:

1) store the online status as a boolean in the session table, and just
get counts
2) store the summary count data in memory, and update for each login/logout

I am unconvinced that one is better over the other, what does everyone
else think? #2 is certainly the fastest until you need multiple
servers, but #1 means you gotta count for every aggregate.

-- Mitch



More information about the talk mailing list