root / readme.txt
History | View | Annotate | Download (1.19 KB)
1 |
This guide is to be followed under /src folder |
---|---|
2 |
|
3 |
(We have included 4 files from different formats for test purposes: pinguimReal.jpg and porto.jpg, sope.pdf and test.txt - and are ready to go. Another test files can be put under /src folder for easy testing, although the insertion of its full path is also permitted. ) |
4 |
|
5 |
--- to compile all files --- |
6 |
javac *.java |
7 |
|
8 |
--- to run the program --- |
9 |
(RMI is set automatically) |
10 |
|
11 |
-- server side -- |
12 |
~ Peers: |
13 |
$ java Peer <version> <serverID> <access_point> <MC_address> <MC_port> <MDB_address> <MDB_port> <MDR_address> <MDR_port> |
14 |
Eg.: Peer 1.0 1 peer1 224.0.0.1 8888 224.0.0.2 8888 224.0.0.3 8888 |
15 |
Peer 1.0 2 peer2 224.0.0.1 8888 224.0.0.2 8888 224.0.0.3 8888 |
16 |
|
17 |
-- client side -- |
18 |
~ Backup: |
19 |
$ java TestApp <peer_ap> BACKUP <file_path> <desired_replication_degree> |
20 |
Eg.: java TestApp peer1 BACKUP porto.jpg 2 |
21 |
|
22 |
~ Restore: |
23 |
$ java TestApp <peer_ap> RESTORE <file_path> |
24 |
Eg.: java TestApp peer1 RESTORE porto.jpg |
25 |
|
26 |
~ Delete: |
27 |
$ java TestApp <peer_ap> DELETE <file_path> |
28 |
Eg.: java TestApp peer1 DELETE porto.jpg |
29 |
|
30 |
~ Reclaim: |
31 |
$ java TestApp <peer_ap> RECLAIM <max_amount_disk_space> |
32 |
Eg.: java TestApp peer1 RECLAIM 0 |
33 |
|
34 |
~ State: |
35 |
$ java TestApp <peer_ap> STATE |
36 |
Eg.: java TestApp peer1 STATE |
37 |
|
38 |
|
39 |
|