W3C home > Mailing lists > Public > whatwg@whatwg.org > May 2010

[whatwg] WebSockets: what to do when there are too many open connections

From: Perry Smith <pedzsan@gmail.com>
Date: Fri, 14 May 2010 09:59:33 -0500
Message-ID: <5A39AE3F-D9F7-420F-A4D1-6699B7231235@gmail.com>

On May 13, 2010, at 9:00 PM, Boris Zbarsky wrote:

> On 5/13/10 7:55 PM, Perry Smith wrote:
>> Its not that hard and it won't happen that often.  And it gives
>> the javascript authors more control and choices.
> 
> If a situation doesn't happen often, then historically speaking most authors will have no provisions to handle it.  Try browsing the web with non-default colors set in your browser, with a default font size that's not 16px, or with a 13px minimum font size set.  These aren't exactly hard things to deal with, but authors just don't deal with them.  I sincerely doubt they'd deal with the possibility of a websocket not actually opening unless is was _very_ common.
> 
> Maybe the spec should say that attempts to open a websocket should have a 50% chance of failing even if there's no good reason for it, just so it is in fact common for opening to fail?  ;)  (No, that's not a completely serious proposal, but it's not completely facetious either; it would take something like that for authors to handle failure properly.)

That wasn't what I meant.  "it won't happen often" I meant, the need to have a queueing mechanism written in Javascript.  i.e. most applications of web sockets would want to just fail.  The few that do not, can roll their own.
Received on Friday, 14 May 2010 07:59:33 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:23 UTC