README.md 2.46 KB
Newer Older
1
# Predictably Reliable Real-Time (PRRT) [![pipeline status](https://git.nt.uni-saarland.de/LARN/PRRT/badges/master/pipeline.svg)](https://git.nt.uni-saarland.de/LARN/PRRT/commits/master)
2

3
**PRRT** is a transport protocol that aims to provide predictable reliability and latency. [http://larn.systems]()
4

5
## Features
6

7 8 9 10
* Forward Error Correction (FEC) using systematic Vandermonde codes
* Clock synchronization between sending stack and receiving stack
* Applications can specify packet-level expiration times
* Different receive modes for ASAP and time-synchronized operation
Andreas Schmidt's avatar
Andreas Schmidt committed
11
* Passive measurement of propagation delay, bottleneck data rate and packet loss rate
12 13
* Packet-level timing analysis using [X-Lap](http://xlap.larn.systems)
* [Hardware timestamping support](https://git.nt.uni-saarland.de/LARN/PRRT/wikis/hardware-timestamping)
14

15
## Installation
16

17 18 19 20 21 22 23 24 25 26 27
*See [Installing PRRT](https://git.nt.uni-saarland.de/LARN/PRRT/wikis/installation#python) for instructions on how to install it on your system for using it with C/C++ or Python.*

#### *Try PRRT on your system*

A [minimal receiver](examples/receiver.py), which takes the bind port as an argument, is created as follows:

```python
import sys
import prrt

port = int(sys.argv[1])
28

Andreas Schmidt's avatar
Andreas Schmidt committed
29
s = prrt.PrrtSocket(port=port)
30

31
while True:
Andreas Schmidt's avatar
Andreas Schmidt committed
32
    d = s.recv().decode("utf8")
33
    if d != "Close":
Andreas Schmidt's avatar
Andreas Schmidt committed
34
        print(d)
35 36
    else:
        break
37 38
```

39 40 41 42 43 44 45 46
A [minimal sender](sender.py) is created as follows:

```python
import sys
import prrt

host = sys.argv[1]
port = int(sys.argv[2])
Andreas Schmidt's avatar
Andreas Schmidt committed
47
localport = int(sys.argv[3])
48

Andreas Schmidt's avatar
Andreas Schmidt committed
49
s = prrt.PrrtSocket(port=localport)
50 51
s.connect(host, port)

Andreas Schmidt's avatar
Andreas Schmidt committed
52

53
for i in range(10):
Andreas Schmidt's avatar
Andreas Schmidt committed
54 55
    s.send("Packet {}".format(i).encode("utf8"))
s.send("Close".encode("utf8"))
56 57 58
```

Start the receiver by:
59 60

```bash
Andreas Schmidt's avatar
Andreas Schmidt committed
61
python3 receiver.py 5000
62 63
```

64
In a separate terminal, run:
65 66

```bash
Andreas Schmidt's avatar
Andreas Schmidt committed
67
python3 sender.py 127.0.0.1 5000 6000
68 69
```

70
This should generate the following output in the receiver console:
71

72 73 74 75 76 77
```terminal
Packet 0
Packet 1
...
Packet 9
```
78

79
## For more information
80

81 82
* [PRRT Wiki](https://git.nt.uni-saarland.de/LARN/PRRT/wikis)
* [LARN Project Website](http://larn.systems)
83

Andreas Schmidt's avatar
Andreas Schmidt committed
84 85 86 87 88 89 90 91 92 93 94 95 96 97
## Citing Us

If you find PRRT useful and incorporate it in your works, we are very happy to hear about it. Please also consider to cite us like this:

```bibtex
@misc{sic2018prrt, 
      author = {Schmidt, Andreas}, 
      title = {PRRT: Predictably Reliable Real-time Transport}, 
      howpublished={Web page}, 
      url = {http://prrt.larn.systems}, 
      year = {2018} 
} 
```

98 99 100
## License

[MIT Licence](LICENSE)