I have been searched for this question for a long time. How to implement Comet in database side?

To support Comet, we'd better have a web server stack that supports asynchronous operation. So, Apache is not a option. There are some open source web server such as tornado can do asynchronous http handling. This is in web server level.

In database level, how to make web server know that some event happens in database? There should be a asynchronous way to let web server know that something updated in database. Polling is not a option.

Is there any example available?

link|improve this question

50% accept rate
feedback

1 Answer

Trying to achieve real-time data delivery over HTTP to many users using polling will result in important bandwidth consumption. So, using a Comet server for HTTP streaming could be indeed necessary.

Concerning the database, you don't mention a particular database. If you want to be generic, I think the only approach available is polling. But, this is more than acceptable because you distribute data from your database to a single client, the Comet server and the Comet server and the database server will be connected via a LAN so bandwidth consumption is not an issue. Also, you can configure a acceptable polling interval to have good latencies.

You can check Migratory Push Server (http://migratory.ro). It is a very scalable Comet server able to push real-time data up to 1 million concurrent users with under 100 millisecond latencies and it has an off-the-shelf JDBC adapter able to push live changes from any standard database. While the JDBC adapter uses polling, it is careful designed using triggers to have minimum impact on the database system and achieve low data latency.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.