I highly doubt this will make much sense since I just woke up after 4 hours of sleep.
You need to look at comet as a
thread that sleeps. In reality it is just a http post that is taking a very very very very LONG LONG LONG LONG LONG time to get data back to the client. There is nothing special about it. It is like the Ranch when it is getting hammered with posts, it just takes awhile to retrieve them. The browser is patient and will sit there and wait to hear back from that server so far far away.
In that chat example, you have some serverside process that is listening for chat conversations to be returned. Some serverside process has to be notified to send data back to the client. That notification does not have to come from that other user. It could be anything.
Those two users are not connected in any way, so just because it involoves two users means nothing. That other user makes a post to the server, the server detects this post, and fires off a process on the server. That process is picked up by the "listening" Ajax call, and sent back to the client. That listening Ajax call is just checking the server for some sort of "flag" that says something has changed. Could be looking at a database for records or some variable. It does not care what sets this "flag". It could be some granma playing canasta in a chat room or it could be a calendar reminder fired off by a serverside process.
With comet the user has to have that open conection to the server, there is no magic way to push data down to the client without it. [Unless you look into flash/applet technologies] One bad thing about comet is that it clogs up one of the connections to the server at all times. Now why is this bad, IE has by deafult to only allow two connections open to your domain at one time. So that means there is only one connection to download images or other information. There are ways around that, but that is another story.
Eric