Thubo
Thubo is a high-performance TX/RX network pipeline featuring strict priority scheduling, automatic batching, and message fragmentation. Itβs designed for applications that require predictable, priority-based message delivery, even under heavy load.
This is especially useful for protocols prone to head-of-line blocking (e.g., TCP/TLS), where a single large, low-priority message might otherwise delay urgent messages.
Why Thubo?
- β‘ Strict Priority Scheduling: high-priority messages preempt lower-priority flows.
- π¦ Automatic Batching: maximizes throughput without manual tuning.
- π Message Fragmentation: prevents head-of-line blocking by splitting large messages.
- βοΈ Configurable Congestion Control: do not block on data that may get stale.
Overview
The diagram below illustrates the TX/RX network pipeline in operation, using all 4 priority queues (High, Medium, Low, Background).
.....
APPLICATION SEND User code :
βββββββββββββββ ββββββ ββββββββββ ββββββ ββββββ :
β B1 β β L1 β β M1 β β H1 β β H2 β :
ββββ¬βββββββββββ βββ¬βββ ββββ¬ββββββ βββ¬βββ βββ¬βββ :
t0 t1 t2 t3 t4 :
βΌ βΌ βΌ βΌ βΌ :
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :
TX PIPELINE Thubo code :
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ :
β Queues: β :
β P0 (High): [H1][H2] β t3 β t4 β :
β P1 (Medium): [M1a, M1b] β t2 β :
β P2 (Low): [L1a, L1b] β t1 β :
β P3 (Background): [B1a, B1b, B1c] β t0 β :
| | :
β t0 t1 t2 t3 t4 β :
β Pull Order: B1a β B1b β L1a β M1a β H1 H2 β M1b β L1b β B1c β :
β β :
β TX Stream: [B1a][B1b][L1a][M1a][H1 H2][M1b][L1b][B1c] β :
βββββββββββββ¬βββββββββββββββββββββββββββββββββββββββββββββββββββ :
| .....
βΌ Network
.....
RX PIPELINE Thubo code :
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ :
β RX Stream: [B1a][B1b][L1a][M1a][H1 H2][M1b][L1b][B1c] β :
β β :
β Reassembled Messages: B1, L1, M1, H1, H2 β :
β β :
β Delivered by Priority: H1 β H2 β M1 β L1 β B1 β :
βββββββββββββ¬βββββββββββββββββββββββββββββββββββββββββββββββββββ :
βΌ :
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :
APPLICATION RECEIVE User code :
ββββββ ββββββ ββββββββββ ββββββ βββββββββββββββ :
β H1 β β H2 β β M1 β β L1 β β B1 β :
ββββββ ββββββ ββββββββββ ββββββ βββββββββββββββ :
.....
See documentation for a more detailed explaination.
Quick Start
use *;
use TcpStream;
async
Performance
Thubo can batch tens of millions of small messages per second and saturate multi-gigabit networks. The figure below shows the median throughput, with error bars representing the confidence interval, measured in messages per second (msg/s) and bits per second (bit/s). The y-axis is logarithmic.
Thubo also achieves sub-millisecond latency, with ping times of a few tens of microseconds. The figure below shows the median latency, with error bars indicating the confidence interval. The y-axis is logarithmic.