Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upCompress SDP messages #148
Comments
This comment has been minimized.
This comment has been minimized.
|
Update: Wow! There's actually an RFC for this already https://www.rfc-editor.org/rfc/rfc3485.txt And it appears there's some mechanism for updating the dictionary that two peers share based on real-world data. This might be overkill since peers only exchange two signaling messages in webtorrent. Also, this feature would help the webtorrent tracker server scale a lot better by making the messages it has to pass around a lot smaller. Relevant for #145 |
This comment has been minimized.
This comment has been minimized.
This should be build in an independent package, so other projects could be |
This comment has been minimized.
This comment has been minimized.
|
Yep, of course. |
This comment has been minimized.
This comment has been minimized.
|
In addition to implementing some sort of SDP compression, we should first eliminate the audio lines that are currently being unnecessarily included. Current example:
Should look something like:
|
This comment has been minimized.
This comment has been minimized.
|
The unnecessary audio lines have been eliminated from the SDP. Regarding SDP compression, after some investigation, I decided to punt on SDP compression. It's actually quite tricky to get right with all the variations of SDP and the evolving spec. It's also premature optimization. I'll re-open this when/if the webtorrent tracker starts to experience significant load. |
This comment has been minimized.
This comment has been minimized.
|
For anyone interested, @fippo got this working! https://twitter.com/HCornflower/status/580623559019638784 |
This comment has been minimized.
This comment has been minimized.
|
note that delivering the answer in near-realtime (<10s) is pretty critical. Updated version soon probably, found a couple of issues. |
This comment has been minimized.
This comment has been minimized.
|
Why is it necessary to deliver the answer in near-realtime? On Thu, Mar 26, 2015 at 5:44 PM Philipp Hancke notifications@github.com
|
This comment has been minimized.
This comment has been minimized.
|
for crazy complicated annoying reasons :-) there is a 30s timeout on ice checks from the answerer. And since TURN is involved, there are additional complications and round-trips involved. Still debating whether there is a bug, too... |
This comment has been minimized.
This comment has been minimized.
|
More info here: https://webrtchacks.com/the-minimum-viable-sdp/ |
This comment has been minimized.
This comment has been minimized.
|
and soon: an npm package fippo/minimal-webrtc#2 |
This comment has been minimized.
This comment has been minimized.
|
This is exciting |
This comment has been minimized.
This comment has been minimized.
|
Published as sdp-minimizer https://www.npmjs.com/package/sdp-minimizer |
This comment has been minimized.
This comment has been minimized.
|
Awesome! :-D |
This comment has been minimized.
This comment has been minimized.
|
Now that there's a nice module for this, let's try using it for WebTorrent. |
SDP message compression can significantly lighten the load on the webtorrent tracker and dht by making the signaling messages much smaller. This could be done by giving each peer a common dictionary of frequently-occurring strings that can be referenced to compose a complete SDP message.