Hi everyone, I am trying to create a system that will allow me to update the browsers of each client (person) currently viewing a webpage.
Don't worry so much about why I am wanting to do this, but please critique my 2 solutions, and tell me which one is the most efficient (least amount of server strain) and can provide the fastest response times (lower latency, best simulation of "real time" updates)
Here are my 2 ideas, help me determine which is best please.
Can't insert an image, so please view this link to see the image!
Your diagrams do not mention of the type of protocol you're using. I'm assuming your socket deamon talks directly to the browser through a TCP connection? ie: you have a browser plugin such as flash on the browser?
Having the server push data to the clients is the best way to go. So a socket deamon would be more suited. However, you can also get HTTP to push data if you use a server that supports it. Usually this would be specialized servers, or specialized modules for HTTP servers. Usually the HTTP push is called Comet. If you are using a browser plugin such as Flash, then you should just go with TCP since you have the support already.
If you'll be handling a lot of users it probably is a better choice to use an existing game server, or IM server. I don't know any game servers, but an XMPP server such as EJabberd (Elang) or OpenFire (Java) can handle a hundred thousand or more TCP connections on one machine. You would just need to write a module to handle your game protocol, which you can define in XML.
An example of a game run over XMPP is http://www.chesspark.com/
Also look into Red5:
http://osflash.org/red5