4 ms·
Agreed. Etherpad is sending a new POST request pretty much every keypress. Considering the HTTP headers and cookies, that's around 500-1k of data per letter typ
by axod 18y ago
Agreed. Etherpad is sending a new POST request pretty much every keypress. Considering the HTTP headers and cookies, that's around 500-1k of data per letter typed. At google docs volume that would be a lot.
(Total data sent when I press 'j' was 1073 bytes of HTTP headers, and 123 bytes of program data).
The other reason may be that whilst it looks really cool to see each other typing, is it really needed?
Does look quite slick though :)
- drm237 18y agoI think they're using comet for the requests so while the activity may be high when people are typing, during breaks it should be very low as opposed to ajax polling. I do think that real-time is really needed for many applications. The few times I've tried collaborating on a google doc, I've given up because the lag introduced the possibility of overwriting each others edits. That and just a general annoyance with saying "Do you see it yet?" over and over.
- marcus 18y agoWell that's a stupid way to handle it... keep the socket open... read about Comet. http://en.wikipedia.org/wiki/Comet_ http://en.wikipedia.org/wiki/Comet_(programming)
- axod 18y agoAre you being sarcastic? Does anyone know what comet is? Please explain exactly how you can SEND multiple packets over time from browser to server without sending more HTTP requests, and without using any java applet/flash. It's a shame people seem to have started saying "use comet" without understanding what it means. Did you read that link?
- abacad 18y agoConnection: Keep-Alive
- lacker 18y agoWithout any java applets or flash?
- axod 18y agoYes, you can specify keep-alive (Although some browsers refuse to do it in an XHR - Opera for one). However, you still send the full glut of HTTP headers every single request.
- marcus 18y agoTrue, you still need the headers, what you don't need is a new connection every key stroke. Establishing a new TCP connection is a relatively high cost network item (between all the Acks and Syns you need 3 messages have to go back and forth for it to establish), keep the connection alive, the stuff will run a lot faster.
- blasdel 18y agoYou can null out the default headers on a XHR so they don't get sent.