[rtcweb] Real-time text

Gunnar Hellstrom <gunnar.hellstrom@omnitor.se> Tue, 17 December 2013 10:16 UTC

Return-Path: <gunnar.hellstrom@omnitor.se>
X-Original-To: rtcweb@ietfa.amsl.com
Delivered-To: rtcweb@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id E7B471AE14A for <rtcweb@ietfa.amsl.com>; Tue, 17 Dec 2013 02:16:12 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Level:
X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001] autolearn=ham
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 5H04Y8ENlUiV for <rtcweb@ietfa.amsl.com>; Tue, 17 Dec 2013 02:16:09 -0800 (PST)
Received: from vsp-authed-03-02.binero.net (vsp-authed02.binero.net [195.74.38.226]) by ietfa.amsl.com (Postfix) with ESMTP id 3B95C1AE147 for <rtcweb@ietf.org>; Tue, 17 Dec 2013 02:16:07 -0800 (PST)
Received: from smtp01.binero.se (unknown [195.74.38.28]) by vsp-authed-03-02.binero.net (Halon Mail Gateway) with ESMTPS; Tue, 17 Dec 2013 11:15:58 +0100 (CET)
Received: from [192.168.50.32] (81-224-110-16-no227.business.telia.com [81.224.110.16]) (Authenticated sender: gunnar.hellstrom@omnitor.se) by smtp-08-01.atm.binero.net (Postfix) with ESMTPA id A27093A1F7; Tue, 17 Dec 2013 11:15:57 +0100 (CET)
Message-ID: <52B0245E.5000003@omnitor.se>
Date: Tue, 17 Dec 2013 11:15:58 +0100
From: Gunnar Hellstrom <gunnar.hellstrom@omnitor.se>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0
MIME-Version: 1.0
To: Adam Roach <adam@nostrum.com>, rtcweb@ietf.org
References: <50B87606.5030802@ericsson.com> <50BB22EB.1030803@ericsson.com> <A146C647-C0CB-413C-B7D1-B84FE2FF5041@standardstrack.com> <C5E08FE080ACFD4DAE31E4BDBF944EB113276B4A@xmb-aln-x02.cisco.com> <BLU405-EAS354CC2E5F543EC4B6DD57F393400@phx.gbl> <50BCFCFE.3080104@nostrum.com>
In-Reply-To: <50BCFCFE.3080104@nostrum.com>
Content-Type: multipart/alternative; boundary="------------040002040807000904070902"
Subject: [rtcweb] Real-time text
X-BeenThere: rtcweb@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: Real-Time Communication in WEB-browsers working group list <rtcweb.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/rtcweb>, <mailto:rtcweb-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/rtcweb/>
List-Post: <mailto:rtcweb@ietf.org>
List-Help: <mailto:rtcweb-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/rtcweb>, <mailto:rtcweb-request@ietf.org?subject=subscribe>
X-List-Received-Date: Tue, 17 Dec 2013 10:16:13 -0000

I am picking up an old thread about how to do real-time text (RTT) in 
the WebRTC environment.
On 2012-12-03 20:26, Adam Roach wrote:
> We can do RTT right now with data channels. I can hack together a 
> ridiculously simple example on top of Firefox Nightly build if you 
> want to see it.
Yes, I want to accept that offer, thanks.

It would also be good to have a common specification on how to do it.

Here is a set of requirements:

 1. Text shall be delivered in order.
 2. The presentation protocol elements shall be conveyed to the receiver.
 3. Transmission problems shall not cause long blocking of transmission
    for retries, but rather mark the loss and transmit next text sample.
 4. If there are transmission problems, retries shall continue up to a
    defined maximum time (e.g. 3 seconds). If unsuccessful, the
    transmitter should be notified, and the receiver shall be notified
    at least at next successful transmission to the receiver.
 5. Duplications shall not appear.
 6. Gaps appearing because of bad transmission shall be marked in the
    received text. When T.140 is used, that is done by the UTF-8
    character "replacement character".
 7. The source of the transmission shall be conveyed so that it can be
    displayed together with received text.
 8. The transmission contents are short time-sampled strings of UTF-8
    coded characters consisting of text and presentation control codes.
    (e.g. according to ITU-T T.140)
 9. The method shall not cause overhead of more than 10 kbit/s (rather
    much less) when transmitting every 300 ms.
10. Transmission shall be performed in time samples of 300 - 700 ms
    each. 300 ms is preferred if overhead is acceptable.
11. It shall be possible to use the transmission for multiparty calls,
    where text from different sources shall be displayed separate, e.g.
    as in a multiparty text chat but with real-time display. This can be
    achieved in three ways:

a.Each transmission has information about the source in a structured way.

b.Each source sets up its own data channel. The source is identified 
when the channel is set up.

c.Source information is embedded in the text.

I have tried to map these requirements to the rtcweb data channel with 
the following conclusions:

*RTCDataChannel use for real-time text transmission*

The WebRTC data channel offers suitable types of reliable or 
partially-reliable channels where retransmissions can be maximised to a 
time or a number.

The RTCDataChannel type most suited for these requirements seem to be 
the ordered type with a MaxReTransmit Time=3000, and Protocol= T140 ( 
T140 needs to be registered with IANA, before that is completed, the 
experimental versions need to set Label = T140. )

But it is not clear if it provides information about transmission 
failures to the transmitter or the receiver.

If no error info about loss is provided, then a sequence number needs to 
be provided with each transmission and an identification of gaps on 
reception.

The connections can become closed in case of transmission problems. It 
should then be opened again. In such a procedure, it cannot be known if 
text was lost or transmitted in the shift between the current and 
previous channel instance. Therefore it seems that text samples should 
have sequence numbers, and the receiving application need to check 
arrived text samples for duplication and loss. In case of duplication, 
the duplicate shall be discarded. In case of loss, the UTF-8 replacement 
character shall be inserted in the received string.

The transmitter samples the text source for text and transmits every 300 
ms, when there is text to transmit.
The receiver checks received text for duplication and gaps and displays 
text according to T.140 presentation.



Do you agree in these conclusions?

/Gunnar