I want to set up a push-server system on my hosting provider. However I can't run java or install tomcat, so comet and dwr is out of the question.
The system should be able to run sort-of a real time "chat" so when a user sends a message it's instantly displayed to everyone else. Cannot use polling or 1-second refresh on the page as that will create MASSIVE mysql overhead if there are 1000-2000 users logged in (2000 mysql requests per second)
Here's a "solution" i have in mind:
set up a perl listening server with sockets. a php script connects to the socket and perl can now "push" to php which displays the results to users.
............... ............... ...______
user1..-->..php..-->..|........... .|
user2..-->..php..-->..|...perl.... |
user3..-->..php..-->..|_______|
i want to set up for ability to expand (i.e. start with 20-30 users and ability to support 5000+users)
any help on how to set up the perl script would be appreciated. or if there are more elegant/simpler/more efficient solutions, i'd like to hear them too.
thanks
The system should be able to run sort-of a real time "chat" so when a user sends a message it's instantly displayed to everyone else. Cannot use polling or 1-second refresh on the page as that will create MASSIVE mysql overhead if there are 1000-2000 users logged in (2000 mysql requests per second)
Here's a "solution" i have in mind:
set up a perl listening server with sockets. a php script connects to the socket and perl can now "push" to php which displays the results to users.
............... ............... ...______
user1..-->..php..-->..|........... .|
user2..-->..php..-->..|...perl.... |
user3..-->..php..-->..|_______|
i want to set up for ability to expand (i.e. start with 20-30 users and ability to support 5000+users)
any help on how to set up the perl script would be appreciated. or if there are more elegant/simpler/more efficient solutions, i'd like to hear them too.
thanks
Comment