Perform Server push back to client
Posted 03 February 2013 - 02:36 PM
I have tried the Ape framework. But I dont understand it. It is all written in C. please some one helpp !!.
I also tried socket but I am new and I thinking of browsers that dont yet support it. By the way I have gone very far in the project and dont know how to slot in socket into the codes.
Posted 03 February 2013 - 05:31 PM
Otherwise you'll need to use either Long Polling, Short Polling or just page refreshing. None of them are that great when it comes to efficiency.
Long Polling will tie up server threads/resources for each person connected while it waits for new data.
Short polling won't tie up server threads, but creates a lot of traffic by constantly connecting, eating bandwidth and processing time.
Page refreshing is basically like short polling but worse because you're regenerating the entire page rather than just passing message data.
Long polling can be made more efficient if you write your own server to handle the connections rather than route them through something like Apache. Doing so properly can be a bit of a challenge though.
Did I help you out? Feeling generous? I accept tips via Paypal or Bitcoin @ 14mDxaob8Jgdg52scDbvf3uaeR61tB2yC7
Posted 03 February 2013 - 09:09 PM
Posted 03 February 2013 - 10:46 PM
There is actually quite a bit that can be done to cut down on the resource usage that short polling creates, but it does require fairly extensive knowledge about the tools you're using. You should be able to get the chat to support at least around a hundred simultaneous users, if you tweak it properly. Without it affecting the rest of the site, too much.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users