WORK IN PROGRESS!
This project aims to provide an akka server-side implementation of the rtcweb protocol stack focused on the RTCDataChannels (High Performance Browser Networking, Ch. 8 by @igrigorik gives a very good introduction on this topic). This is achieved by implementing draft-ietf-rtcweb-gateways-00: WebRTC Gateways with the following details:
- ICE-Support for TURN/Trickle (no TURN yet, so no full ICE implementation)
- Support for DataChannels
- Since we are only interested in the Data channels at the moment, we can ignore SRTP (yet, not conforming to the spec)
RTCWEB allows akka systems to establish (somewhat) encrypted low-latency DataChannels with user-agents or other actor systems. These channels support configurable reliability semantics like partial ordering and relaxed reliability guarantees (like udp does) and thus can still reach a very low latencies on unreliable or slow connections (compared to WebSockets or SSE). Additionally rtcweb supports multihoming and automatic reestablishing of connections which is a nice feature for moving, multi-homed clients. Thus this stack, even being a skyscraper, could lead to amazing new applications where actor systems participate in browser P2P-communication or create decentralized dynamic clusters.
This is just a just for fun private project and aims to implement a minimal working example. Any help, hints and contributions are welcome! I expect this solution to be not so fast since a lot of low level protocol plumbing is implemented with higher level constructs. The following protocols and RFCs are (partially) covered (you need to love network protocols):
<Transport> <Signaling>
+-----------------+
| WebRTC |
| Data Channels |
| (rfc4960) |
+-----------------+
| SCTP (rfc4960) |
+-----------------+
| DTLS 1.2 |------------------+
|(draft-ietf-rt..)| JSEP |
+-----------------+------------------+
| ICE/STUN | SDP |
+-----------------+------------------+
| (UDP) | (akka-http) |
+------------------------------------+
| (akka-io) |
+------------------------------------+
- draft-ietf-rtcweb-jsep-10: Javascript Session Establishment Protocol aka WebRTC 1.0: Real-time Communication Between Browsers
- An Offer/Answer Model with the Session Description Protocol (SDP)
- rfc4566: SDP: Session Description Protocol (marshalling and negotiation)
- rfc5888: The Session Description Protocol (SDP) Grouping Framework
- rfc3556: Session Description Protocol (SDP) Bandwidth Modifiers for RTP Control Protocol (RTCP) Bandwidth (specifying )
- rfc4572: Connection-Oriented Media Transport over the Transport Layer Security (TLS) Protocol in the Session Description Protocol (SDP)
- draft-ietf-mmusic-sctp-sdp-14:Stream Control Transmission Protocol (SCTP)-Based Media Transport in the Session Description Protocol (SDP)
Base protocols:
-
rfc4960: SCTP - Stream Control Transmission Protocol (Describes how SCTP works)
- rfc4960: Stream Control Transmission Protocol (SCTP) Partial Reliability Extension
- rfc4820: Padding Chunk and Parameter for the Stream Control Transmission Protocol (SCTP)
Defines Padding Messages for SCTP to support MTU Discovery - rfc6525: Stream Control Transmission Protocol (SCTP) Stream Reconfiguration
Defines Reconfiguration of multiplexed application data channels over a single SCTP association
WebRTC related:
- draft-ietf-rtcweb-data-channel-13: WebRTC Data Channels
- draft-ietf-rtcweb-data-protocol-09: DCEP - WebRTC Data Channel Establishment Protocol (Describes how DataChannels lifecycle can be controlled on a SCTP connection.)
- draft-ietf-tsvwg-sctp-dtls-encaps-09: DTLS Encapsulation of SCTP Packets (Describes how SCTP runs on top of DTLS)
Many many thanks to scodec and parboiled2. They make encoding/decoding and parsing a breeze!
sbt package
:)