WebRTC data channels

2,166 views
Skip to first unread message

Shachar

unread,
Jan 8, 2013, 12:13:30 PM1/8/13
to discuss...@googlegroups.com
Hi All,
After playing with the data channels quite a bit, I have a few remarks/issues:
1. The biggest string I could send over the datachannel varied between 900bytes to 1300bytes.
2. I couldn't send a few messages one after the other over dc: 
I even tried sending message from peer1 to peer2 ,
then peer2 sent an 'ack' back to peer1,
and right after receiving the 'ack' from peer2, peer1 couldn't send messages (only after a ~300ms timeout).
Obviously those 2 points limit the transfer rate severely.
3. Another interesting issue, is that peer1 can get a dc.readyState = open, send a message to peer2, and peer2 actually receives the message before his dc.readyState changes to open.
(and can't actually send back a message on that dc untill the state changes to open).

After raising all these issues, you can check out the demo I've worked on: sharefest.peer5.com

would love any feedback,
Shachar




Jesper lindstrøm

unread,
Jan 8, 2013, 2:35:08 PM1/8/13
to discuss...@googlegroups.com
Hi,

I expected the exact same thing when i used datachannels for creating about the same app as you (https://github.com/lindstroem/FileTransfer).
My example only works with Google Chrome Canary's implementation of datachannel and here they only support reliable = false.

To get the communication reliable i've also implemented the 'ack' messages but in some rare cases (after x number of bites send) the communication missed a package and then i needed to set a timeout as you described as well.

I've also experienced the size of the timeout needed is related to how large the message you just tried to send is.

My first attempt was to send file chunks of 1024 bytes which was horrible therefore i went for file chunks of 32 bytes which was a lot better but the dropouts of messages still happens.

You can see my reliable datachannel implementation here: https://github.com/lindstroem/FileTransfer/blob/master/app/scripts/OnDataChannel.js Its not the best code but it works.

//Jesper

Vikas Marwaha

unread,
Jan 8, 2013, 5:51:26 PM1/8/13
to discuss...@googlegroups.com
Hi,

Thanks for the feedback regarding 3, there is an issue filed in the tracker. You can check issue 1262.

/Vikas






--
 
 
 

Shachar

unread,
Mar 20, 2013, 10:30:57 AM3/20/13
to discuss...@googlegroups.com
see my discussion with feross:
https://github.com/Peer5/ShareFest/issues/10

Justin Uberti

unread,
Mar 20, 2013, 5:30:50 PM3/20/13
to discuss-webrtc
The bandwidth is limited by default because there is no rate control. This will be fixed when we move to the SCTP-based DataChannel impl.


--
 
---
You received this message because you are subscribed to the Google Groups "discuss-webrtc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrt...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Dennis Mårtensson

unread,
Apr 4, 2013, 6:17:16 PM4/4/13
to discuss...@googlegroups.com
Hi How did you raise this limit of the datachannel transfer? 

Thank 

Dennis 

Den onsdagen den 20:e mars 2013 kl. 10:12:05 UTC+1 skrev Koldi:
Hi. I have the same problem, that webrtc datachannel limit my DC bandwidth for 3 KB/sec.

I want to implement a simple file transfer application, and because webrtc doesn't support binary data send yet, i base64 encoded my data, and cut it for chunks(1024 bytes).

When my application tries to send the 4th packet, it will be dropped. When i tried to debug it, i find that when a createchannel is called, a ratelimiter is set to my dataengine, and this limit my bandwitdh to 30720 bps(max packet size per sec, or sum of packetsizes per sec).
I've also tried to raise this limit( 100*30720 :) ) and its working fine and more faster. (I've implemented reliable connection with ack messages too.)

Is there any reason to limit the bandwidth or it is a bug or under development?

thanks for any answer.

Koldi
Reply all
Reply to author
Forward
0 new messages