http - How do I create a chat server that is not driven by polling? -
I have created a simple chat server that is powered by client polling. Customers send requests for data every few seconds, and receive any new messages, as well as information that their partners are still connected.
Since the client is running on the mobile platform (Iphone), I is looking for ways to get rid of voting, which quickly turns the battery into drains. I have read that it is possible to have an essentially open http connection, but it is not understood how to use this technique in practice. I am also wondering if such connections are sufficiently stable to use in mobile settings.
The ideal scenario would be that the server only sends data to customers, when an event that affects them (like Peer is posting a message or leaving).
Is this an attempt to complete on http, or do I have to write my own protocol on TCP? How difficult it would be to adapt XMPP to my needs (there are some special features in my chat server that I have to implement easily).
How about pushing technology?
Comments
Post a Comment