Re: [hybi] An alternative design for the web socket handshake
Jamie Lokier <jamie@shareable.org> Wed, 19 May 2010 02:45 UTC
Return-Path: <jamie@shareable.org>
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 A0EAD3A6ABD for <hybi@core3.amsl.com>; Tue, 18 May 2010 19:45:11 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.764
X-Spam-Level:
X-Spam-Status: No, score=-0.764 tagged_above=-999 required=5 tests=[AWL=-1.065, BAYES_50=0.001, MIME_8BIT_HEADER=0.3]
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 Ua5-cmTHvnGX for <hybi@core3.amsl.com>; Tue, 18 May 2010 19:45:10 -0700 (PDT)
Received: from mail2.shareable.org (mail2.shareable.org [80.68.89.115]) by core3.amsl.com (Postfix) with ESMTP id B119D3A67C1 for <hybi@ietf.org>; Tue, 18 May 2010 19:45:10 -0700 (PDT)
Received: from jamie by mail2.shareable.org with local (Exim 4.63) (envelope-from <jamie@shareable.org>) id 1OEZHD-0002yU-1A; Wed, 19 May 2010 03:44:55 +0100
Date: Wed, 19 May 2010 03:44:55 +0100
From: Jamie Lokier <jamie@shareable.org>
To: Erik Möller <emoller@opera.com>
Message-ID: <20100519024455.GG2318@shareable.org>
References: <AANLkTil9oCJifCkSdV6fSAfB8v1FIUr8tsxUXPC_xN_W@mail.gmail.com> <AANLkTilllRHES9ZCMczi5qnNslQyB-Xbmx2Pw6anGHQ9@mail.gmail.com> <AANLkTilXsRgFdhReP0uCLrzuCB6BbbFvUq746cQwdtSf@mail.gmail.com> <4FF8E1B1-6A5D-40B7-B722-EBBCF60F51AB@d2dx.com> <AANLkTiniLaBFjkIwfoKBjG7gGV-lEfShm4ew6yzC2DCT@mail.gmail.com> <20100518001145.GN20356@shareable.org> <9209C542-81B0-4FCE-9BA3-8C06BF0A1220@gbiv.com> <op.vcv63bpxr4mipi@emoller-pc.gothenburg.osa> <AANLkTilY1EUqIGliS41oDQmkyVWQ_dZbfOtn6TObKRwM@mail.gmail.com> <op.vcwq61izr4mipi@emoller-pc.gothenburg.osa>
MIME-Version: 1.0
Content-Type: text/plain; charset="iso-8859-1"
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <op.vcwq61izr4mipi@emoller-pc.gothenburg.osa>
User-Agent: Mutt/1.5.13 (2006-08-11)
Cc: "Roy T. Fielding" <fielding@gbiv.com>, Hybi <hybi@ietf.org>
Subject: Re: [hybi] An alternative design for the web socket handshake
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: Wed, 19 May 2010 02:45:11 -0000
Erik Möller wrote: > How to safely allow peer-to-peer communication in the browser I really > can't tell you. I'm fairly sure permitting UDP sends and receives of arbitrary on UDP port 80 would introduce no security issues to the existing services. Though it might start an ecosystem of new services with their own security issues. :-) Doing it properly probably involves negotiating a confirmed safe channel first. It sounds like SIP territory. > Why UDP even in a client-server model? Even though GWT Quake runs fine on > a LAN I think you'd quickly find the original was using UDP for a reason > should you deploy it on the net with some packet loss and resends. When > you're sending position updates to a client in a real-time game you don't > want to retry and make sure the position for time t gets delivered ok > before you send off the position for t+1... if it didn't get there in time > it's of no use to the client anyway, you're just concerned with the most > recent position (and if a position is lost it'll interpolate with > dead-reckoning). > > Sure, there are games out there that use TCP as transport, but if it's > feasible to use comes down to what sort of latency is acceptable in that > particular game. Though I don't have any source to back it up with I can > almost guarantee the majority of the shooters use UDP as transport. The problem with TCP in such applications isn't that an occasional update might arrive a bit too late to be useful. The problem is one delayed or lost packet delays *everything* afterwards until it recovers. Moreover, if there a few unlucky lost packets, recovery can be quite slow (e.g. 20 seconds). Interpolation of occasional lost updates can't be done - it becomes prediction for umpteen seconds. Commit-decisions (like kills in a shooter) must wait, positional accuracy is lost, and gamers get annoyed. It's usually fine on a fast LAN, if it's not overloaded, because TCP on a LAN detects the low latency and tends to retransmit things so quickly that you hardly notice. But since we tend to code for the internet these days, we tend to use UDP for that type of traffic whatever the network. (And in the old days, we used modems which are somewhat high-latency, so similar protocols were used even though it didn't go over the internet.) -- Jamie
- [hybi] An alternative design for the web socket h… Adam Barth
- Re: [hybi] An alternative design for the web sock… Mike Belshe
- Re: [hybi] An alternative design for the web sock… John Tamplin
- Re: [hybi] An alternative design for the web sock… Jamie Lokier
- Re: [hybi] An alternative design for the web sock… Maciej Stachowiak
- Re: [hybi] An alternative design for the web sock… Greg Wilkins
- Re: [hybi] An alternative design for the web sock… Maciej Stachowiak
- Re: [hybi] An alternative design for the web sock… Scott Ferguson
- Re: [hybi] An alternative design for the web sock… Maciej Stachowiak
- Re: [hybi] An alternative design for the web sock… Ian Hickson
- Re: [hybi] An alternative design for the web sock… Maciej Stachowiak
- Re: [hybi] An alternative design for the web sock… John Tamplin
- Re: [hybi] An alternative design for the web sock… Adam Barth
- Re: [hybi] An alternative design for the web sock… Roberto Peon
- Re: [hybi] An alternative design for the web sock… Jamie Lokier
- Re: [hybi] An alternative design for the web sock… Roberto Peon
- Re: [hybi] An alternative design for the web sock… Jamie Lokier
- Re: [hybi] An alternative design for the web sock… Greg Wilkins
- Re: [hybi] An alternative design for the web sock… Ian Hickson
- Re: [hybi] An alternative design for the web sock… Thomson, Martin
- Re: [hybi] An alternative design for the web sock… Brad Spencer
- Re: [hybi] An alternative design for the web sock… Adam Barth
- Re: [hybi] An alternative design for the web sock… Rob Sayre
- Re: [hybi] An alternative design for the web sock… Thomson, Martin
- Re: [hybi] An alternative design for the web sock… Jamie Lokier
- Re: [hybi] An alternative design for the web sock… Greg Wilkins
- Re: [hybi] An alternative design for the web sock… Maciej Stachowiak
- Re: [hybi] An alternative design for the web sock… Greg Wilkins
- Re: [hybi] An alternative design for the web sock… Jamie Lokier
- Re: [hybi] An alternative design for the web sock… Mike Belshe
- Re: [hybi] An alternative design for the web sock… Jamie Lokier
- Re: [hybi] An alternative design for the web sock… Maciej Stachowiak
- Re: [hybi] An alternative design for the web sock… Roberto Peon
- Re: [hybi] An alternative design for the web sock… Jamie Lokier
- Re: [hybi] An alternative design for the web sock… Greg Wilkins
- Re: [hybi] An alternative design for the web sock… Jamie Lokier
- Re: [hybi] An alternative design for the web sock… Roberto Peon
- Re: [hybi] An alternative design for the web sock… Jamie Lokier
- Re: [hybi] An alternative design for the web sock… Roberto Peon
- Re: [hybi] An alternative design for the web sock… John Tamplin
- Re: [hybi] An alternative design for the web sock… Roberto Peon
- Re: [hybi] An alternative design for the web sock… Scott Ferguson
- Re: [hybi] An alternative design for the web sock… Vladimir Katardjiev
- Re: [hybi] An alternative design for the web sock… Roberto Peon
- Re: [hybi] An alternative design for the web sock… Vladimir Katardjiev
- Re: [hybi] An alternative design for the web sock… Roberto Peon
- Re: [hybi] An alternative design for the web sock… Vladimir Katardjiev
- Re: [hybi] An alternative design for the web sock… Jamie Lokier
- Re: [hybi] An alternative design for the web sock… Jamie Lokier
- Re: [hybi] An alternative design for the web sock… Jamie Lokier
- Re: [hybi] An alternative design for the web sock… Roy T. Fielding
- Re: [hybi] An alternative design for the web sock… Erik Möller
- Re: [hybi] An alternative design for the web sock… John Tamplin
- Re: [hybi] An alternative design for the web sock… Erik Möller
- Re: [hybi] An alternative design for the web sock… Jamie Lokier
- Re: [hybi] An alternative design for the web sock… Greg Wilkins
- Re: [hybi] An alternative design for the web sock… Mike Belshe
- Re: [hybi] An alternative design for the web sock… Greg Wilkins
- Re: [hybi] An alternative design for the web sock… Jamie Lokier
- Re: [hybi] An alternative design for the web sock… Ian Hickson
- Re: [hybi] An alternative design for the web sock… Maciej Stachowiak
- Re: [hybi] An alternative design for the web sock… Ian Hickson
- Re: [hybi] An alternative design for the web sock… Maciej Stachowiak
- Re: [hybi] An alternative design for the web sock… James Graham
- Re: [hybi] An alternative design for the web sock… Thomson, Martin
- Re: [hybi] An alternative design for the web sock… Jamie Lokier
- Re: [hybi] An alternative design for the web sock… Mike Belshe
- Re: [hybi] An alternative design for the web sock… Scott Ferguson
- Re: [hybi] An alternative design for the web sock… Maciej Stachowiak
- Re: [hybi] An alternative design for the web sock… Greg Wilkins
- Re: [hybi] An alternative design for the web sock… Maciej Stachowiak
- Re: [hybi] An alternative design for the web sock… Greg Wilkins
- Re: [hybi] An alternative design for the web sock… Adam Barth
- Re: [hybi] An alternative design for the web sock… Adam Barth
- Re: [hybi] An alternative design for the web sock… Scott Ferguson
- Re: [hybi] An alternative design for the web sock… Adam Barth
- Re: [hybi] An alternative design for the web sock… Scott Ferguson
- Re: [hybi] An alternative design for the web sock… Ian Hickson