Reliable networking for JVM with SCTP over UDP

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

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.