Re: [vwrap] Technical basis for VW client in a web browser?
Dan Olivares <dcolivares@gmail.com> Mon, 20 December 2010 19:09 UTC
Return-Path: <dcolivares@gmail.com>
X-Original-To: vwrap@core3.amsl.com
Delivered-To: vwrap@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix)
with ESMTP id 12C383A6A8F for <vwrap@core3.amsl.com>;
Mon, 20 Dec 2010 11:09:22 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.196
X-Spam-Level:
X-Spam-Status: No, score=-1.196 tagged_above=-999 required=5
tests=[BAYES_00=-2.599, J_CHICKENPOX_51=0.6, LONGWORDS=1.803,
RCVD_IN_DNSWL_LOW=-1]
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 vFsycxKLV-z0 for
<vwrap@core3.amsl.com>; Mon, 20 Dec 2010 11:09:20 -0800 (PST)
Received: from mail-ew0-f53.google.com (mail-ew0-f53.google.com
[209.85.215.53]) by core3.amsl.com (Postfix) with ESMTP id C0C3E3A6893 for
<vwrap@ietf.org>; Mon, 20 Dec 2010 11:09:19 -0800 (PST)
Received: by ewy6 with SMTP id 6so1614642ewy.40 for <vwrap@ietf.org>;
Mon, 20 Dec 2010 11:11:13 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;
h=domainkey-signature:mime-version:received:received:in-reply-to
:references:date:message-id:subject:from:to:cc:content-type
:content-transfer-encoding; bh=jKMjgew2BW5/3RmBsDklvsJup10VCDHJOUPRdYTQmx8=;
b=UC0IkaY5D1g0zHp+EY+wXdKnlvJDhb4X2qPBgy4O+yqKoZ5cw3k6/uF5+QZ7SX71K4
wi5OwuzxaFJMbzstTS2CeR4qhBo63Lw3GP1BK3++kNuhx1FGwmGjKVivlc420R1D4awa
kGBfmc1f7a/VLcQjWUwjKXnBQMYvdPsLZHs7I=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
h=mime-version:in-reply-to:references:date:message-id:subject:from:to
:cc:content-type:content-transfer-encoding;
b=BhMY1cyMRXOzzKm8DAk6ai3mfg8yi5EhPEtF7GZpG10wpNtOyVuzx7dZgRvyxfcbFC
Llfqtx/A4VZBanSiyvj//Mlz5HMqaBAJ4npeo/KB3YTUZW7PEDsVe/rxD9ePwAG5AXAk
AkSv1bIMkaosN6a/WtZTXOkRJ4vBnYdlSU9pg=
MIME-Version: 1.0
Received: by 10.213.28.133 with SMTP id m5mr5312704ebc.24.1292872273290;
Mon, 20 Dec 2010 11:11:13 -0800 (PST)
Received: by 10.213.35.16 with HTTP; Mon, 20 Dec 2010 11:11:13 -0800 (PST)
In-Reply-To: <AANLkTi=LZ9s-dMmOUz79RrKbHcgMS-OU452qr4MS1ex+@mail.gmail.com>
References: <AANLkTintjQdAS=EWfiRu3oWenB42LKsNzJPDJ+5ofBRO@mail.gmail.com>
<AANLkTinhWObg6Te2VtGYKXsxBG5=gVDS5szmjtLeOgnm@mail.gmail.com>
<AANLkTikYn-iA7osXT_oW8rL61GhK57pp7uJVmTSGVvj7@mail.gmail.com>
<AANLkTikFWUxQyT9aNFBk7-Fdb5bNdFT9Bj-dehqVP0WN@mail.gmail.com>
<6.2.5.6.2.20101219141829.0a381da8@resistor.net>
<AANLkTik-1m=4OOeQN=D3w2t-G-f6DNKwDOmhT5_bNkmb@mail.gmail.com>
<AANLkTinMstkDv5iq6usxbe1djK7GkPrOAjpKYANyMxcy@mail.gmail.com>
<AANLkTimHUOwSMCWxAOyMH1O6XwiebOfep2AfN898pETR@mail.gmail.com>
<AANLkTi=LZ9s-dMmOUz79RrKbHcgMS-OU452qr4MS1ex+@mail.gmail.com>
Date: Mon, 20 Dec 2010 14:11:13 -0500
Message-ID: <AANLkTinhzO0=hyxUy++g21uB00tkKqtbMuCEMP00nkki@mail.gmail.com>
From: Dan Olivares <dcolivares@gmail.com>
To: Morgaine <morgaine.dinova@googlemail.com>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Cc: vwrap@ietf.org
Subject: Re: [vwrap] Technical basis for VW client in a web browser?
X-BeenThere: vwrap@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: Virtual World Region Agent Protocol - IETF working group
<vwrap.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/listinfo/vwrap>,
<mailto:vwrap-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/vwrap>
List-Post: <mailto:vwrap@ietf.org>
List-Help: <mailto:vwrap-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/vwrap>,
<mailto:vwrap-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 20 Dec 2010 19:09:22 -0000
I think, one thing that we've learned by exploring the leading virtual world technologies that exist today is that TCP should be used for any transmission that requires ordered and reliable delivery. Doing so, shares the 'flow control' load across the devices on the internet (for free). The user level UDP flow control may /seem/ negligible. With a small amount of users and high quality connections, it is negligible. However, as the load increases and the quality of the network links decreases, there's a considerable spike in CPU time required to maintain reliable delivery. Generally, with UDP, flow control, and bad quality or overloaded connections, the load is felt on the CPU of the server managing the flow control. *The quality to CPU usage curve is precipitous.* As the quality of the connection decreases a little, the CPU load increases a LOT. At a certain point, the server falls off of the edge of the cliff and can no longer keep up. Sending reliable data in any but the lowest quantity, is far worse for the overall user experience over UDP then TCP as the load increases. Network congestion, leading to single server CPU overload doesn't just affect the experience of one user with a low quality connection. It affects the quality of the experience for every user connected. With ISPs de-prioritizing UDP packets, using it for a large amount of reliable communication isn't a good option. UDP is of most benefit when there is a significant amount of unreliable traffic that can be dropped if it comes in out of order. Real time spacial information, for example, benefits from this approach. The flow control coupled with the quantity of traffic that results from the server relaying reliable updates over UDP leaves less CPU resources for other things on the server and is one of the reasons for the 'SecondLife 100 user Limit'. Intel reached 1000 users by separating the client manager from the world space managing server(simulator). (#0) (There are other reasons for the 100 user limit, but they're beyond the scope of this document) TCP has guaranteed delivery of every packet. In the content space, TCP is the most effective delivery mechanism for everything except a small subset of technologies. That doesn't mean that we should throw UDP out. TCP has it's own problems. With TCP, the load isn't felt on the CPU, it's felt in the speed of delivery of the content. As Dahlia said, every packet must arrive before the next one can begin to be sent. It isn't effective to send large quantities of quickly expiring data over TCP. With multiple types of data requiring different speeds of delivery, it also isn't effective stuffing everything into the same connection. Browsers overcome this problem by making multiple temporary connections downloading referenced resources immediately after downloading a full 'index' (html) content page. Some people might think that if browsers have overcome this problem then it might just be better to use the same technology for virtual worlds (HTTP). There's still an issue with that reasoning. The issue is that HTTP was really designed to transmit files and not a 'data stream of multiple objects'. There is overhead and there are restrictions, designed with files in mind, built into HTTP that make it, not quite a perfect fit. You can overlay 'streaming compatible files' on top of HTTP but it usually involves establishing several connections over time for the same content element. This is where web sockets find their sweet spot. It's the middle ground, getting the benefits of TCP while not encountering the restrictions of HTTP. You can create multiple TCP connections for different types of data allowing you to get around the TCP queue bog. They still don't really solve the 'mass quantities of quickly expiring data' problem though, so we still can't throw UDP out the window. In conclusion, at the moment, none of the existing underlying protocols are optimal for the complex nature of the data of virtual worlds. However, with some ingenuity and 'out of the box' thinking, we can utilize what's there to 'almost' get there. We do need a few things: 1. Web Sockets standard in browsers (we can make due without UDP support, but we really really want it) 2. Solid, and accepted standard for 3d rendering in the browser. (Problems: WebGL + Internet Explorer?, Flash + 3d rendering speed + Closed source renderer?, Unity3d + Plugin distribution + closed source renderer?) 3. Faster JavaScript (Each WebGL frame, fully processed with JavaScript is a bit much when you consider the problem space of thousands of user created objects being displayed) Regards Daniel Olivares References: (0) : http://nwn.blogs.com/nwn/2010/09/intel-science-sim.html On Mon, Dec 20, 2010 at 11:44 AM, Morgaine <morgaine.dinova@googlemail.com> wrote: > On Mon, Dec 20, 2010 at 12:56 AM, Dahlia Trimble <dahliatrimble@gmail.com> > wrote: >> >> If anyone has any evidence of internet pathways that selectively favor TCP >> over other traffic, I'd be interested in seeing it. > > > I have first-hand knowledge of this. I worked for several years at the > Network Operations Centre of a top-tier ISP, and one of my duties was > looking after service routers and firewalls. Policy-based routing and > firewall access lists are configured with rulesets which are processed > sequentially and eat up router CPU, which is a finite resource. > > Under off-peak conditions, packet loss is quite rare in the absence of > interface or line faults, and router CPUs are scaled to handle the expected > load so packets are never dropped willfully. When networks are congested > however, which unfortunately is not uncommon during peak hours owing to the > common practice of oversubscribing capacity (or poor scalability planning), > CPU load often reaches critical levels, and routers are configured to > prioritize certain payload types in favor of others when this happens. > > TCP always gets top priority because it carries HTTP which is most closely > tied to business revenue. In contrast, UDP (and also ICMP Echo) are > normally configured right down the bottom end of the priority list, so under > peak load when the CPU has to make a choice what to drop to stay within safe > operating limits, UDP gets the chop first. This was business as usual at > the ISP, and that's how the network designers wanted the traffic priorities > configured. (I was merely implementing policy, not creating it.) > > Gaming fans sometimes complain that ISPs are reducing the quality of service > of their UDP traffic, and in some sense it's true. From my experience it's > not done maliciously nor as an conscious policy of network non-neutrality, > but simply as a means of protecting the more prized resource of TCP payloads > when operating conditions mandate that something has to be thrown away. > > On the positive side, I've never known UDP packets (nor any other kind) to > be dropped willfully for the above reason when all equipment is working > within safe design limits and there is enough capacity to carry them. If it > happens off-peak then something is very wrong with network sizing, or the > equipment is faulty. > > Unfortunately, that's not the end of the saga with UDP. It's just the > beginning, because there is another big reason for dropped packets, and this > one occurs even when equipment is working within its designed operating > limits: traffic shaping. > > IP traffic shaping is performed by packet queuing as a first resort, to slow > down traffic in the hope that the source notices and adapts. If the packet > rate doesn't slow down then the method of last resort is to drop excess > packets when queue buffers hit their configured highwater marks. TCP > implements a lot of things to mitigate packet loss, such as slow start, > exponential backoff and transmit pacing, with the purpose of adapting > transmit rate to receipt rate across paths of limited bandwidth so that > traffic-shaping routers don't enter their drop state. > > UDP has no such flow control, so the onus falls upon the UDP application > endpoints to carry out adaptive flow control themselves. The likelihood of > this being done by UDP applications as effectively as it is done in today's > finely honed TCP stacks is very low. It may not even be done at all. > > As a result, UDP packets can get dropped for being bad network citizens and > not slowing down in response to packet queueing and transmit pacing. UDP > applications may think that they're free of the shackles of TCP flow > control, but they're not. They either slow down when given the hint, or > their traffic gets the chop. As a result, a UDP application that is > oblivious of end-to-end timing should expect packet loss when the network > acts to protect itself against congestion. See RFC-2309 for more details > about this issue, in particular "MANAGING AGGRESSIVE FLOWS". There is no > free lunch for UDP packets. > > This is why the best advice to give prospective users of UDP is "Don't, > unless your application is tolerant of packet loss, packet duplication, > packet delay, corrupted packets, and out of order delivery." To try to work > around these properties of UDP and make it reliable while simultaneously not > impacting on the congestion controls of TCP over the shared path is highly > unlikely to be successful, unless you reimplement the clever control > features of TCP, and do it compatibly. Bulldozing your UDP packets through > a shared network is not a solution, and will fail. > > [PS. The problems don't even stop there, as there are further causes of UDP > packet loss. One is the effect of TCP flow-control synchronization on UDP > loss rate over congested paths, which counter-intuitively negates any > benefit that could result from reducing UDP traffic rates because TCP > synchronization picks up any bandwidth slack that reducing UDP traffic has > freed. As a result, TCP congestion actually increases UDP packet drop > rates. (This has been a topic of research.) Networks protocols have very > complex behaviors.] > > > Morgaine. > > > > > ====================================== > > On Mon, Dec 20, 2010 at 12:56 AM, Dahlia Trimble <dahliatrimble@gmail.com> > wrote: >> >> I have used both TCP and UDP in VW applications. I've found that TCP has >> acceptable latency and is not really any worse than UDP when either are >> tried over a clean, highly functional connection. I've not seen any routers >> which drop UDP packets in favor of TCP, and I've not seen any evidence of >> better quality TCP connections than UDP in any of my tests. To the contrary, >> I've seen UDP perform much better when network conditions are less than >> optimal as small messages can be sent immediately and repeated as needed >> without waiting for prior message acknowledgement or waiting for a TCP >> stream to recover in the event of dropped packets. >> >> TCP seems to be favorable when latency is not critical as it's generally >> (but not always) easier to use. UDP seems favorable when latency is critical >> as it allows the programmer to control network traffic and tailor it to the >> application requirements. >> >> If anyone has any evidence of internet pathways that selectively favor TCP >> over other traffic, I'd be interested in seeing it. >> >> >> On Sun, Dec 19, 2010 at 3:26 PM, Meadhbh Hamrick <ohmeadhbh@gmail.com> >> wrote: >>> >>> do we really know that UDP is what we want, even for low latency? if >>> you're multiplexing messages over a websocket connection, it's highly likely >>> it'll be an existing connection (i.e.- it's likely one tcp/ip connection >>> will carry several multiplexed websockets messages.) >>> >>> in my tests, UDP doesn't do much better than TCP if you're near the >>> network rate as it seems a lot of routers tend to dump UDP packets first. >>> >>> most modern OSes now have api calls to let you disable TCP slow-start. >>> >>> i guess what i'm saying is it might be a good idea to define messages in >>> a way so they're transport agnostic. that and I would wager that any latency >>> improvements from UDP are dwarfed by latency introduced by application layer >>> mechanisms to replace TCP's flow control & resend semantics. >>> >>> just my $0.02. >>> >>> On Dec 19, 2010 2:34 PM, "SM" <sm@resistor.net> wrote: >>> >>> _______________________________________________ >>> vwrap mailing list >>> vwrap@ietf.org >>> https://www.ietf.org/mailman/listinfo/vwrap >>> >> >> >> _______________________________________________ >> vwrap mailing list >> vwrap@ietf.org >> https://www.ietf.org/mailman/listinfo/vwrap >> > > > _______________________________________________ > vwrap mailing list > vwrap@ietf.org > https://www.ietf.org/mailman/listinfo/vwrap > >
- [vwrap] Technical basis for VW client in a web br… Morgaine
- Re: [vwrap] Technical basis for VW client in a we… Dahlia Trimble
- Re: [vwrap] Technical basis for VW client in a we… Morgaine
- Re: [vwrap] Technical basis for VW client in a we… Joshua Bell
- Re: [vwrap] Technical basis for VW client in a we… Meadhbh Hamrick
- Re: [vwrap] Technical basis for VW client in a we… Peter Saint-Andre
- Re: [vwrap] Technical basis for VW client in a we… Morgaine
- Re: [vwrap] Technical basis for VW client in a we… JohnnyB Hammerer
- Re: [vwrap] Technical basis for VW client in a we… peter host
- Re: [vwrap] Technical basis for VW client in a we… Brian Hurley
- Re: [vwrap] Technical basis for VW client in a we… Morgaine
- Re: [vwrap] Technical basis for VW client in a we… Morgaine
- Re: [vwrap] Technical basis for VW client in a we… Cristina Videira Lopes
- Re: [vwrap] Technical basis for VW client in a we… peter host
- Re: [vwrap] Technical basis for VW client in a we… SM
- Re: [vwrap] Technical basis for VW client in a we… Meadhbh Hamrick
- Re: [vwrap] Technical basis for VW client in a we… Dahlia Trimble
- Re: [vwrap] Technical basis for VW client in a we… Hurliman, John
- Re: [vwrap] Technical basis for VW client in a we… Mic Bowman
- Re: [vwrap] Technical basis for VW client in a we… Morgaine
- Re: [vwrap] Technical basis for VW client in a we… Dahlia Trimble
- Re: [vwrap] Technical basis for VW client in a we… Dan Olivares
- Re: [vwrap] Technical basis for VW client in a we… Dahlia Trimble
- Re: [vwrap] Technical basis for VW client in a we… Dan Olivares
- Re: [vwrap] Technical basis for VW client in a we… Joshua Bell
- Re: [vwrap] Technical basis for VW client in a we… Dahlia Trimble
- Re: [vwrap] Technical basis for VW client in a we… Morgaine
- Re: [vwrap] Technical basis for VW client in a we… Dahlia Trimble
- Re: [vwrap] Technical basis for VW client in a we… Dzonatas Sol
- Re: [vwrap] Technical basis for VW client in a we… Dzonatas Sol