Tilsit is a JVM-targeted implementation of the Stream Control Transmission Protocol (SCTP) defined in RFC 4960 over an UDP datagram socket.
SCTP-into-UDP packet encapsulation is described in RFC 6951, though this implementation may not comply with that document. Support for TLS over SCTP (see RFC 3436) is planned.
The source code for the Tilsit project will be published in Q1 2019.
Why SCTP is better than TCP
- SCTP provides protection against certain types of attacks TCP is vulnerable to, e.g. SYN flood. It is achieved by a four-way handshake at association startup which involves a cookie verification procedure and allocates no server resources until a connection is established.
- SCTP is a message-oriented protocol. It transports a sequence of variable-length messages unlike TCP in which user deals with an unbroken stream of bytes. It eliminates the need of explicitly denoting message bounds in the upper-level protocol.
- SCTP delivers data chunks within independent streams, which eliminates unnecessary head-of-line blocking.
- SCTP offers multi-homing for both ends of an association, which provides transparent network-level fault tolerance.
See also RFC 4960 in which the SCTP is defined.
Why encapsulate into UDP
Unfortunately, the SCTP has not become as popular as TCP due to its late appearance. It was developed by a team which actively promoted SCTP as a great protocol for PSTN, but did not provide such a recommendation for using it as a replacement for TCP. On release, it did not gain much popularity and soon become forgotten by those not working in public switched telephony.
Currently SCTP stack is provided by most UNIX-like operating systems, but often is switched off by default and needs to be explicitly loaded as a kernel module. Windows users need to install a third-party driver for using SCTP, and it is nearly impossible for a developer to access the SCTP stack from the JVM present in the Android kernel. That is why SCTP can not be used directly, but an encapsulation of its packets into the datagrams of a connectionless protocol like UDP is still an option provided that this underlying protocol is accessible.