-
Notifications
You must be signed in to change notification settings - Fork 3
/
README.txt
130 lines (100 loc) · 3 KB
/
README.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
INSTRUCTIONS
------------
[Dependency: C++]
- Autotools, Libtool, pkg-config
- Clang (v3.4.0 is known to work) or GCC (v4.8.2 is known to work)
- Boost (v1.54.0 is known to work)
- Protocol Buffers (v2.5.0 is known to work)
- JsonCpp (v0.5.0 is known to work)
- Google Log (v0.3.3 is known to work)
[Compilation: C++]
1. Install library dependencies
Mac OS X:
$ brew install boost
$ brew install protobuf
$ brew install jsoncpp
$ brew install glog
Ubuntu:
$ sudo apt-get install libboost-all-dev
$ sudo apt-get install protobuf-compiler libprotobuf-dev
$ sudo apt-get install libjsoncpp-dev
$ sudo apt-get install libgoogle-glog-dev
Fedora:
$ sudo yum install boost-devel
$ sudo yum install protobuf-compiler protobuf-devel
$ sudo yum install jsoncpp-devel
$ sudo yum install glog-devel
FreeBSD:
$ sudo pkg install boost-libs
$ sudo pkg install protobuf
$ sudo pkg install jsoncpp
[https://gist.github.com/wkl/e8c8157cb5da10bcc061 pkg-config file]
$ sudo pkg install glog
2. Build from git repo
$ autoreconf -if # generate the configure script and Makefile.in files
$ ./configure
$ make
(or Build from distribution)
$ ./configure
$ make
[Running: C++]
1. Run test cases manually
$ cd <chain-replication>/src-cpp
$ master/master -c ../config/test1.json -l ../logs &
$ server/server -c ../config/test1.json -b bank1 -n 1 -l ../logs &
$ server/server -c ../config/test1.json -b bank1 -n 2 -l ../logs &
$ client/client -c ../config/test1.json -l ../logs
$ killall server
$ killall master
2. Run test cases with script (preferred)
$ cd <chain-replication>/src-cpp
$ ./run_case_server.sh 1
$ ./run_case_client.sh 1
$ ./run_case_server.sh 2
$ ./run_case_client.sh 2
...
3. Logging
$ cd <chain-replication>/logs
$ cat server_bank1_No1.INFO
$ cat server_bank2_No1.INFO
$ cat server_bank2_No2.INFO
...
[Running: Distalgo]
Assume Distalgo(1.0.0b8) is installed
$ cd <chain-replication>/src-da
$ python3 -m da chain.da ../config/test1.json
$ python3 -m da chain.da ../config/test2.json
...
or append log to 'chain.log':
$ python3 -m da -f -F info -L info chain.da ../config/test1.json
or append log to specific file:
$ python3 -m da -f --logfilename test1.log -F info -L info chain.da ../config/test1.json
MAIN FILES
----------
src-cpp/
master/master.{h,cc} # Master server code
server/server.{h,cc} # Chain server code
client/client.{h,cc} # Client code
common/message.{h,cc,proto} # Communication
common/{bank,account,common}.h # Misc
src-da/
chain.da # Distalgo code for Master, Chain server and Client
CONTRIBUTIONS
-------------
C++
- Communication (Kelong)
- Master/Server/Client state machine (Dandan, Kelong)
- Logging (Dandan)
- Configuration (Dandan)
Distalgo (Python)
- Master/Server/Client state machine (Kelong)
- Logging (Kelong)
- Configuration (Dandan)
Common / Misc
- Test case generating (Dandan)
- C++ Automake (Kelong)
OTHER COMMENTS
--------------
- Pseudo-code is not updated.
- Distalgo currently does not run on OS X.
- Phase 4 is implemented with C++.