vitorenesduarte / exactly-once

Exactly-Once Quantity Transfer

Home Page:http://haslab.uminho.pt/cbm/files/quantity-transfer-camera-ready-w-psds.pdf

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build Status

exactly-once

Assumptions

  • ids are integers
  • max UDP datagram size is 2^16 = 65536

Build

$ make

Docker build

$ make docker

Run tests

$ make test

Run server

$ bin/main

Optional arguments

  • -i ID, node identifier
  • -p PORT, port to listen on
  • -c ID:IP:PORT, connect to node with id ID, with ip IP, listening on port PORT
  • -f FANOUT, fanout (if -f 0 it behaves as a flood algorithm)
  • -t INTERVAL, synchronization interval (milliseconds)

The defaults are:

  • -i 0
  • -p 3000
  • -f 1
  • -t 1000

Example

Three nodes with identifiers 0, 1 and 2, all connected:

$ bin/main -i 0 -p 3000 -c 1:127.0.0.1:3001 -c 2:127.0.0.1:3002
$ bin/main -i 1 -p 3001 -c 0:127.0.0.1:3000 -c 2:127.0.0.1:3002
$ bin/main -i 2 -p 3002 -c 0:127.0.0.1:3000 -c 1:127.0.0.1:3001

Example using Docker Compose

$ docker-compose up handoff0 handoff1 handoff2

Chaos testing with pumba

After running docker-compose up pumba0 pumba1,

  • packet loss
$ pumba netem --tc-image gaiadocker/iproute2 --duration 5m --interface eth0 loss --percent 50
  • packet duplication
$ pumba netem --tc-image gaiadocker/iproute2 --duration 5m --interface eth0 duplicate --percent 50

(tutorial on pumba) (info on netem)

About

Exactly-Once Quantity Transfer

http://haslab.uminho.pt/cbm/files/quantity-transfer-camera-ready-w-psds.pdf

License:Apache License 2.0


Languages

Language:C++ 97.7%Language:Makefile 2.3%