From emoller at opera.com Tue Jun 1 03:12:54 2010
From: emoller at opera.com (=?iso-8859-15?Q?Erik_M=F6ller?=)
Date: Tue, 01 Jun 2010 12:12:54 +0200
Subject: [whatwg] WebSockets: UDP
Message-ID:
The use case I'd like to address in this post is Real-time client/server
games.
The majority of the on-line games of today use a client/server model over
UDP and we should try to give game developers the tools they require to
create browser based games. For many simpler games a TCP based protocol is
exactly what's needed but for most real-time games a UDP based protocol is
a requirement. Games typically send small updates to its server at 20-30Hz
over UDP and can with the help of entity interpolation and if required
entity extrapolation cope well with intermittent packet loss. When a
packet loss occur in a TCP based protocol the entire stream of data is
held up until the packet is resent meaning a game would have to revert to
entity extrapolation possibly over several seconds, leading to an
unacceptable gameplay experience.
It seems to me the WebSocket interface can be easily modified to cope with
UDP sockets (a wsd: scheme perhaps?) and it sounds like a good idea to
leverage the work already done for WebSockets in terms of interface and
framing.
The most important distinction between ws: and wsd: is that messages sent
by send() in wsd: need not be acknowledged by the peer nor be resent. To
keep the interface the same to the largest possible extent I'd suggest
implementing a simple reliable 3-way handshake over UDP, keep-alive
messages (and timeouts) and reliable close frames. If these are
implemented right the interface in it's entirety could be kept. Only one
new readonly attribute long maxMessageSize could be introduced to describe
the min path MTU (perhaps only valid once in connected mode, or perhaps
set to 0 or 576 initially and updated once in connected mode). This
attribute could also be useful to expose in ws: and wss: but in that case
be set to the internal limit of the browser / server.
The actual content of the handshake for wsd: can be vastly simplified
compared to that of ws: as there's no need to be http compliant. It could
contain just a magic identifier and length encoded strings for origin,
location and protocol.
To minimize the work needed on the spec the data framing of wsd: can be
kept identical to that of ws:, though I'd expect game developers would
choose whatever the binary framing will be once the spec is done.
I'd be very interested to hear peoples opinion on this.
--
Erik M?ller
Core Developer
Opera Software
From svartman95 at gmail.com Tue Jun 1 04:09:57 2010
From: svartman95 at gmail.com (Bjartur Thorlacius)
Date: Tue, 1 Jun 2010 11:09:57 +0000
Subject: [whatwg] audio and video: volume and muted as content
attributes?
In-Reply-To:
References:
<4c0420c9.d345d80a.5c04.ffffd9f9@mx.google.com>
Message-ID:
On 5/31/10, Silvia Pfeiffer wrote:
> On Tue, Jun 1, 2010 at 6:48 AM, bjartur wrote:
>>>I just came across a curious situation in the spec: IIUC, it seems the
>>>@volume and @muted attributes are only IDL attributes and not content
>>>attributes. This means that an author who is creating an audio-visual
>>>Webpage has to use JavaScript to turn down (or up) the loudness of
>>>their media elements or mute them rather than just being able to
>>>specify this through content attributes.
>>>If you want to control the volume for the user after the page loads
>>>then yes, you'll need JavaScript.
>>>I've searched the archives and didn't find a discussion or reasons for
>>>this. Apologies if this has been discussed before.
>>>
>>>I am guessing the reasons for not having them as content attributes is
>>>that anything that requires muting of audio-visual content is assumed
>>> to need JavaScript anyway.
>>
>> Exactly.
>>
>>>However, if I have multiple videos on a page, all on autoplay, it
>>>would be nice to turn off the sound of all of them without JavaScript.
>>>With all the new CSS3 functionality, I can, for example, build a
>>>spinning cube of video elements that are on autoplay or a marquee of
>>>videos on autoplay - all of which would require muting the videos to
>>>be bearable. If we added @muted to the content attributes, it would be
>>>easy to set the muted state without having to write any JavaScript.
>>
>> If you need the audio to be muted you should use CSS. If you need to
>> control volume dynamically you need scripting.
>
> I am not aware of a CSS property for media elements that lets you
> control the muted state. Can you link me to a specification?
Well, http://www.w3.org/TR/CSS2/aural.html defines volume and
play-during. Play-during can stop, autoplay and repeat sounds.
It's not obvious to me how this will apply to elements that represent
audiovisual content but volume: silent; unambiguously mutes content.
Decorating audio (such as background music in games or videos)
seem to be even more easily styled for some reason. Multiple
soundtracks can be muxed and assigned different loudness.
Also @media aural {display: none;} can be used on audio elements
but I haven't read the specs properly so I don't know if that would hide
an element when inside of an @media aural clause.
CSS 3 aural is still to be done so more capabilities may be suggested.
>> Well, you have a point. That can be done by increasing the volume
>> of the soundtrack itself, metedata (like embedded volume metadata in
>> MPEG files) and should be possible in CSS. Adding it to HTML as well
>> seems redundant.
>
> Are you saying that a Web author needs to edit the media resource in
> order to change the default volume setting for the resource? I think
> that's a bit of a stretch. Also, if you have a pointer to how this can
> be done in CSS, that would be highly appreciated.
Not necessarily, just pointing out that it would be a good idea to fix the
soundtrack if it's broken. CSS is perfect for these kind of things so I
recommend extending that rather than HTML.
--
kv,
- Bjartur
From kornel at geekhood.net Tue Jun 1 04:24:24 2010
From: kornel at geekhood.net (Kornel Lesinski)
Date: Tue, 1 Jun 2010 12:24:24 +0100
Subject: [whatwg] WebSockets: UDP
In-Reply-To:
References:
Message-ID: <5EFBABCC-E71F-42BD-9E6E-52841653D265@geekhood.net>
On 1 Jun 2010, at 11:12, Erik M?ller wrote:
> The use case I'd like to address in this post is Real-time client/server games.
>
> The majority of the on-line games of today use a client/server model over UDP and we should try to give game developers the tools they require to create browser based games. For many simpler games a TCP based protocol is exactly what's needed but for most real-time games a UDP based protocol is a requirement. Games typically send small updates to its server at 20-30Hz over UDP and can with the help of entity interpolation and if required entity extrapolation cope well with intermittent packet loss. When a packet loss occur in a TCP based protocol the entire stream of data is held up until the packet is resent meaning a game would have to revert to entity extrapolation possibly over several seconds, leading to an unacceptable gameplay experience.
>
> It seems to me the WebSocket interface can be easily modified to cope with UDP sockets (a wsd: scheme perhaps?) and it sounds like a good idea to leverage the work already done for WebSockets in terms of interface and framing.
>
> The most important distinction between ws: and wsd: is that messages sent by send() in wsd: need not be acknowledged by the peer nor be resent. To keep the interface the same to the largest possible extent I'd suggest implementing a simple reliable 3-way handshake over UDP, keep-alive messages (and timeouts) and reliable close frames. If these are implemented right the interface in it's entirety could be kept. Only one new readonly attribute long maxMessageSize could be introduced to describe the min path MTU (perhaps only valid once in connected mode, or perhaps set to 0 or 576 initially and updated once in connected mode). This attribute could also be useful to expose in ws: and wss: but in that case be set to the internal limit of the browser / server.
SCTP would be ideal for this. It's connection-oriented, but supports multistreaming (can deliver messages out of order, without head of line blocking).
http://en.wikipedia.org/wiki/Stream_Control_Transmission_Protocol
--
regards, Kornel
From excors+whatwg at gmail.com Tue Jun 1 04:34:51 2010
From: excors+whatwg at gmail.com (Philip Taylor)
Date: Tue, 1 Jun 2010 12:34:51 +0100
Subject: [whatwg] WebSockets: UDP
In-Reply-To:
References:
Message-ID:
On Tue, Jun 1, 2010 at 11:12 AM, Erik M?ller wrote:
> The use case I'd like to address in this post is Real-time client/server
> games.
>
> The majority of the on-line games of today use a client/server model over
> UDP and we should try to give game developers the tools they require to
> create browser based games. For many simpler games a TCP based protocol is
> exactly what's needed but for most real-time games a UDP based protocol is a
> requirement. [...]
>
> It seems to me the WebSocket interface can be easily modified to cope with
> UDP sockets [...]
As far as I'm aware, games use UDP because they can't use TCP (since
packet loss shouldn't stall the entire stream) and there's no
alternative but UDP. (And also because peer-to-peer usually requires
NAT punchthrough, which is much more reliable with UDP than with TCP).
They don't use UDP because it's a good match for their requirements,
it's just the only choice that doesn't make their requirements
impossible.
There are lots of features that seem very commonly desired in games: a
mixture of reliable and unreliable and reliable-but-unordered channels
(movement updates can be safely dropped but chat messages must never
be), automatic fragmentation of large messages, automatic aggregation
of small messages, flow control to avoid overloading the network,
compression, etc. And there's lots of libraries that build on top of
UDP to implement protocols halfway towards TCP in order to provide
those features:
http://msdn.microsoft.com/en-us/library/bb153248(VS.85).aspx,
http://opentnl.sourceforge.net/doxydocs/fundamentals.html,
http://www.jenkinssoftware.com/raknet/manual/introduction.html,
http://enet.bespin.org/Features.html, etc.
UDP sockets seem like a pretty inadequate solution for the use case of
realtime games - everyone would have to write their own higher-level
networking libraries (probably poorly and incompatibly) in JS to
provide the features that they really want. Browsers would lose the
ability to provide much security, e.g. flow control to prevent
intentional/accidental DOS attacks on the user's network, since they
would be too far removed from the application level to understand what
they should buffer or drop or notify the application about.
I think it'd be much more useful to provide a level of abstraction
similar to those game networking libraries - at least the ability to
send reliable and unreliable sequenced and unreliable unsequenced
messages over the same connection, with automatic
aggregation/fragmentation so you don't have to care about packet
sizes, and dynamic flow control for reliable messages and maybe some
static rate limit for unreliable messages. The API shouldn't expose
details of UDP (you could implement exactly the same API over TCP,
with better reliability but worse latency, or over any other protocols
that become well supported in the network).
--
Philip Taylor
excors at gmail.com
From silviapfeiffer1 at gmail.com Tue Jun 1 04:41:38 2010
From: silviapfeiffer1 at gmail.com (Silvia Pfeiffer)
Date: Tue, 1 Jun 2010 21:41:38 +1000
Subject: [whatwg] audio and video: volume and muted as content
attributes?
In-Reply-To:
References:
<4c0420c9.d345d80a.5c04.ffffd9f9@mx.google.com>
Message-ID:
On Tue, Jun 1, 2010 at 9:09 PM, Bjartur Thorlacius wrote:
> On 5/31/10, Silvia Pfeiffer wrote:
>> On Tue, Jun 1, 2010 at 6:48 AM, bjartur wrote:
>>>>I just came across a curious situation in the spec: IIUC, it seems the
>>>>@volume and @muted attributes are only IDL attributes and not content
>>>>attributes. This means that an author who is creating an audio-visual
>>>>Webpage has to use JavaScript to turn down (or up) the loudness of
>>>>their media elements or mute them rather than just being able to
>>>>specify this through content attributes.
>>>>If you want to control the volume for the user after the page loads
>>>>then yes, you'll need JavaScript.
>>>>I've searched the archives and didn't find a discussion or reasons for
>>>>this. Apologies if this has been discussed before.
>>>>
>>>>I am guessing the reasons for not having them as content attributes is
>>>>that anything that requires muting of audio-visual content is assumed
>>>> to need JavaScript anyway.
>>>
>>> Exactly.
>>>
>>>>However, if I have multiple videos on a page, all on autoplay, it
>>>>would be nice to turn off the sound of all of them without JavaScript.
>>>>With all the new CSS3 functionality, I can, for example, build a
>>>>spinning cube of video elements that are on autoplay or a marquee of
>>>>videos on autoplay - all of which would require muting the videos to
>>>>be bearable. If we added @muted to the content attributes, it would be
>>>>easy to set the muted state without having to write any JavaScript.
>>>
>>> If you need the audio to be muted you should use CSS. If you need to
>>> control volume dynamically you need scripting.
>>
>> I am not aware of a CSS property for media elements that lets you
>> control the muted state. Can you link me to a specification?
>
> Well, http://www.w3.org/TR/CSS2/aural.html defines volume and
> play-during.
Interesting.
> Play-during can stop, autoplay and repeat sounds.
> It's not obvious to me how this will apply to elements that represent
> audiovisual content but volume: silent; unambiguously mutes content.
> Decorating audio (such as background music in games or videos)
> seem to be even more easily styled for some reason. Multiple
> soundtracks can be muxed and assigned different loudness.
> Also @media aural {display: none;} can be used on audio elements
> but I haven't read the specs properly so I don't know if that would hide
> an element when inside of an @media aural clause.
>
> CSS 3 aural is still to be done so more capabilities may be suggested.
>
>>> Well, you have a point. That can be done by increasing the volume
>>> of the soundtrack itself, metedata (like embedded volume metadata in
>>> MPEG files) and should be possible in CSS. Adding it to HTML as well
>>> seems redundant.
>>
>> Are you saying that a Web author needs to edit the media resource in
>> order to change the default volume setting for the resource? I think
>> that's a bit of a stretch. Also, if you have a pointer to how this can
>> be done in CSS, that would be highly appreciated.
> Not necessarily, just pointing out that it would be a good idea to fix the
> soundtrack if it's broken. CSS is perfect for these kind of things so I
> recommend extending that rather than HTML.
Has there been any discussion about implementing support for CSS2
aural in Web browsers? Until such a time - and in fact independently
of that - I still think turning the existing volume and muted IDL
attributes into content attributes would be a nice and simple
solution. Introducing a whole CSS aural control section will take lots
longer IMHO. Also, it won't hurt to have both - we do that for width
and height, too.
Cheers,
Silvia.
From lachlan.hunt at lachy.id.au Tue Jun 1 04:42:22 2010
From: lachlan.hunt at lachy.id.au (Lachlan Hunt)
Date: Tue, 01 Jun 2010 13:42:22 +0200
Subject: [whatwg] audio and video: volume and muted as
content attributes?
In-Reply-To:
References: <4c0420c9.d345d80a.5c04.ffffd9f9@mx.google.com>
Message-ID: <4C04F21E.4020101@lachy.id.au>
On 2010-06-01 13:09, Bjartur Thorlacius wrote:
> On 5/31/10, Silvia Pfeiffer wrote:
>> I am not aware of a CSS property for media elements that lets you
>> control the muted state. Can you link me to a specification?
>
> Well, http://www.w3.org/TR/CSS2/aural.html defines volume and
> play-during. Play-during can stop, autoplay and repeat sounds.
> It's not obvious to me how this will apply to elements that represent
> audiovisual content but volume: silent; unambiguously mutes content.
Those properties were designed for aural browsers using speech synthesis
to read the content of a page, not to control multimedia in a page
itself. Also, attempting to hijack those properties for use with
multimedia content could create difficulties as you would have to define
how the HTMLMediaElement's volume and muted properties interact with
those CSS properties, if at all.
--
Lachlan Hunt - Opera Software
http://lachy.id.au/
http://www.opera.com/
From emoller at opera.com Tue Jun 1 06:00:50 2010
From: emoller at opera.com (=?iso-8859-15?Q?Erik_M=F6ller?=)
Date: Tue, 01 Jun 2010 15:00:50 +0200
Subject: [whatwg] WebSockets: UDP
In-Reply-To:
References:
Message-ID:
On Tue, 01 Jun 2010 13:34:51 +0200, Philip Taylor
wrote:
> On Tue, Jun 1, 2010 at 11:12 AM, Erik M?ller wrote:
>> The use case I'd like to address in this post is Real-time client/server
>> games.
>>
>> The majority of the on-line games of today use a client/server model
>> over
>> UDP and we should try to give game developers the tools they require to
>> create browser based games. For many simpler games a TCP based protocol
>> is
>> exactly what's needed but for most real-time games a UDP based protocol
>> is a
>> requirement. [...]
>>
>> It seems to me the WebSocket interface can be easily modified to cope
>> with
>> UDP sockets [...]
>
> As far as I'm aware, games use UDP because they can't use TCP (since
> packet loss shouldn't stall the entire stream) and there's no
> alternative but UDP. (And also because peer-to-peer usually requires
> NAT punchthrough, which is much more reliable with UDP than with TCP).
> They don't use UDP because it's a good match for their requirements,
> it's just the only choice that doesn't make their requirements
> impossible.
>
> There are lots of features that seem very commonly desired in games: a
> mixture of reliable and unreliable and reliable-but-unordered channels
> (movement updates can be safely dropped but chat messages must never
> be), automatic fragmentation of large messages, automatic aggregation
> of small messages, flow control to avoid overloading the network,
> compression, etc. And there's lots of libraries that build on top of
> UDP to implement protocols halfway towards TCP in order to provide
> those features:
> http://msdn.microsoft.com/en-us/library/bb153248(VS.85).aspx,
> http://opentnl.sourceforge.net/doxydocs/fundamentals.html,
> http://www.jenkinssoftware.com/raknet/manual/introduction.html,
> http://enet.bespin.org/Features.html, etc.
>
> UDP sockets seem like a pretty inadequate solution for the use case of
> realtime games - everyone would have to write their own higher-level
> networking libraries (probably poorly and incompatibly) in JS to
> provide the features that they really want. Browsers would lose the
> ability to provide much security, e.g. flow control to prevent
> intentional/accidental DOS attacks on the user's network, since they
> would be too far removed from the application level to understand what
> they should buffer or drop or notify the application about.
>
> I think it'd be much more useful to provide a level of abstraction
> similar to those game networking libraries - at least the ability to
> send reliable and unreliable sequenced and unreliable unsequenced
> messages over the same connection, with automatic
> aggregation/fragmentation so you don't have to care about packet
> sizes, and dynamic flow control for reliable messages and maybe some
> static rate limit for unreliable messages. The API shouldn't expose
> details of UDP (you could implement exactly the same API over TCP,
> with better reliability but worse latency, or over any other protocols
> that become well supported in the network).
>
I've never heard any gamedevs complain how poorly UDP matches their needs
so I'm not so sure about that, but you may be right it would be better to
have a higher level abstraction. If we are indeed targeting the game
developing community we should ask for their feedback rather than guessing
what they prefer. I will grep my linked-in account for game-devs tonight
and see if I can gather some feedback.
I suspect they prefer to be "empowered with UDP" rather than "boxed into a
high level protocol that doesn't fit their needs" but I may be wrong.
Those who have the knowledge, time and desire to implement their own
reliable channels/flow control/security over UDP would be free to do so,
those who couldn't care less can always use ws: or wss: for their reliable
traffic and just use UDP where necessary.
So the question to the gamedevs will be, and please make suggestions for
changes and I'll do an email round tonight:
If browser and server vendors agree on and standardize a socket based
network interface to be used for real-time games running in the browsers,
at what level would you prefer the interface to be?
(Note that an interface for communicating reliably via TCP and TLS are
already implemented.)
- A low-level interface similar to a plain UDP socket
- A medium-level interface allowing for reliable and unreliable channels,
automatically compressed data, flow control, data priority etc
- A high-level interface with "ghosted entities"
Oh, and I guess we should continue this discussion on the HyBi list... my
fault for not posting there in the first place.
--
Erik M?ller
Core Developer
Opera Software
From bzbarsky at MIT.EDU Tue Jun 1 07:46:42 2010
From: bzbarsky at MIT.EDU (Boris Zbarsky)
Date: Tue, 01 Jun 2010 10:46:42 -0400
Subject: [whatwg] audio and video: volume and muted as
content attributes?
In-Reply-To:
References: <4c0420c9.d345d80a.5c04.ffffd9f9@mx.google.com>
Message-ID: <4C051D52.5040801@mit.edu>
On 6/1/10 7:09 AM, Bjartur Thorlacius wrote:
> Also @media aural {display: none;} can be used on audio elements
> but I haven't read the specs properly so I don't know if that would hide
> an element when inside of an @media aural clause.
You seem to be somewhat confused about the way "media" are used in CSS.
A "medium" is a property of the way the entire document is being
presented. Typical values one runs into with desktop web browsers are
"screen" and "print". The spec you link to is for the "aural" and
"speech" media.
So in particular, rules inside "@media aural {}" will get ignored in all
desktop browsers. (Your example has a declaration directly inside
@media, which is just a parse error, but I assume you meant putting an
actual rule that assigns display:none to a particular element in the
@media rule).
But more to the point, since the aural properties only apply to "aural"
and "speech" media it would require a pretty major CSS spec change to
make them mean anything in the "screen" medium, which is what you're
proposing.
-Boris
From mike at belshe.com Tue Jun 1 08:34:15 2010
From: mike at belshe.com (Mike Belshe)
Date: Tue, 1 Jun 2010 08:34:15 -0700
Subject: [whatwg] WebSockets: UDP
In-Reply-To: <5EFBABCC-E71F-42BD-9E6E-52841653D265@geekhood.net>
References:
<5EFBABCC-E71F-42BD-9E6E-52841653D265@geekhood.net>
Message-ID:
On Tue, Jun 1, 2010 at 4:24 AM, Kornel Lesinski wrote:
> On 1 Jun 2010, at 11:12, Erik M?ller wrote:
>
> > The use case I'd like to address in this post is Real-time client/server
> games.
> >
> > The majority of the on-line games of today use a client/server model over
> UDP and we should try to give game developers the tools they require to
> create browser based games. For many simpler games a TCP based protocol is
> exactly what's needed but for most real-time games a UDP based protocol is a
> requirement. Games typically send small updates to its server at 20-30Hz
> over UDP and can with the help of entity interpolation and if required
> entity extrapolation cope well with intermittent packet loss. When a packet
> loss occur in a TCP based protocol the entire stream of data is held up
> until the packet is resent meaning a game would have to revert to entity
> extrapolation possibly over several seconds, leading to an unacceptable
> gameplay experience.
> >
> > It seems to me the WebSocket interface can be easily modified to cope
> with UDP sockets (a wsd: scheme perhaps?) and it sounds like a good idea to
> leverage the work already done for WebSockets in terms of interface and
> framing.
> >
> > The most important distinction between ws: and wsd: is that messages sent
> by send() in wsd: need not be acknowledged by the peer nor be resent. To
> keep the interface the same to the largest possible extent I'd suggest
> implementing a simple reliable 3-way handshake over UDP, keep-alive messages
> (and timeouts) and reliable close frames. If these are implemented right the
> interface in it's entirety could be kept. Only one new readonly attribute
> long maxMessageSize could be introduced to describe the min path MTU
> (perhaps only valid once in connected mode, or perhaps set to 0 or 576
> initially and updated once in connected mode). This attribute could also be
> useful to expose in ws: and wss: but in that case be set to the internal
> limit of the browser / server.
>
> SCTP would be ideal for this. It's connection-oriented, but supports
> multistreaming (can deliver messages out of order, without head of line
> blocking).
>
> http://en.wikipedia.org/wiki/Stream_Control_Transmission_Protocol
FYI: SCTP is effectively non-deployable on the internet today due to NAT.
+1 on finding ways to enable UDP. It's a key missing component to the web
platform.
Mike
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From jat at google.com Tue Jun 1 08:52:35 2010
From: jat at google.com (John Tamplin)
Date: Tue, 1 Jun 2010 11:52:35 -0400
Subject: [whatwg] WebSockets: UDP
In-Reply-To:
References:
<5EFBABCC-E71F-42BD-9E6E-52841653D265@geekhood.net>
Message-ID:
On Tue, Jun 1, 2010 at 11:34 AM, Mike Belshe wrote:
> FYI: SCTP is effectively non-deployable on the internet today due to NAT.
>
> +1 on finding ways to enable UDP. It's a key missing component to the web
> platform.
>
But there is so much infrastructure that would have to be enabled to use UDP
from a web app. How would proxies be handled? Even if specs were written
and implementations available, how many years would it be before corporate
proxies/firewalls supported WebSocket over UDP?
I am all for finding a way to get datagram communication from a web app, but
I think it will take a long time and shouldn't hold up current WebSocket
work.
--
John A. Tamplin
Software Engineer (GWT), Google
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From mike at belshe.com Tue Jun 1 09:45:51 2010
From: mike at belshe.com (Mike Belshe)
Date: Tue, 1 Jun 2010 09:45:51 -0700
Subject: [whatwg] WebSockets: UDP
In-Reply-To:
References:
<5EFBABCC-E71F-42BD-9E6E-52841653D265@geekhood.net>
Message-ID:
On Tue, Jun 1, 2010 at 8:52 AM, John Tamplin wrote:
> On Tue, Jun 1, 2010 at 11:34 AM, Mike Belshe wrote:
>
>> FYI: SCTP is effectively non-deployable on the internet today due to
>> NAT.
>>
>> +1 on finding ways to enable UDP. It's a key missing component to the web
>> platform.
>>
>
> But there is so much infrastructure that would have to be enabled to use
> UDP from a web app. How would proxies be handled? Even if specs were
> written and implementations available, how many years would it be before
> corporate proxies/firewalls supported WebSocket over UDP?
Agree - nobody said it would be trivial. There are so many games
successfully doing it today that it is clearly viable. For games in
particular, they have had to document to their users how to configure their
home routers, and that has been successful too. If you talk with game
writers - there are a class of games where UDP is just better (e.g. those
communicating real-time, interactive position and other info). If we can
enable that through the web platform, that is good.
>
> I am all for finding a way to get datagram communication from a web app,
> but I think it will take a long time and shouldn't hold up current WebSocket
> work.
>
Agree- no need to stall existing work.
Mike
>
> --
> John A. Tamplin
> Software Engineer (GWT), Google
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From emoller at opera.com Tue Jun 1 12:08:15 2010
From: emoller at opera.com (=?iso-8859-15?Q?Erik_M=F6ller?=)
Date: Tue, 01 Jun 2010 21:08:15 +0200
Subject: [whatwg] WebSockets: UDP
In-Reply-To:
References:
<5EFBABCC-E71F-42BD-9E6E-52841653D265@geekhood.net>
Message-ID:
On Tue, 01 Jun 2010 18:45:51 +0200, Mike Belshe wrote:
> On Tue, Jun 1, 2010 at 8:52 AM, John Tamplin wrote:
>
>> On Tue, Jun 1, 2010 at 11:34 AM, Mike Belshe wrote:
>>
>>> FYI: SCTP is effectively non-deployable on the internet today due to
>>> NAT.
>>>
>>> +1 on finding ways to enable UDP. It's a key missing component to the
>>> web
>>> platform.
>>>
>>
>> But there is so much infrastructure that would have to be enabled to use
>> UDP from a web app. How would proxies be handled? Even if specs were
>> written and implementations available, how many years would it be before
>> corporate proxies/firewalls supported WebSocket over UDP?
>
>
> Agree - nobody said it would be trivial. There are so many games
> successfully doing it today that it is clearly viable. For games in
> particular, they have had to document to their users how to configure
> their
> home routers, and that has been successful too. If you talk with game
> writers - there are a class of games where UDP is just better (e.g. those
> communicating real-time, interactive position and other info). If we can
> enable that through the web platform, that is good.
>
>
>>
>> I am all for finding a way to get datagram communication from a web app,
>> but I think it will take a long time and shouldn't hold up current
>> WebSocket
>> work.
>>
>
> Agree- no need to stall existing work.
>
> Mike
>
>
>>
>> --
>> John A. Tamplin
>> Software Engineer (GWT), Google
>>
I don't think proxies and firewalls are going to be a major problem, like
Mike said, the myriad of UDP games out there seem to do just fine in the
real world. Sure, there will be corporate firewalls and proxies blocking
employees from fragging their colleagues when the boss is in a meeting,
but I guess they're partly put there to prevent just that so we probably
shouldn't try to combat it.
If we were talking about peer-to-peer UDP it'd be a whole new ballgame,
but that's why I specifically said the use-case was for client/server
games, I don't think we should attempt peer-to-peer before WebSockets is
all done and shipped.
I fully agree any discussions on UDP (or other protocol) shouldn't stall
the existing work, but right now there seems to be very little activity
anyways.
--
Erik M?ller
Core Developer
Opera Software
From excors+whatwg at gmail.com Tue Jun 1 12:14:33 2010
From: excors+whatwg at gmail.com (Philip Taylor)
Date: Tue, 1 Jun 2010 20:14:33 +0100
Subject: [whatwg] WebSockets: UDP
In-Reply-To:
References:
Message-ID:
On Tue, Jun 1, 2010 at 2:00 PM, Erik M?ller wrote:
> [...]
> I've never heard any gamedevs complain how poorly UDP matches their needs so
> I'm not so sure about that, but you may be right it would be better to have
> a higher level abstraction. If we are indeed targeting the game developing
> community we should ask for their feedback rather than guessing what they
> prefer. I will grep my linked-in account for game-devs tonight and see if I
> can gather some feedback.
More feedback is certainly good, though I think the libraries I
mentioned (DirectPlay/OpenTNL/RakNet/ENet (there's probably more)) are
useful as an indicator of common real needs (as opposed to edge-case
or merely perceived needs) - they've been used by quite a few games
and they seem to have largely converged on a core set of features, so
that's better than just guessing.
I guess many commercial games write their own instead of reusing
third-party libraries, and I guess they often reimplement very similar
concepts to these, but it would be good to have more reliable
information about that.
> I suspect they prefer to be "empowered with UDP" rather than "boxed into a
> high level protocol that doesn't fit their needs" but I may be wrong.
If you put it like that, I don't see why anybody would not want to be
empowered :-)
But that's not the choice, since they could never really have UDP -
the protocol will perhaps have to be Origin-based, connection-oriented
(to exchange Origin information etc), with complex packet headers so
you can't trick it into talking to a DNS server, with rate limiting in
the browser to prevent DOS attacks, restricted to client-server (no
peer-to-peer since you probably can't run a socket server in the
browser), etc.
Once you've got all that, a simple UDP-socket-like API might not be
the most natural or efficient way to implement a higher-level
partially-reliable protocol - the application couldn't cooperate with
the low-level network buffering to prioritise certain messages, it
couldn't use the packet headers that have already been added on top of
UDP, it would have to send acks from a script callback which may add
some latency after a packet is received from the network, etc. So I
think there's some tradeoffs and it's not a question of one low-level
protocol vs one strictly more restrictive higher-level protocol.
> So the question to the gamedevs will be, and please make suggestions for
> changes and I'll do an email round tonight:
>
> If browser and server vendors agree on and standardize a socket based
> network interface to be used for real-time games running in the browsers, at
> what level would you prefer the interface to be?
> (Note that an interface for communicating reliably via TCP and TLS are
> already implemented.)
> - A low-level interface similar to a plain UDP socket
> - A medium-level interface allowing for reliable and unreliable channels,
> automatically compressed data, flow control, data priority etc
> - A high-level interface with "ghosted entities"
That first option sounds like you're offering something very much like
a plain UDP socket (and I guess anyone who's willing to write their
own high-level wrapper (which is only hundreds or thousands of lines
of code and not a big deal for a complex game) would prefer that since
they want as much power as possible), but (as above) I think that's
misleading - it's really a UDP interface on top of a protocol that has
some quite different characteristics to UDP. So I think the question
should be clearer that the protocol will necessarily include various
features and restrictions on top of UDP, and the choice is whether it
includes the minimal set of features needed for security and hides
them behind a UDP-like interface or whether it includes higher-level
features and exposes them in a higher-level interface.
--
Philip Taylor
excors at gmail.com
From emoller at opera.com Tue Jun 1 13:02:05 2010
From: emoller at opera.com (=?iso-8859-15?Q?Erik_M=F6ller?=)
Date: Tue, 01 Jun 2010 22:02:05 +0200
Subject: [whatwg] WebSockets: UDP
In-Reply-To:
References:
Message-ID:
On Tue, 01 Jun 2010 21:14:33 +0200, Philip Taylor
wrote:
> More feedback is certainly good, though I think the libraries I
> mentioned (DirectPlay/OpenTNL/RakNet/ENet (there's probably more)) are
> useful as an indicator of common real needs (as opposed to edge-case
> or merely perceived needs) - they've been used by quite a few games
> and they seem to have largely converged on a core set of features, so
> that's better than just guessing.
>
> I guess many commercial games write their own instead of reusing
> third-party libraries, and I guess they often reimplement very similar
> concepts to these, but it would be good to have more reliable
> information about that.
>
I was hoping to be able to avoid looking at what the interfaces of a high
vs low level option would look like this early on in the discussions, but
perhaps we need to do just that; look at Torque, RakNet etc and find a
least common denominator and see what the reactions would be to such an
interface. Game companies are pretty restrictive about what they discuss,
but I think I know enough game devs to at least get some good feedback on
what would be required to make it work well with their engine/game.
>> I suspect they prefer to be "empowered with UDP" rather than "boxed
>> into a
>> high level protocol that doesn't fit their needs" but I may be wrong.
>
> If you put it like that, I don't see why anybody would not want to be
> empowered :-)
Yeah I wouldn't put it like that when asking :) I'm really not trying to
sell my view, I just like to see real browser gaming in a not too distant
future.
>
> But that's not the choice, since they could never really have UDP -
> the protocol will perhaps have to be Origin-based, connection-oriented
> (to exchange Origin information etc), with complex packet headers so
> you can't trick it into talking to a DNS server, with rate limiting in
> the browser to prevent DOS attacks, restricted to client-server (no
> peer-to-peer since you probably can't run a socket server in the
> browser), etc.
[...]
>
> That first option sounds like you're offering something very much like
> a plain UDP socket (and I guess anyone who's willing to write their
> own high-level wrapper (which is only hundreds or thousands of lines
> of code and not a big deal for a complex game) would prefer that since
> they want as much power as possible), but (as above) I think that's
> misleading - it's really a UDP interface on top of a protocol that has
> some quite different characteristics to UDP. So I think the question
> should be clearer that the protocol will necessarily include various
> features and restrictions on top of UDP, and the choice is whether it
> includes the minimal set of features needed for security and hides
> them behind a UDP-like interface or whether it includes higher-level
> features and exposes them in a higher-level interface.
So, what would the minimal set of limitations be to make a "UDP WebSocket"
browser-safe?
-No listen sockets
-No multicast
-Reliable handshake with origin info
-Automatic keep-alives
-Reliable close handshake
-Socket is bound to one address for the duration of its lifetime
-Sockets open sequentially (like current DOS protection in WebSockets)
-Cap on number of open sockets per server and total per user agent
--
Erik M?ller
Core Developer
Opera Software
From svartman95 at gmail.com Tue Jun 1 15:14:49 2010
From: svartman95 at gmail.com (Bjartur Thorlacius)
Date: Tue, 01 Jun 2010 22:14:49 +0000
Subject: [whatwg] audio and video: volume and muted as
content attributes?
Message-ID: <4c058668.5cebd80a.089e.2129@mx.google.com>
References:
<4c0420c9.d345d80a.5c04.ffffd9f9 at mx.google.com>
>Bjartur Thorlacius wrote:
>> Play-during can stop, autoplay and repeat sounds.
>> It's not obvious to me how this will apply to elements that represent
>> audiovisual content but volume: silent; unambiguously mutes content.
>> Decorating audio (such as background music in games or videos)
>> seem to be even more easily styled for some reason. Multiple
>> soundtracks can be muxed and assigned different loudness.
>> Also @media aural {display: none;} can be used on audio elements
>> but I haven't read the specs properly so I don't know if that would hide
>> an element when inside of an @media aural clause.
>>
>> CSS 3 aural has still to be done so more capabilities may be suggested.
>>
>Has there been any discussion about implementing support for CSS2
>aural in Web browsers? Until such a time - and in fact independently
>of that - I still think turning the existing volume and muted IDL
>attributes into content attributes would be a nice and simple
>solution. Introducing a whole CSS aural control section will take lots
>longer IMHO. Also, it won't hurt to have both - we do that for width
>and height, too.
It seems much more "The Right Way"(tm) to do such things in CSS.
Browsers don't have to conform to the whole aural specification nor
the speech module of CSS 3. I think CSS 3 will have seperate speech
and aural modules which would solve the problem entirely. Note also
that CSS 2 aural allows styling of cues. As there's a workaround
implementation time isn't the number one priority.
There's need for the capability so saying that it shouldn't be
implemented because of lack of discussion seems weird.
Lachlan Hunt wrote:
>On 2010-06-01 13:09, Bjartur Thorlacius wrote:
>> On 5/31/10, Silvia Pfeiffer wrote:
>>> I am not aware of a CSS property for media elements that lets you
>>> control the muted state. Can you link me to a specification?
>>
>> Well, http://www.w3.org/TR/CSS2/aural.html defines volume and
>> play-during. Play-during can stop, autoplay and repeat sounds.
>> It's not obvious to me how this will apply to elements that represent
>> audiovisual content but volume: silent; unambiguously mutes content.
>
>Those properties were designed for aural browsers using speech synthesis
>to read the content of a page, not to control multimedia in a page
>itself.
Well, sounds are to speech/text as images are to (written) text.
You can float both paragraphs and images because to CSS they're just boxes.
I don't see a reason not to allow authors to control the volume of sound
if they can do so with speech.
As for play-during it's so general that it might be included in interactive
visual media as well.
>Also, attempting to hijack those properties for use with
>multimedia content could create difficulties as you would have to define
>how the HTMLMediaElement's volume and muted properties interact with
>those CSS properties, if at all.
How's it done for other visual/behavioral content attributes in HTML?
Align, color and in fact most of the attributes of have similiar
problems.
From jsalsman at gmail.com Tue Jun 1 15:34:17 2010
From: jsalsman at gmail.com (James Salsman)
Date: Tue, 1 Jun 2010 15:34:17 -0700
Subject: [whatwg] WebSockets: UDP
In-Reply-To:
References:
<5EFBABCC-E71F-42BD-9E6E-52841653D265@geekhood.net>
Message-ID:
I agree UDP sockets are a legitimate, useful option, with applications
far beyond games. In most cases TCP is fine, but adaptive bit-rate
vocoders, for example, can use packet loss as an adaptation parameter,
and chose only to retransmit some of the more essential packets in
cases of congestion. I am not suggesting that javascript applications
should implement adaptive bit-rate vocoding (until a fast
cross-platform javascript signal processing library is developed, if
then) but there are reasons that a web application might want to send
both reliable and unreliable traffic; most all of them having to do
with adapting to bandwith constraints.
On Tue, Jun 1, 2010 at 8:52 AM, John Tamplin wrote:
>
>... How would proxies be handled?
UDP is supposed to never be buffered, not even by proxies. Proxies are
supposed to simply forward UDP without logging. Lots of them don't
forward any UDP, and alot of them probably log the traffic.
>?Even if specs were written and implementations available, how many years
> would it be before corporate proxies/firewalls supported WebSocket over UDP?
Maybe UDP adoption would follow adoption of SIP and RTP. Has anyone
measured the current rate of UDP transmission availability from the
typical corporate client host?
On Tue, Jun 1, 2010 at 1:02 PM, Erik M?ller wrote:
>....
> what would the minimal set of limitations be to make a "UDP WebSocket" browser-safe?
>
> -No listen sockets
For outgoing-from-client UDP, client-initiated TCP streams for
incoming responses and packet acknowledgment may be maximally
NAT-safe.
> -No multicast
People will eventually ask for it, but forwarding to it through
servers known to be free from NATs is preferable.
> -Reliable handshake with origin info
Nothing about UDP is reliable, you just send packets and hope they get there.
> -Automatic keep-alives
You mean on the incoming-to-client TCP channel in the opposite
direction from the UDP traffic?
> -Reliable close handshake
Can we use REST/HTTP/HTTPS persistent connections for this?
> -Socket is bound to one address for the duration of its lifetime
That sounds reasonable, but clients do change IP addresses now and
then, so maybe there should be some anticipation of this possibility?
> -Sockets open sequentially (like current DOS protection in WebSockets)
Do you mean their sequence numbers should be strictly increasing
incrementally until they roll over?
> -Cap on number of open sockets per server and total per user agent
There was some discussion that people rarely check for the error
condition when such caps are exausted, so I'm not sure whether that
should be the same as the system cap, or some fraction, or dozens, or
a developer configuration parameter.
From mark.frohnmayer at gmail.com Tue Jun 1 16:07:48 2010
From: mark.frohnmayer at gmail.com (Mark Frohnmayer)
Date: Tue, 1 Jun 2010 16:07:48 -0700
Subject: [whatwg] [hybi] WebSockets: UDP
In-Reply-To:
References:
Message-ID:
On Tue, Jun 1, 2010 at 1:02 PM, Erik M?ller wrote:
>
> I was hoping to be able to avoid looking at what the interfaces of a high vs
> low level option would look like this early on in the discussions, but
> perhaps we need to do just that; look at Torque, RakNet etc and find a least
> common denominator and see what the reactions would be to such an interface.
> Game companies are pretty restrictive about what they discuss, but I think I
> know enough game devs to at least get some good feedback on what would be
> required to make it work well with their engine/game.
Glad to see this discussion rolling! For what it's worth, the Torque
Sockets design effort was to take a stab at answering this question --
what is the least-common-denominator "webby" API/protocol that's
sufficiently useful to be a common foundation for real time games. I
did the first stab at porting OpenTNL (now tnl2) atop it; from my
reading of the RTP protocol that should easily layer as well, but it
would be worth getting the perspective of some other high-level
network stack folks (RakNet, etc).
>
>>> I suspect they prefer to be "empowered with UDP" rather than "boxed into
>>> a
>>> high level protocol that doesn't fit their needs" but I may be wrong.
>>
>> If you put it like that, I don't see why anybody would not want to be
>> empowered :-)
>
> Yeah I wouldn't put it like that when asking :) I'm really not trying to
> sell my view, I just like to see real browser gaming in a not too distant
> future.
Hmm... given the number of different approaches to higher-level game
networking I'd hate to see a high-level straightjacket where a
well-conceived low level API could easily support all of the existing
solutions out there. The more complex the API the larger the attack
surface at the trusted level and the more difficulty in getting
existing stakeholders (game and browser makers) on board.
>
> So, what would the minimal set of limitations be to make a "UDP WebSocket"
> browser-safe?
>
> -No listen sockets
Only feedback here would be I think p2p should be looked at in this
pass -- many client/server game instances are peers from the
perspective of the hosting service (XBox Live, Quake, Half-Life,
Battle.net) -- forcing all game traffic to pass through the hosting
domain is a severe constraint. My question -- what does a "webby" p2p
solution look like regarding Origin restrictions, etc?
> -No multicast
> -Reliable handshake with origin info
> -Automatic keep-alives
> -Reliable close handshake
While we're at it, I'd add key exchange, encryption and client puzzles
to reduce connection depletion/CPU depletion attacks to the handshake.
The protocol you seem to be aiming for isn't UDP -- rather it's more
like an connected, unreliable packet stream between hosts.
> -Socket is bound to one address for the duration of its lifetime
> -Sockets open sequentially (like current DOS protection in WebSockets)
> -Cap on number of open sockets per server and total per user agent
A single UDP socket can host multiple connections (indexed by packet
source address), so even a modest limit on actual number of sockets
wouldn't be a big impediment.
I'd also advocate for packet delivery notification to be a part of the
API -- with a known success or failure status on packet delivery many
of the higher level data transmission policies become trivial, and
should be essentially zero overhead at the protocol level. Without
notification the higher level code has to do manual packet
acknowledgement as Phil mentioned.
Regards,
Mark
From shess at google.com Tue Jun 1 16:34:05 2010
From: shess at google.com (Scott Hess)
Date: Tue, 1 Jun 2010 16:34:05 -0700
Subject: [whatwg] [hybi] WebSockets: UDP
In-Reply-To:
References:
Message-ID:
On Tue, Jun 1, 2010 at 4:07 PM, Mark Frohnmayer
wrote:
> On Tue, Jun 1, 2010 at 1:02 PM, Erik M?ller wrote:
>> So, what would the minimal set of limitations be to make a "UDP WebSocket"
>> browser-safe?
>>
>> -No listen sockets
>
> Only feedback here would be I think p2p should be looked at in this
> pass -- many client/server game instances are peers from the
> perspective of the hosting service (XBox Live, Quake, Half-Life,
> Battle.net) -- forcing all game traffic to pass through the hosting
> domain is a severe constraint. ?My question -- what does a "webby" p2p
> solution look like regarding Origin restrictions, etc?
Unix domain sockets allow you to pass file descriptors between
processes. It might be interesting to pass a WebSocket endpoint
across a WebSocket. If the clients can punch through NATs, it becomes
a direct peer-to-peer connection, otherwise it gets proxied through
the server. Probably makes implementations excessively complicated,
though. UDP-style would be easier (no need to worry about data
received by the server after it initiates pushing the endpoint to the
other client - just drop it on the floor).
-scott
From mark.frohnmayer at gmail.com Tue Jun 1 17:12:15 2010
From: mark.frohnmayer at gmail.com (Mark Frohnmayer)
Date: Tue, 1 Jun 2010 17:12:15 -0700
Subject: [whatwg] [hybi] WebSockets: UDP
In-Reply-To: <218FD9A5-77A9-499C-8170-38621354C988@surrey.ac.uk>
References:
<218FD9A5-77A9-499C-8170-38621354C988@surrey.ac.uk>
Message-ID:
On Tue, Jun 1, 2010 at 4:35 PM, wrote:
> On 2 Jun 2010, at 00:07, Mark Frohnmayer wrote:
>> A single UDP socket can host multiple connections (indexed by packet
>> source address), so even a modest limit on actual number of sockets
>> wouldn't be a big impediment.
>
> Um, NAT?
You would want to index by the NAT'd address. In the case of peer
introduction and connection a third party is needed to provide the
external send-to address.
Is that what you were asking?
Regards,
Mark
From ben.garney at gmail.com Tue Jun 1 17:24:36 2010
From: ben.garney at gmail.com (Ben Garney)
Date: Tue, 1 Jun 2010 17:24:36 -0700
Subject: [whatwg] [hybi] WebSockets: UDP
In-Reply-To:
References:
<218FD9A5-77A9-499C-8170-38621354C988@surrey.ac.uk>
Message-ID:
On Tue, Jun 1, 2010 at 5:12 PM, Mark Frohnmayer
wrote:
> On Tue, Jun 1, 2010 at 4:35 PM, wrote:
> > On 2 Jun 2010, at 00:07, Mark Frohnmayer wrote:
> >> A single UDP socket can host multiple connections (indexed by packet
> >> source address), so even a modest limit on actual number of sockets
> >> wouldn't be a big impediment.
> >
> > Um, NAT?
>
> You would want to index by the NAT'd address. In the case of peer
> introduction and connection a third party is needed to provide the
> external send-to address.
>
>
In some cases you need to use UPNP to NAT, but in general the 3rd
party connection facilitator will help. The UPNP is mostly needed so that
clients can _host_, which is not the goal here.
If we assume a public, carefully set up UDP host, then nearly anyone can
connect if UDP is allowed at all. No NAT is required in this case. And I
think this is the common case, since we are not trying to run service hosts
in the browser at this time.
If you have any sort of connection identifier (typically port will be
different even if IP is not), then you can multiplex by that.
(Also, hi! This is my first post. I'm Ben Garney, I worked at PushButton
Labs on Flash game technology (www.pushbuttonengine.com,
www.pushbuttonlabs.com). Naturally, seeing browser capabilities expand
either by plugin or native capabilities is exciting. Before I worked at PBL
I worked with Mark at GarageGames on networking technology, among other
things.)
Ben
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From julian.reschke at gmx.de Tue Jun 1 22:23:12 2010
From: julian.reschke at gmx.de (Julian Reschke)
Date: Wed, 02 Jun 2010 07:23:12 +0200
Subject: [whatwg] ISSUE-86,
Re: hixie: Remove the HTML-to-Atom mapping definition from the W3C
version of the spec. (whatwg r5100)
In-Reply-To: <20100602042010.512582BCC3@toro.w3.mag.keio.ac.jp>
References: <20100602042010.512582BCC3@toro.w3.mag.keio.ac.jp>
Message-ID: <4C05EAC0.3020506@gmx.de>
Hi Ian,
thanks for the removal.
I notice that you kept the text in the WHATWG version of the spec.
Various problems have been reported with respect to the mapping, notably
and
and in the Working Group discussions around
Please consider them raised (and still open) as per the WHATWG issue
tracking rules.
Best regards, Julian
On 02.06.2010 06:20, poot wrote:
> hixie: Remove the HTML-to-Atom mapping definition from the W3C version
> of the spec. (whatwg r5100)
>
> http://dev.w3.org/cvsweb/html5/spec/Overview.html?r1=1.4095&r2=1.4096&f=h
> http://html5.org/tools/web-apps-tracker?from=5099&to=5100
>
> ===================================================================
> RCS file: /sources/public/html5/spec/Overview.html,v
> retrieving revision 1.4095
> retrieving revision 1.4096
> diff -u -d -r1.4095 -r1.4096
> --- Overview.html 1 Jun 2010 04:26:11 -0000 1.4095
> +++ Overview.html 2 Jun 2010 04:19:31 -0000 1.4096
> @@ -287,7 +287,7 @@
>
> HTML5
> A vocabulary and associated APIs for HTML and XHTML
> -Editor's Draft 1 June 2010
> +Editor's Draft 2 June 2010
> Latest Published Version:
> http://www.w3.org/TR/html5/
> Latest Editor's Draft:
> @@ -390,7 +390,7 @@
> Group is the W3C working group responsible for this
> specification's progress along the W3C Recommendation
> track.
> - This specification is the 1 June 2010 Editor's Draft.
> + This specification is the 2 June 2010 Editor's Draft.
>
The contents of this specification are also part ofa
> specification published by theWHATWG , which is available under a
> license that permits reuse of the specification text.
This document was produced by a group operating under the5
> @@ -867,9 +867,7 @@
>
> 4.14.1 Case-sensitivity
> 4.14.2 Pseudo-classes
> -4.15 Converting HTML to other formats
> -
> -4.15.1 Atom
> +4.15 Converting HTML to other formats
> 5 Loading Web pages
>
> 5.1 Browsing contexts
> @@ -40034,457 +40032,6 @@
> Status: Last call for comments
>
>
> -4.15.1 AtomStatus: Last call for comments. ISSUE-86 (atom-id-stability) blocks progress to Last Call
> -
> -Given aDocument source , a user
> - agent may run the following algorithm to. This is not the only algorithm
> - that can be used for this purpose; for instance, a user agent might
> - instead use the hAtom algorithm.[HATOM]
> -
> -If theDocument source does
> - not contain anyarticle elements, then return nothing
> - and abort these steps. This algorithm can only be used with
> - documents that contain distinct articles.
> -
> -LetR be an emptyXML Document object whoseaddress is user-agent
> - defined.
> -
> -Append afeed element in the
> -Atom namespace toR .
> -
> -
> -
> -For eachmeta element with aname attribute and acontent attribute and whosename attribute's value isauthor , run the following substeps:
> -
> -Append anauthor element in the
> -Atom namespace to the root element ofR .
> -
> -Append aname element in the
> -Atom namespace to the element created in the
> - previous step.
> -
> -Append a text node whose data is the value of the
> -meta element'scontent attribute to the element
> - created in the previous step.
> -
> -
> -
> -
> -
> -If there is alink element whoserel attribute's value includes the
> - keywordicon , and that element also
> - has anhref attribute whose
> - value successfullyresolves
> - relative to thelink element, then append anicon element in theAtom namespace to
> - the root element ofR whose contents is a text
> - node with its data set to theabsolute URL resulting
> - fromresolving the value of the
> -href attribute.
> -
> -
> -
> -
> -
> -
> -
> -Append anid element in theAtom
> - namespace to the root element ofR
> - whose contents is a text node with its data set tothe
> - document's current address .
> -
> -
> -
> -
> -
> -Optionally: Letx be alink element in theAtom
> - namespace . Add arel attribute whose
> - value is the string "self" tox . Append a text node with its data set to the
> - (user-agent-defined)address ofR tox . Appendx to the root element
> - ofR .
> -
> -This step would be skipped when the documentR has no convenientaddress . The presence of therel="self" link is a "should"-level requirement in
> - the Atom specification.
> -
> -
> -
> -
> -
> -Letx be alink
> - element in theAtom namespace . Add arel attribute whose value is the string "alternate" tox . If the
> - document being converted is anHTML
> - document , add atype attribute whose
> - value is the string "text/html " tox . Otherwise, the document being converted is an
> -XML document ; add atype attribute whose value is the string
> - "application/xhtml+xml " tox . Append a text node with its data set to
> -the document's current address tox . Appendx to the root element
> - ofR .
> -
> -
> -
> -Letsubheading text be the empty
> - string.
> -
> -Letheading be the first element of
> -heading content whose nearest ancestor of
> -sectioning content isthe body
> - element , if any, or null if there is none.
> -
> -
> -
> -Take the appropriate action from the following list, as
> - determined by the type of theheading
> - element:
> -
> -Ifheading is null
> -
> -
> -
> -Letheading text be the
> -textContent ofthetitle
> - element , if there is one, or the empty string
> - otherwise.
> -
> -
> -
> -Ifheading is ahgroup element
> -
> -
> -
> -Ifheading contains no child
> -h1 –h6 elements, letheading text be the empty string.
> -
> -Otherwise, letheadings list be a list of
> - all theh1 –h6 element children
> - ofheading , sorted first by descending
> -rank and then intree order (so
> -h1 s first, thenh2 s, etc, with each
> - group in the order they appear in the document). Then, letheading text be thetextContent of
> - the first entry inheadings list , and if
> - there are multiple entries, letsubheading
> - text be thetextContent of the second entry
> - inheadings list .
> -
> -
> -
> -Ifheading is anh1 –h6 element
> -
> -
> -
> -Letheading text be the
> -textContent ofheading .
> -
> -
> -
> -
> -
> -
> -
> -Append atitle element in theAtom
> - namespace to the root element ofR
> - whose contents is a text node with its data set toheading text .
> -
> -
> -
> -
> -
> -Ifsubheading text is not the empty string,
> - append asubtitle element in theAtom
> - namespace to the root element ofR
> - whose contents is a text node with its data set tosubheading text .
> -
> -
> -
> -Letglobal update date have no
> - value.
> -
> -
> -
> -For eacharticle elementarticle that does not have an ancestor
> -article element, run the following steps:
> -
> -LetE be anentry element in theAtom namespace ,
> - and appendE to the root element ofR .
> -
> -Letheading be the first element of
> -heading content whose nearest ancestor of
> -sectioning content isarticle ,
> - if any, or null if there is none.
> -
> -
> -
> -Take the appropriate action from the following list, as
> - determined by the type of theheading
> - element:
> -
> -Ifheading is null
> -
> -
> -
> -Letheading text be the empty
> - string.
> -
> -
> -
> -Ifheading is ahgroup element
> -
> -
> -
> -Ifheading contains no child
> -h1 –h6 elements, letheading text be the empty string.
> -
> -Otherwise, letheadings list be a list
> - of all theh1 –h6 element
> - children ofheading , sorted first by
> - descendingrank and then intree
> - order (soh1 s first, then
> -h2 s, etc, with each group in the order they
> - appear in the document). Then, letheading
> - text be thetextContent of the first entry
> - inheadings list .
> -
> -
> -
> -Ifheading is anh1 –h6 element
> -
> -
> -
> -Letheading text be the
> -textContent ofheading .
> -
> -
> -
> -
> -
> -
> -
> -Append atitle element in the
> -Atom namespace toE whose
> - contents is a text node with its data set toheading text .
> -
> -
> -
> -
> -
> -
> -
> -Clonearticle and its descendants into an
> - environment that hasscripting
> - disabled , has noplugins , and
> - fails any attempt tofetch any
> - resources. Letcloned article be the
> - resulting clonearticle element.
> -
> -
> -
> -
> -
> -Remove from the subtree rooted atcloned
> - article anyarticle elements other than the
> -cloned article itself, any
> -header ,footer , ornav
> - elements whose nearest ancestor ofsectioning
> - content is thecloned article , and
> - the first element ofheading content whose nearest
> - ancestor ofsectioning content is thecloned article , if any.
> -
> -
> -
> -
> -
> -Ifcloned article contains any
> -ins ordel elements withdatetime attributes whose
> - valuesparse
> - as global date and time strings without errors, then let
> -update date be the value of thedatetime attribute that parses
> - to the newestglobal date and
> - time .
> -
> -Otherwise, letupdate date have no
> - value.
> -
> -This value is used below; it is calculated here
> - because in certain cases the next step mutates thecloned article .
> -
> -
> -
> -
> -
> -If the document being converted is anHTML document , then: Letx
> - be acontent element in theAtom
> - namespace . Add atype attribute
> - whose value is the string "html" tox . Append a text node with its data set to the
> - result of running theHTML fragment serialization
> - algorithm oncloned article tox . Appendx toE .
> -
> -Otherwise, the document being converted is anXML document : Letx be acontent element in
> - theAtom namespace . Add atype attribute whose value is the string "xml" tox . Append a
> -div element tox . Move all the
> - child nodes of thecloned article node to
> - thatdiv element, preserving their relative
> - order. Appendx toE .
> -
> -
> -
> -
> -
> -Establish the value ofid andhas-alternate from the first of the following to
> - apply:
> -
> -If thearticle node has a descendant
> -a orarea element with anhref attribute that
> - successfullyresolves
> - relative to that descendant and arel attribute whose value
> - includes thebookmark
> - keyword
> -
> -Letid be theabsolute URL
> - resulting fromresolving the
> - value of thehref
> - attribute of the first sucha orarea
> - element, relative to the element. Lethas-alternate be true.
> -
> -If thearticle node has anid attribute
> -
> -Letid bethe document's current
> - address , with the fragment identifier (if any) removed,
> - and with a new fragment identifier specified, consisting of the
> - value of thearticle element'sid attribute. Lethas-alternate be false.
> -
> -Otherwise
> -
> -Letid be a user-agent-defined
> - undereferenceable yet globally uniquevalid absolute URL . The same
> -absolute URL should be generated for each run of
> - this algorithm when given the same input. Lethas-alternate be false.
> -
> -
> -
> -
> -
> -Append anid element in theAtom
> - namespace toE whose contents is a
> - text node with its data set toid .
> -
> -
> -
> -
> -
> -Ifhas-alternate is true: Letx be alink element in the
> -Atom namespace . Add arel
> - attribute whose value is the string "alternate" tox . Append a
> - text node with its data set toid tox . Appendx toE .
> -
> -
> -
> -
> -
> -Ifarticle has atime
> - element descendant that has apubdate attribute and whose
> - nearest ancestorarticle element isarticle , and the first such element'sdate is not unknown, then run
> - the following substeps, withe being the
> - first such element:
> -
> -Letdatetime be aglobal date and time whose date
> - component is thedate of
> -e .
> -
> -Ife 'stime andtime-zone offset are not
> - unknown, then letdatetime 's time and
> - time-zone offset components be thetime andtime-zone offset ofe . Otherwise, let them be midnight and no offset
> - respectively ("00:00Z").
> -
> -Letpublication date be the
> -best representation of the global date and time
> - string datetime .
> -
> -Otherwise, letpublication date have no
> - value.
> -
> -
> -
> -
> -
> -Ifupdate date has no value butpublication date does, then letupdate date have the value ofpublication date .
> -
> -Otherwise, ifpublication date has no
> - value butupdate date does, then letpublication date have the value ofupdate date .
> -
> -
> -
> -
> -
> -Ifupdate date has a value, andglobal update date has no value or is less recent
> - thanupdate date , then letglobal update date have the value ofupdate date .
> -
> -
> -
> -
> -
> -Ifpublication date andupdate date both still have no value, then let
> - them both value a value that is avalid global date and
> - time string representing theglobal date and time of the
> - moment that this algorithm was invoked.
> -
> -
> -
> -
> -
> -Append anpublished element in the
> -Atom namespace toE whose
> - contents is a text node with its data set topublication date .
> -
> -
> -
> -
> -
> -Append anupdated element in the
> -Atom namespace toE whose
> - contents is a text node with its data set toupdate date .
> -
> -
> -
> -
> -
> -
> -
> -Ifglobal update date has no value, then
> - let it have a value that is avalid global date and time
> - string representing theglobal date and time of the date
> - and time of theDocument 's source file's last
> - modification, if it is known, or else of the moment that this
> - algorithm was invoked.
> -
> -
> -
> -
> -
> -Insert anupdated element in the
> -Atom namespace into the root element ofR before the firstentry in
> - theAtom namespace whose contents is a text node with
> - its data set toglobal update date .
> -
> -
> -
> -Return the Atom documentR .
> -
> -The above algorithm does not guarantee that the
> - output will be a conforming Atom feed. In particular, if
> - insufficient information is provided in the document (e.g. if the
> - document does not have any<meta name="author"
> - content="..."> elements), then the output will not be
> - conforming.
> -
> -TheAtom namespace is:http://www.w3.org/2005/Atom
> -
> -
>
> 5 Loading Web pagesStatus: Last call for comments
>
> @@ -67614,10 +67161,6 @@
>
(Non-normative)Inter Gravissimas , A. Lilius,
> C. Clavius. Gregory XIII Papal Bulls, February 1582.
>
> -
[HATOM]
> -
(Non-normative)hAtom , D
> - Janes. Microformats.
> -
>
[HTMLDIFF]
>
>
>
>
>
>
install
>
>