Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How does the live, real-time typing work in Google Wave?

I'm sure Wave doesn't poll the server every millisecond to find out if the other user has typed something... so how can I see what the other person is typing as they type? And without hogging the bandwidth.

like image 703
Sudhir Jonathan Avatar asked May 31 '09 16:05

Sudhir Jonathan


2 Answers

Persistent HTTP, Comet

Keep your HTTP connection alive and send characters as they are typed

*Edit in 2014: also, take a look at WebSocket and HTTP/1.1 Upgrade header. Browsers started implementing this around 2010, so I'm adding this to original answer.

like image 145
Yoni Roit Avatar answered Oct 17 '22 22:10

Yoni Roit


They probably use Web Sockets, aka server-sent events: http://www.w3.org/TR/websockets The underlying protocol can be found (as a draft) at the IETF.

Update: it doesn't seem WebSockets has any implementation yet; and a video from Google I/O (go to 11:00) talks about a long lived HTTP GET request.

like image 6
Thomas Broyer Avatar answered Oct 17 '22 22:10

Thomas Broyer