So a friend and I wanted to write a browser game using AJAX. This game may involve many players being on the same server at once.
Basically AJAX Long Polling (aka Comet) is sending a request to the CGI application via XMLHttpRequest the CGI application only responds to this request when a change has happened. Currently I have it checking for 30 seconds, if nothing changes it sends a message to browser saying it timed out and browser sends a new request. I only want to update the browser when a change has happened. Specifically in the "zone" that player may be in.
The issue is lets say each server can have 1000 concurrent players (this is just a number I'm throwing out there, its not necessarily how it will actually be). Each time someone is playing they open a new instance of the CGI executable. Obviously 1000 CGI executables running (I assume) would cause major strain on the server.
Is there any method to consolidate these into one instance somehow. I am new to this CGI stuff. Thanks.
Basically AJAX Long Polling (aka Comet) is sending a request to the CGI application via XMLHttpRequest the CGI application only responds to this request when a change has happened. Currently I have it checking for 30 seconds, if nothing changes it sends a message to browser saying it timed out and browser sends a new request. I only want to update the browser when a change has happened. Specifically in the "zone" that player may be in.
The issue is lets say each server can have 1000 concurrent players (this is just a number I'm throwing out there, its not necessarily how it will actually be). Each time someone is playing they open a new instance of the CGI executable. Obviously 1000 CGI executables running (I assume) would cause major strain on the server.
Is there any method to consolidate these into one instance somehow. I am new to this CGI stuff. Thanks.
Comment