4 ms·
web sockets or, in most browsers, long polling. long polling is easy to implement and they must already have the infrastructure built out since they have chat.
by kwamenum86 15y ago
web sockets or, in most browsers, long polling. long polling is easy to implement and they must already have the infrastructure built out since they have chat...silly Facebook.
[edit]
just took a closer look at the network activity. this really is the worst way to implement this feature. polling several times a second, sending back a bloated response, and updating much more of the DOM than necessary. this is just terribly hacky. probably done very quickly at the last minute though.
- wgx 15y agoZuck maybe wrote it himself for fun?
- pork 15y agoStop kidding yourself.
- wgx 15y agoAmused that my comment was down-voted when It's widely known that Mark would work 'hands on' on the codebase [1] as recently as last year. [1] http://techcrunch.com/2010/04/14/apparently-mark-zuckerberg-still-writes-code/ http://techcrunch.com/2010/04/14/apparently-mark-zuckerberg-...
- datasink 15y agohttp://kottke.org/11/09/zucks-gonna-write-code http://kottke.org/11/09/zucks-gonna-write-code This excerpted anecdote indicates it was mainly a leadership gesture to rally the troops. Still pretty cool that he'd bother, though.
- flexd 15y agoWhy would he stop writing code? I can understand he might be too busy (and it might be getting too advanced?) but I code because I like it, not because it one day might allow me to make money. I do not plan on stopping whatever happens.
- pork 15y agoBecause he was never a particularly talented coder, and because FB now has some top-tier talent that can do a far better job at coding that he can. Besides, contrary to popular belief, running a $100 billion company probably doesn't leave you with much time.
- flexd 15y agoWhy would he stop writing code? I can understand he might be too busy (and it might be getting too advanced?) but I code because I like it, not because it one day might allow me to make money. I do not plan on stopping whatever happens.
- drivebyacct2 15y ago"most browsers"? Not really. Between Firefox and Chrome's market share, the "right way" is far more in line with WebSockets. Facebook doesn't use WebSockets. It's not even an issue of browser support but rather the lack of proper progressive enhancement on Facebook's part. Also, sorry, but I laugh at the notion that "long polling is easy to implement". Even if it is on some level, it doesn't make the right strategies any harder (nor does it excuse the flaws or performance issues of current long-polling techniques), nor does it excuse the lack of progressive enhancement.
- kwamenum86 15y agoWhat's difficult about long polling? It's a solved problem. There's an abundance of battle-tested frameworks available and it's a proven technique. Also, Facebook already has the infrastructure in place - they have the expertise in-house. But even if this were a startup writing the feature from scratch it would only be slightly more complex than an async request.