oldbard Posted June 24, 2012 Posted June 24, 2012 Hi, the game is here: http://codeelf.com/games/grid/ Also, similar question for this game: http://celtruler.com/games/test/ Both games currently use a lot of Ajax requests to update data on the server. Is there a better way to do this, perhaps using sockets or some other method? Quote
a_bertrand Posted June 25, 2012 Posted June 25, 2012 Web sockets are... so far more of a prototype of wished feature than something I would really use. Why? Because most (enterprise) firewalls would block them, and because they would require some... more work on the server side. Yet, if you manage to make them work and you don't have issues with the firewall of your customers, they are certainly better smarter than AJAX. On the other side, you can do Ajax like google do, they keep the connection for like, 30-60 sec, and use it to send updates through it during this time, after which, they drop the connection and build a new one (that's for the updates from the server). For the updates of the client, they open a new AJAX nearly every time the client need to send some updates. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.