Implementing Comet on the database-side
问题 This is more out of curiosity and "for future reference" than anything, but how is Comet implemented on the database-side? I know most implementations use long-lived HTTP requests to "wait" until data is available, but how is this done on the server-side? How does the web server know when new data is available? Does it constantly poll the database? 回答1: What DB are you using? If it supports triggers , which many RDBMSs do in some shape or form, then you could have the trigger fire an event