Search code examples
jquerycomet

Pushing information to users browser


I've this website where user can post some information & other users can comment on it, something like blog. The problem is .. suppose the user deletes the post, The post disappears from his browser only ans is still visible in others browser and if they comment on it the comment is getting saved in Database. This is un neccessarily filling my database.

Is there a way when a user deletes a post the post disappears from all the user browser where it is open ?

I tried using setinterval and refresh page content but it is increasing the load on my database.. Is there any other way do do this ? I have heard about comet but i'm unable to find any good tutorials on it


Solution

  • see http://socket.io/ the most popular open source real time solution

    Socket.IO aims to make realtime apps possible in every browser and mobile device, blurring the differences between the different transport mechanisms. It's care-free realtime 100% in JavaScript.

    there is http://frozenmountain.com/ that pretends to be leader but this one is not free

    Frozen Mountain Software is the industry leader in creating powerful commercial software libraries for real-time applications. Have a look at our products and discover how we can help you reduce your time-to-market and provide a solid back-bone for your next big project. Whether you want to push data from your server to web browsers, whip up an elegant REST API, build a fast-action multiplayer game, or add video chat to your application, we have libraries that will get you there quickly and painlessly.

    NB: in any case i believe you have to configure your server which might not always be possible