FLUTE - File Delivery over Unidirectional Transport
Massively scalable multicast distribution solution
The library implements a unidirectional file delivery, without the need of a return channel.
RFC
This library implements the following RFCs
| RFC | Title | Link |
|---|---|---|
| RFC 6726 | FLUTE - File Delivery over Unidirectional Transport | https://www.rfc-editor.org/rfc/rfc6726.html |
| RFC 5775 | Asynchronous Layered Coding (ALC) Protocol Instantiation | https://www.rfc-editor.org/rfc/rfc5775.html |
| RFC 5661 | Layered Coding Transport (LCT) Building Block | https://www.rfc-editor.org/rfc/rfc5651 |
| RFC 5052 | Forward Error Correction (FEC) Building Block | https://www.rfc-editor.org/rfc/rfc5052 |
| RFC 5510 | Reed-Solomon Forward Error Correction (FEC) Schemes | https://www.rfc-editor.org/rfc/rfc5510.html |
| 3GPP TS 26.346 | Extended FLUTE FDT Schema (7.2.10) | https://www.etsi.org/deliver/etsi_ts/126300_126399/126346/17.03.00_60/ts_126346v170300p.pdf |
UDP/IP Multicast files sender
Transfer files over a UDP/IP network
use Sender;
use ObjectDesc;
use Cenc;
use UDPEndpoint;
use UdpSocket;
use SystemTime;
// Create UDP Socket
let udp_socket = bind.unwrap;
udp_socket.connect.expect;
// Create FLUTE Sender
let tsi = 1;
let oti = Defaultdefault;
let config = Defaultdefault;
let endpoint = new;
let mut sender = new;
// Add object(s) (files) to the FLUTE sender (priority queue 0)
let obj = create_from_buffer.unwrap;
sender.add_object;
// Always call publish after adding objects
sender.publish;
// Send FLUTE packets over UDP/IP
while let Some = sender.read
UDP/IP Multicast files receiver
Receive files from a UDP/IP network
use ;
use UDPEndpoint;
use UdpSocket;
use SystemTime;
use Rc;
// Create UDP/IP socket to receive FLUTE pkt
let endpoint = new;
let udp_socket = bind.expect;
// Create a writer able to write received files to the filesystem
let writer = new;
// Create a multi-receiver capable of de-multiplexing several FLUTE sessions
let mut receiver = new;
// Receive pkt from UDP/IP socket and push it to the FLUTE receiver
let mut buf = ;
loop
Application-Level Forward Erasure Correction (AL-FEC)
The following error recovery algorithms are supported
- No-code
- Reed-Solomon GF 2^8
- Reed-Solomon GF 2^8 Under Specified
- Reed-Solomon GF 2^16
- Reed-Solomon GF 2^m
- RaptorQ
- Raptor
The Oti module provides an implementation of the Object Transmission Information (OTI)
used to configure Forward Error Correction (FEC) encoding in the FLUTE protocol.
use Oti;
use Sender;
use UDPEndpoint;
// Reed Solomon 2^8 with encoding blocks composed of
// 60 source symbols and 4 repair symbols of 1424 bytes per symbol
let endpoint = new;
let oti = new_reed_solomon_rs28.unwrap;
let mut sender = new;
Content Encoding (CENC)
The following schemes are supported during the transmission/reception
- Null (no compression)
- Deflate
- Zlib
- Gzip
Files multiplex / Blocks interleave
The FLUTE Sender is able to transfer multiple files in parallel by interleaving packets from each file. For example:
Pkt file1 -> Pkt file2 -> Pkt file3 -> Pkt file1 -> Pkt file2 -> Pkt file3 ...
The Sender can interleave blocks within a single file. The following example shows Encoding Symbols (ES) from different blocks (B) are interleaved. For example:
(B 1,ES 1)->(B 2,ES 1)->(B 3,ES 1)->(B 1,ES 2)->(B 2,ES 2)...
To configure the multiplexing, use the Config struct as follows:
use Sender;
use Config;
use PriorityQueue;
use UDPEndpoint;
let mut config = Config ;
// Interleave a maximum of 3 files in priority queue '0'
config.set_priority_queue;
let endpoint = new;
let mut sender = new;
Priority Queues
FLUTE sender can be configured with multiple queues, each having a different priority level. Files in higher priority queues are always transferred before files in lower priority queues. Transfer of files in lower priority queues is paused while there are files to be transferred in higher priority queues.
use Sender;
use Config;
use PriorityQueue;
use UDPEndpoint;
use ObjectDesc;
use Cenc;
// Create a default configuration
let mut config: Config = Defaultdefault;
// Configure the HIGHEST priority queue with a capacity of 3 simultaneous file transfer
config.set_priority_queue;
// Configure the LOW priority queue with a capacity of 1 file transfer at a time
config.set_priority_queue;
let endpoint = new;
let mut sender = new;
// Create an ObjectDesc for a low priority file
let low_priority_obj = create_from_buffer.unwrap;
// Create an ObjectDesc for a high priority file
let high_priority_obj = create_from_buffer.unwrap;
// Put Object to the low priority queue
sender.add_object;
// Put Object to the high priority queue
sender.add_object;
Python bindings
Installation
Example
Flute Sender python example
# Flute Sender config parameters
=
# Object transmission parameters (no_code => no FEC)
# encoding symbol size : 1400 bytes
# Max source block length : 64 encoding symbols
=
# Create FLUTE Sender
=
# Transfer a file
=
break
#TODO Send alc_pkt over UDP/IP
Flute Receiver python example
# Write received objects to a destination folder
=
# FLUTE Receiver configuration parameters
=
= 1
# Create a FLUTE receiver with the specified endpoint, tsi, writer, and configuration
=
=
# Receive LCT/ALC packet from UDP/IP multicast (Implement your own receive_from_udp_socket() function)
# Note: FLUTE does not handle the UDP/IP layer, you need to implement the socket reception mechanism yourself
=
# Push the received packet to the FLUTE receiver