Re: [rtcweb] New Version Notification for draft-jesup-rtcweb-data-01.txt

Michael Tuexen <> Fri, 11 November 2011 21:14 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id 9DF3421F85A4 for <>; Fri, 11 Nov 2011 13:14:53 -0800 (PST)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -2.295
X-Spam-Status: No, score=-2.295 tagged_above=-999 required=5 tests=[AWL=0.304, BAYES_00=-2.599]
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id gyVy4y8OIYGA for <>; Fri, 11 Nov 2011 13:14:52 -0800 (PST)
Received: from ( [IPv6:2001:638:a02:a001:20e:cff:fe4a:feaa]) by (Postfix) with ESMTP id 18AEA21F8573 for <>; Fri, 11 Nov 2011 13:14:51 -0800 (PST)
Received: from [] ( []) (Authenticated sender: macmic) by (Postfix) with ESMTP id 42E6C1C0C0BCF; Fri, 11 Nov 2011 22:14:50 +0100 (CET)
Mime-Version: 1.0 (Apple Message framework v1251.1)
Content-Type: text/plain; charset=us-ascii
From: Michael Tuexen <>
In-Reply-To: <>
Date: Fri, 11 Nov 2011 22:14:49 +0100
Content-Transfer-Encoding: quoted-printable
Message-Id: <>
References: <> <> <> <> <>
To: Michael Thornburgh <>
X-Mailer: Apple Mail (2.1251.1)
Cc: "" <>
Subject: Re: [rtcweb] New Version Notification for draft-jesup-rtcweb-data-01.txt
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Real-Time Communication in WEB-browsers working group list <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Fri, 11 Nov 2011 21:14:53 -0000

On Nov 11, 2011, at 8:52 PM, Michael Thornburgh wrote:

> hi Michael. my comments also inline.
>> -----Original Message-----
>> From: Michael Tuexen [] 
>> Sent: Friday, November 11, 2011 5:16 AM
>> Subject: Re: [rtcweb] New Version Notification for draft-jesup-rtcweb-data-01.txt
>> Hi Michael,
>> see my comments in-line.
>> Best regards
>> Michael
>> On Nov 3, 2011, at 2:12 AM, Michael Thornburgh wrote:
> [...]
>>> o (most important for real-time communication): each user data fragment/chunk is assigned an SCTP Transmission Sequence Number (TSN) at the time of first transmission. that means even if your SCTP implementation supported stream prioritization somehow, the priority decision is only made at first transmission time. since there's just one TSN space and the Gap Ack structure only talks about TSNs, it's undesirable for gaps to persist (else the Gap Ack structure will continue to grow as more losses naturally happen). therefore it's desirable to repair gaps as quickly as possible. this may inappropriately increase the priority of a low priority fragment/chunk/stream during periods of congestion, which is exactly when priority matters (this is a "priority inversion").
>> What might help is that messages have priorities and the sender is allowed to abandon messages
>> with low priorities in case of congestion (timer based retransmissions). Something which is supported by PR-SCTP.
> sure. but the problem here is the low priority stream is likely to be one that needs full reliability (like a bulk data transfer that you want to use "background" bandwidth but still eventually get delivered). in that case you don't want the sender to abandon the low priority message, and that's what leads to the priority inversion.
So you want to send the bulk transfer with low priority but full reliability?
And have some other messages, for example with high priority, but only limited reliability?
You could do this. The only point: You need something to drop to improve things.
Or do you want everything with full reliability?
>>> o (second most important for real-time communication): there's only one receive window advertisement for all of the streams, rather than one receive window per stream. this means there's no per-stream flow control. so if you're receiving (for example) a bulk file transfer and real-time player position updates and text chat messages, and you need to suspend the file transfer stream for a time, that means you must also suspend the player position updates and text chat messages. unless you spin up an entirely separate SCTP for each flow control domain, which is lame and defeats the purpose of stream multiplexing.
>> You can use priorities tied to streams at the sender side.
> priority doesn't solve the problem at all. the issue is that if the receiver needs to stop accepting data on one stream, the only indication of reverse pressure to the sender is the association-wide receive window advertisement. the only in-protocol flow control is association-wide. the only solution is to not have the receiver suspend reading any stream and to use application-layer flow control to signal the sender to stop sending data on one stream or another.
We have looked into this. Providing per stream flow control is hard to do as an extension
to SCTP without introducing deadlocks. Looking at the SCTP socket API, there is a socket
per association, so you can't read per stream. If you want signaling from the receiver,
it must be done at the application layer. You can't use the flow control mechanism for that.
>>> o SCTP specifies the maximum number of streams in each direction at association startup. web applications may not know the number of streams needed up front; in fact, the number of streams needed in any real-world non-SS7 data application is very likely to evolve over the lifetime of that application, naturally increasing and decreasing.
>> You don't need a lot of resources for the receive side of a stream. So you could either negotiate a number
>> large enough or use the extension
>> which is currently in IETF LC. It enables you to add streams on the fly.
> ok. i'm glad someone thought of that.
>>> o the semantics of unordered messages are confusing and not a good map to WebRTC. they are semantically equivalent to an entirely separate stream loosely associated to the ordered stream of the same number. there's no way to tell (without application layer sequencing) if an unordered message has been lost/abandoned by the sender. at the protocol level, TSNs can be used to recover the queuing order of received unordered messages, but the TSNs are semantically disconnected from the SCTP user. recovering the original queuing order over a short reorder/reassembly window period is desirable in some real-time applications.
>> The concept of PR-SCTP is that the receiver can handle this. Since the sender decided that the sequencing
>> is not important, why should be receiver care?
> my main point was that, specifically in the case of PR-SCTP, since unordered messages don't have a stream sequence number there's no way to tell at the receiver if one (or more) has been abandoned. gaps in the ordered message space can be detected.
Conceptual question: Why does unordered  data need some ordering information.
It sounds to me that you don't have unordered stuff in mind, but ordered unreliable stuff.
>>> o an SCTP receiver should be able to choose to receive stream messages in originally-queued order or as-received-on-the-network order on a per-stream basis, and be able to recover the original queuing order to whatever extent desired (potentially limited by real-time constraints) when receiving in network order. SCTP's unordered message semantics are designed for "out-of-band" messages, and are not a good fit for general "real-time" data. transmission order should be determined by the sender, reception order should be determined by the receiver.
>> It is a sender side thing. If the sender requires in-sequence delivery, you want the receiver to ignore
>> this requirement? If there is not sequencing constraint, the sender should not send it ordered.
> it's natural to use unordered messages for real-time data, since they can be delivered to the user as soon as they arrive even if there are gaps. however, in exactly these real-time scenarios, it's still often useful to know the original queuing order of the messages, and to allow the receiver to partially recover the original queuing order in, for example, a jitter/reorder buffer. this can be accomplished with application-layer sequence numbers, but it seems silly to have to duplicate existing protocol-level functionality (see my point about flow control above).
Hmm. Looking at the service you want doesn't seem be unordered. For me this looks like
an ordered unreliable service, taking some timing requirements into account.
So the problem is not, that SCTP does not provide a SSN for unordered DATA chunks,
but that you use unordered messages instead of ordered and that currently you can't
tell SCTP to deliver messages if they stayed for some time in the receive buffer.
However, this is a receiver side only thing which could be done. This would be
a local receiver side only modification supporting partial reliability. It could be
done. It is more an API issue.

However, I would assume that this applies mostly to multi media stuff. Isn't RTP
the protocol being considered for that?
>>> o the stream sequence number being only 16 bits limits the maximum message rate through high delay networks where message gaps can be reliably detected at the receiver, when the sender uses limited-reliability, to 32767 messages/RTT. that sounds large, but could be easily reached even today in moderately high bandwidth*delay paths if messages are small.
>> I don't understand this limitation. The is a 32-bit sequence number space (TSNs) which limits you 2**31 - 1
>> DATA chunks being in flight (as indicated by the last sentence of Section 6.1 of RFC 4960),
>> but the 16-bit per stream sequence numbering (SSNs) does not have this restriction.
>> The receiver will recover the sequencing based on SSN and TSN. At least this is 
> this is only a problem with PR-SCTP. if stream sequence numbers can be abandoned, then there's ambiguity in the stream sequence number space when you receive a FORWARD TSN chunk if there were more than 32768 stream sequence numbers in flight.
Hmm. Interesting point. I think you don't need to limit the number of outstanding user messages per
stream to 32768. The crucial point is that you can only FORWARD-TSN the 64K lowest TSN per stream
in a single FORWARD-TSN chunk. So you might need multiple FORWARD-TSN chunks if you need to FORWARD-TSN
a lot of messages per stream. But it doesn't limit the throughput, I think.
> [...]
> -mike