I totally forgot to add a link as for implementing comet.
There is Comet Daily and they have a 比较 online. The comparison emphasizes on maturity of the different implementation. It's pretty interesting and should get you started.
We've implemented a solution for IIS/ASP.NET, 网络同步. It includes the javascript client, which plays nicely with jQuery. Technically, since it's the Bayeux protocol, any Bayeux client should work just dandy. The same protocol can also be found in the dojo library.