Skip to content

ericnorway/arbitraryFailures

Repository files navigation

arbitraryFailures

To compile:
Go into the server directory and type 'go build' to create the server app (broker).
Go into the client directory and type 'go build' to create the client app (publisher and subscriber).

To start a broker replica node:
Run the server app with the following flags:
-config should be the name of the config file for that node.
-alpha should be number of AB or Chain pubs to accept before requesting a BRB pub (with history).
0 means that you don't want to combine the algorithms.
-mal should be the percent of messages to maliciously alter.
The default is 0.
Example:
./server/server -config=./config/badne/broker0.txt -alpha=10 -mal=0

Here is an example config file for a broker replica node:
ID=0
PUB_KEYS=11111111,22222222,33333333,44444444
SUB_KEYS=A1A1A1A1,B2B2B2B2,C3C3C3C3,D4D4D4D4
BRK_KEYS= ,AAAAAAAA,BBBBBBBB,CCCCCCCC
BRK_ADDR=localhost:11110,localhost:11111,localhost:11112,localhost:11113

CHAIN=B0:B1
CHAIN=B1:B2
CHAIN=B2:S0,S1,S2,S3
CHAIN=S0
CHAIN=S1
CHAIN=S2
CHAIN=S3

RCHAIN=B0:P0,P1,P2,P3
RCHAIN=P0
RCHAIN=P1
RCHAIN=P2
RCHAIN=P3

To start a subscriber:
Run the client app with the following flags:
-config should be the name of the config file for that subscriber.
-type should be "subscriber".
Example:
./client/client -config=./config/badne/subscriber0.txt -type=subscriber

Here is an example config file for a subscriber:
ID=0
BRK_KEYS=A1A1A1A1,E5E5E5E5,I9I9I9I9,O1O3O1O3
BRK_ADDR=localhost:11110,localhost:11111,localhost:11112,localhost:11113
TOPICS=1,2

RCHAIN=S0:B2
RCHAIN=B2:B1
RCHAIN=B1:B0
RCHAIN=B0

To start a publisher:
Run the client app with the following flags:
-config should be the name of the config file for that publisher.
-type should be "publisher".
-pubCount should be the number of publications to send.
-pubType should be the publication algorithm to use: AB, BRB, or Chain.
Example:
./client/client -config=./config/badne/publisher0.txt -type=publisher -pubType=AB -pubCount=100

Here is an example config file for a publisher:
ID=0
BRK_KEYS=11111111,55555555,99999999,13131313
BRK_ADDR=localhost:11110,localhost:11111,localhost:11112,localhost:11113
TOPICS=1,2

CHAIN=P0:B0
CHAIN=B0:B1
CHAIN=B1:B2
CHAIN=B2

Note that all keys are private (shared) keys. For example, broker 0 and publisher 0 share the key 11111111.

CHAIN and RCHAIN specify the parts of the chain tree that the node knows about. CHAIN species children, while RCHAIN specifies parents. So in the example of the publisher, it knows about nodes P0, B0, B1, and B2. P0 has child B0. B0 has child B1. B1 has child B2. While B2 has children, but the publisher does know about the subscribers, so it does not include B2's children of S0, S1, S2, S3.

About

Code for my thesis. Spring 2016

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages