The best way to do this is to change your session storage to a database. then just count the number os sessions stored. That way no additional http requests... one additional database query... and as sessions expire.. i.e. user has left the rows should be removed...
Alistair 2008/6/8 kayoone <[EMAIL PROTECTED]>: > > having every user ping the server every X seconds with an ajay request > is not that good performance wise... > imagine you have 2000 concurrent users on the site, that would result > in bazillion more requests per minute (if you ping every 15sec for > example). > > You have to save the time of the last click of a user and update that > time with every action he performs. So if you want to get the online > users > you just fetch all the users where the last_click time is in the last > 20 minutes for example, everybody whose last_click time is older is > offline then. > Thats a common practice to solve this problem. > > > -- Alistair Stead Senior Interactive Developer Mobile: +44 (0) 7788 107 333 Email: [EMAIL PROTECTED] WWW: designdisclosure.com The information contained in this email is confidential and may contain proprietary information. It is meant solely for the intended recipient/recipients. Access to this email by anyone else is unauthorised. If you are not the intended recipient, any disclosure, copying, distribution or any action taken or omitted in reliance on this, is prohibited and may be unlawful. Please consider the environment before printing this e-mail. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~----------~----~----~----~------~----~------~--~---
