No description, website, or topics provided.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
data
images
metrics/scripts
src
.gitignore
README.md
devplan.md

README.md

V2 - Nodes can be run as follows:

Node # go run db.go file_util.go crypto.go salvador_client.go <mode>\ <COORD ADDRESS> <COMMAND LISTENER ADDRESS>

go run db.go file_util.go crypto.go salvador_client.go -b 127.0.0.1:19010 127.0.0.1:19011

Client (joining) # go run shared.go file_util.go salvador_client.go <mode>\ <COORD ADDRESS> <COMMAND LISTENER ADDRESS> <BOOTSTRAP NODE ADDRESS>

go run db.go file_util.go crypto.go salvador_client.go -j 127.0.0.1:19012 127.0.0.1:19013 127.0.0.1:19010

Issuing commands # go run client.go <REPLY LISTENER ADDRESS> <NODE COMMAND LISTENER ADDRESS> <action> [<target>]

$ go run client.go 127.0.0.1:19020 127.0.0.1:19019 list

Testing run

Node (bootstrap)

go run db.go file_util.go crypto.go salvador_client.go -b 127.0.0.1:19010 127.0.0.1:19011	

4 Joining nodes # Each client is configured to hold up to 5 Blocks

go run db.go file_util.go crypto.go salvador_client.go -j 127.0.0.1:19012 127.0.0.1:19013 127.0.0.1:19010
go run db.go file_util.go crypto.go salvador_client.go -j 127.0.0.1:19014 127.0.0.1:19015 127.0.0.1:19010
go run db.go file_util.go crypto.go salvador_client.go -j 127.0.0.1:19016 127.0.0.1:19017 127.0.0.1:19010
go run db.go file_util.go crypto.go salvador_client.go -j 127.0.0.1:19018 127.0.0.1:19019 127.0.0.1:19010

ISSUING A BACKUP COMMAND TO NODE

# Go to data folder # study_in_scarlet_ch1to3 requires 19 blocks, i.e., # there has to be at least 4 other nodes available (5 blocks each)

go run client.go 127.0.0.1:19020 127.0.0.1:19019 backup ../data/study_in_scarlet_ch1to3

ISSUING A RESTORE COMMAND TO NODE:

# Go to data folder

go run client.go 127.0.0.1:19020 127.0.0.1:19019 restore ../data/study_in_scarlet_ch1to3

# a file study_in_scarlet_ch1to3_recreated will be created in the data folder.

V1 - Server and clients can be run as follows:

Server # go run db.go shared.go salvador_server.go <COORD ADDRESS>

go run db.go shared.go salvador_server.go 127.0.0.1:10010

Client # go run shared.go file_util.go salvador_client.go <COORD/TRANSFER ADDRESS> <COMMAND ADDRESS> <SERVER ADDRESS>

go run shared.go file_util.go salvador_client.go 127.0.0.1:10011 127.0.0.1:10012 127.0.0.1:10010

Issuing commands # go run client.go <COMMAND ADDRESS> <action> <file>

$ go run client.go 127.0.0.1:10014 backup study_in_scarlet_ch1to3

Testing run

Server

go run db.go shared.go salvador_server.go 127.0.0.1:10010	

3 Passive clients # Each client is configured to hold up to 5 Blocks

go run shared.go file_util.go salvador_client.go 127.0.0.1:10011 127.0.0.1:10012 127.0.0.1:10010
go run shared.go file_util.go salvador_client.go 127.0.0.1:10015 127.0.0.1:10016 127.0.0.1:10010
go run shared.go file_util.go salvador_client.go 127.0.0.1:10017 127.0.0.1:10018 127.0.0.1:10010

Active client

go run shared.go file_util.go salvador_client.go 127.0.0.1:10013 127.0.0.1:10014 127.0.0.1:10010

ISSUING A BACKUP COMMAND TO "ACTIVE CLIENT"

# Go to data folder # study_in_scarlet_ch1to3 requires 15 blocks, i.e., # there has to be at least 3 passive clients running for the backup operation to be GRANTED

go run ../src/client.go 127.0.0.1:10014 backup study_in_scarlet_ch1to3

ISSUING A RESTORE COMMAND TO "ACTIVE CLIENT":

# Go to data folder

go run ../src/client.go 127.0.0.1:10014 restore study_in_scarlet_ch1to3

# a file study_in_scarlet_ch1to3_recreated will be created in the data folder.