UDP over TCP Tunnel for Reliable Real-Time Data Transport
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
UDP transmissions are not reliable and can cause network congestion, leading to lag in real-time applications, as they lack guaranteed delivery and ordering, which is undesirable for network/service providers who prefer the more controlled TCP protocol.
Innovation Solution
A TCP tunnel is created to encapsulate UDP datagrams, allowing them to be transmitted over a network using TCP/IP, with the TCP receiving-end detecting missing packets and requesting retransmissions while continuing packet delivery without lag, and discarding retransmitted packets to prevent duplication.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Speed
If UDP protocol is used for transmission, then real-time performance and responsiveness are improved, but reliability and guaranteed delivery are worsened
Solution Approach 1:
A TCP tunnel is introduced as an intermediary between UDP applications and the network. The tunnel encapsulates UDP datagrams in TCP packets for reliable transmission, while maintaining UDP-like performance characteristics. The TCP tunnel acts as a mediator that provides reliability guarantees without requiring changes to the UDP applications themselves.
Solution Approach 2:
The system segments the communication into two distinct layers: the application layer uses UDP for real-time performance, while the transport layer uses TCP through the tunnel for reliability. This segmentation allows each protocol to operate in its optimal domain without compromising the other.
2Reliability
If TCP protocol is used for transmission, then reliability and guaranteed delivery are improved, but real-time performance and responsiveness are worsened
Solution Approach 1:
The TCP tunnel serves as an intermediary that translates TCP's reliable delivery mechanism into UDP-compatible behavior. By encapsulating UDP datagrams in TCP packets and managing retransmissions at the tunnel level rather than the application level, the system achieves reliability without the performance penalties of traditional TCP.
Solution Approach 2:
The TCP tunnel creates a virtual copy of UDP behavior over TCP infrastructure. It replicates UDP's connectionless, best-effort delivery semantics at the application interface while using TCP's reliable transport in the background, effectively copying UDP's performance characteristics while leveraging TCP's reliability.
3Reliability
If packet retransmission is implemented, then reliability is improved, but network congestion and lag are worsened
Solution Approach 1:
The TCP tunnel implements feedback mechanisms where the receiving end detects missing packets and requests retransmission. This feedback loop operates at the tunnel level, allowing selective retransmission of only the missing UDP datagrams without triggering congestion control that would affect overall network throughput.
Solution Approach 2:
The system discards retransmitted TCP packets at the TCP receiving-end to prevent duplication in the UDP stream. This selective discarding ensures that while reliability is maintained through retransmission requests, the original UDP application receives only the necessary packets without congestion-induced lag.
Data Source
AI summary
A system transports a plurality of UDP datagrams from a sending application to a receiving application by creating a TCP tunnel between a TCP sending-end and a TCP receiving-end, encapsulating the datagrams in TCP packets at the TCP transmitting-end, transmitting the TCP packets via the TCP tunnel to the TCP receiving-end over a network using a TCP/IP protocol, and extracting the datagrams from the TCP packet and forwarding the extracted datagrams to the receiving application. The TCP tunnel may provide the same delay and responsiveness as UDP protocol. The TCP receiving-end may detect when a packet is missing and request retransmission when a packet is missing, so that the TCP sending-end retransmits the missing packets. The transmitting of TCP packets to the TCP receiving-end continues when the receiving-end detects a missing packet, so that there is no lag in the forwarding of the extracted datagrams. Retransmitted packets may be discarded.

