Hello, well... I have been trying to achieve this task with not very good results. Hopefully someone can help me.
I want to do the following thing:
I have a webpage with authentification, and it is a virtual lab to control a motor remotely, so only ONE person is allowed to enter to my website, otherwise a lot of people could use the motor at the same time... whick is not possible.
Well, what I want to do, is:
person A enter the site... now he has a time of T seconds before beeing disconnected
person B wants to enter:
_if A is using the site, B is first in the queue to enter the site
_if A is disconnected, B enters
person C wants to enter
_if A is using the site and B is in the queue, C enters to the queue as number 2
I don´t need you to give me the code to do this (unless you really want to), but I would like to know some references to read so I can do this.. because I really don't know how.
Thanks
enqueue users
Moderator: General Moderators
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
sounds like a "given each user a token" while you "record the order of tokens" kind of deal. You could use a page refresh or something similar (Ajax maybe) that does a pulse check on the user queue updating their position information as well as helping automate the token decay without the need of a cron.
- Ambush Commander
- DevNet Master
- Posts: 3698
- Joined: Mon Oct 25, 2004 9:29 pm
- Location: New Jersey, US