Friday, February 29, 2008
In an alternate to Ajax, or along with it, "Comet" is a server-pushing technology, as we know this as one of the Web Patterns.
Ajax is a technique to asynchronously contact server to get data and update UI (Microsoft calls this as Partial Page Update). In this way of programming, you can get the latest data from the server manually calling the server either by UI events or periodical polling to the server. Assume that your web application has stock market update, in order to get latest update, it needs to poll the server periodically. This will make overhead in both client and server side in one way. For example, assume that there are thousands client periodically polling the server at the same period, however there is no new information/state change in the server. Its an overhead for server.
Comet tries to resolve this by server "broadcasting" state change/new information to the listening clients. Its a king of "Server Push" pattern.
Labels: architecture, comet, web