Asynchronous Updates Between Web Clients

B

Bryan

I think it's okay to ask this question in this group, but if not please
point me to the correct one!

How does one go about doing asynchronous updates between two web
clients? Take Google Chat for example... how does Google Chat update a
chatter's chat window with text entered by the other chatter?
 
T

Tom Cole

Bryan said:
I think it's okay to ask this question in this group, but if not please
point me to the correct one!

How does one go about doing asynchronous updates between two web
clients? Take Google Chat for example... how does Google Chat update a
chatter's chat window with text entered by the other chatter?

It doesn't work client to client. It works client to server, both
clients communicating with the server as the bridge.

User types message into Client 1. Client 1 sends message to server.
Server stores message. Client 2 polls server for new messages, server
sends message to client 2. Client 2 displays message to User 2. User 2
enters message. Client 2 sends message to server....on and on and on.
 
E

evgenyg

It's either "pull" or "push".

"Pull" is a more standard out-of-the-box way when clients are pulling
server periodically for updates (usually, using Ajax requests on the
background).

"Push" is more advanaced technique where server is sending data to the
clients. It's supposed to be less resource-consuming but it's not
widely supported, some people might say it actually consumes even more
resources as it requires the server to keep open connections to all
clients. Google for "comet Ajax".
http://www.ajaxian.com/archives/comet-a-new-approach-to-ajax-applications,
for example
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,431
Messages
2,571,678
Members
48,796
Latest member
Greg L.

Latest Threads

Top