Re: [hybi] Reliable message delivery (was Re: Technical feedback.)

Greg Wilkins <gregw@webtide.com> Mon, 01 February 2010 20:17 UTC

Return-Path: <gregw@webtide.com>
X-Original-To: hybi@core3.amsl.com
Delivered-To: hybi@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id 31A213A6981 for <hybi@core3.amsl.com>; Mon, 1 Feb 2010 12:17:57 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.454
X-Spam-Level:
X-Spam-Status: No, score=-2.454 tagged_above=-999 required=5 tests=[AWL=0.145, BAYES_00=-2.599]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 6budS0Ds9JN6 for <hybi@core3.amsl.com>; Mon, 1 Feb 2010 12:17:56 -0800 (PST)
Received: from mail-bw0-f224.google.com (mail-bw0-f224.google.com [209.85.218.224]) by core3.amsl.com (Postfix) with ESMTP id 09D5C3A697A for <hybi@ietf.org>; Mon, 1 Feb 2010 12:17:55 -0800 (PST)
Received: by bwz24 with SMTP id 24so863799bwz.29 for <hybi@ietf.org>; Mon, 01 Feb 2010 12:18:28 -0800 (PST)
Received: by 10.204.5.75 with SMTP id 11mr85721bku.20.1265055507600; Mon, 01 Feb 2010 12:18:27 -0800 (PST)
Received: from ?10.10.1.11? (60-242-119-126.tpgi.com.au [60.242.119.126]) by mx.google.com with ESMTPS id 15sm2298652bwz.4.2010.02.01.12.18.23 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 01 Feb 2010 12:18:26 -0800 (PST)
Message-ID: <4B673702.8040206@webtide.com>
Date: Tue, 02 Feb 2010 07:18:10 +1100
From: Greg Wilkins <gregw@webtide.com>
User-Agent: Thunderbird 2.0.0.23 (X11/20090817)
MIME-Version: 1.0
To: Salvatore Loreto <salvatore.loreto@ericsson.com>
References: <4B62C5FE.8090904@it.aoyama.ac.jp> <4B62E516.2010003@webtide.com> <5c902b9e1001290756r3f585204h32cacd6e64fbebaa@mail.gmail.com> <4B636757.3040307@webtide.com> <8449BE19-3061-4512-B563-02973FBB707B@apple.com> <5c902b9e1001292310l5442d476n8375139f3480671b@mail.gmail.com> <26D406E7-2319-476E-9ADF-80D84200C270@apple.com> <5c902b9e1001292333k79569316lf371938c9aa766@mail.gmail.com> <128BFD31-9835-47B1-B7A9-F20F5CDA8D8C@apple.com> <20100130144936.GD19124@shareable.org> <5c902b9e1001301552n6efb7969o34110373e3ab4945@mail.gmail.com> <4B672C9D.9010205@ericsson.com>
In-Reply-To: <4B672C9D.9010205@ericsson.com>
X-Enigmail-Version: 0.95.7
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 7bit
Cc: Hybi <hybi@ietf.org>
Subject: Re: [hybi] Reliable message delivery (was Re: Technical feedback.)
X-BeenThere: hybi@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: Server-Initiated HTTP <hybi.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/listinfo/hybi>, <mailto:hybi-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/hybi>
List-Post: <mailto:hybi@ietf.org>
List-Help: <mailto:hybi-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/hybi>, <mailto:hybi-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 01 Feb 2010 20:17:57 -0000

Salvatore Loreto wrote:
> 
> just to make order in this particular thread discussion
> 
> as I understood, two different problems have been arised
> 
> 1) "safely" shutdown a websocket connection.
>      The possibility to lose data while closing a TCP connection is a
> well-known problem,
>      as has also been discussed and described in the thread.
> 
>      Some people think there is a value to add to the spec gracefully
> shutdown the websocket connection.
> 
>      However I haven't seen a clear consensus on it.
> 
>      So please if you have an opinion on this, speak up!!!


I've spoken enough in support of orderly close... so I 'll let others
speak up here.



> 2) what happen if/when the connection is lost; this can happen for
> several different reasons:
>    e.g. a NAT restarting, the mobile terminal go out of network coverage
> etc.
> 
>     here we have different sub problems in my opinion:
>     2.1) how detect as fast as possible that the connection has been lost
>     2.2.) what to do after have reconnected.
>     Are those something people think is important to spend cycles on??

Yes.

I think that it is very important for an endpoint and/or application to be
able to distinguish between:

   a) orderly close in response to an application request, in which case
      the app probably should not attempt to re-establish.

   b) close in response to an error (message too large or similar),
      in which case the app/endpoint should refrain from any
      retries it might otherwise have attempted.

   c) close in response to an idle timeout.
      in which case the endpoint should not recreate the connection.
      But an application might, if presence is required.

   d) unexpected close due to some failure (or undisclosed intermediary
      timeout).     In this case an application may wish to retransmit
      messages (either all recent idempotent messages or un-acked
      non-idempotent messages).

   e) inability to open a connection due to no connectivity.  In this
      case an app might do a retry at regular intervals

   f) inability to open a connection due to permission denial from the
      server.  In this case, the app probably wants to alert the user
      of the error.


I think that the endpoint code will be able to do very little
of the handling of reconnections and retries, simply because
it does not know enough about the messages.   So the application
will have to decide about reconnects and retransmits, but it
currently does not have the information needed to make those
decisions.


I think fail fast is also desirable, but I'm not sure it is so
desirable that I'd advocate a regular keep-alive message just
failure detection.  But if keep-alive messages are required to
keep open connections through transparent proxies, then it could
be 2 birds with 1 stone.

cheers