-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathInstructions
56 lines (45 loc) · 1.07 KB
/
Instructions
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
Run coordinator first
eg: python coordinator.py 8888
Then run servers
eg: python server.py localhost:8888 8003 server3 server3.log
it will create a log named server3.log in the same directory
the port numbers should be different for all 3 servers
logs should be named different as well
eg
server1 : python server.py localhost:8888 8001 server1 server1.log
server2 : python server.py localhost:8888 8002 server2 server2.log
server3 : python server.py localhost:8888 8003 server3 server3.log
then run any number of clients and use menu to make queries
eg: python client.py localhost:8888 client
to check resync open log on any server and remove some lines
eg:
1 101 40
2 101 10
3 101 10
4 101 20
5 101 30
6 103 40
7 103 40
8 103 40
9 103 40
10 101 30
to
1 101 40
2 101 10
3 101 10
4 101 20
it is important to keep a blank line at the end of the log or it wont work properly
eg
'''1 101 40
2 101 10
3 101 10
4 101 20
5 101 30
6 103 40
7 103 40
8 103 40
9 103 40
10 101 30
'''
save log after changing and on the same server terminal press Ctrl+C
Then reload the log it should be updated