Replicated Concurrency Control and Recovery (RepCRec)
- Zheng Jiang, Net ID: zj688
- Shih-Yao Chou, Net ID: syc574
Please make sure you have Python 3.6+ installed. To run the code directly, use the following command:
$ python3 main.py [input_file]
- If
input_file
is provided, the program will read instructions from the file line by line.- Lines that start with
//
are treated as comments and ignored. - The first line that starts with
===
is treated as a flag for "debug info below". This line and all lines below it are ignored.
- Lines that start with
- If
input_file
is not provided, the program will read input from the standard input.- To exit the program, enter
exit
.
- To exit the program, enter
- Output always goes to the standard output.
You can also use reprounzip to unpack and run the repcrec.rpz
package,
which includes 5 test cases.
To use reprounzip on CIMS servers, first upload the repcrec.rpz
file to
your server, using the following command:
$ scp /filepath/repcrec.rpz userid@access.cims.nyu.edu:/home/userid/desiredFolder
Then, perform the following steps on your CIMS server to satisfy prerequisites for reprounzip:
$ module load python-2.7
$ python -c 'import reprozip'
$ echo $?
0
Getting 0 in the last step means success.
Then, install reprounzip:
$ pip install reprounzip
If you wish to check the files in the package and their info, use the following commands:
$ reprounzip showfiles repcrec.rpz
$ reprounzip info repcrec.rpz
If it all looks fine then unzip it to the desired location
(e.g. unzip
folder in the current directory):
$ reprounzip directory setup repcrec.rpz ./unzip
Finally, run the directory using:
$ reprounzip directory run ./unzip
It should run through the packed test cases and you can check the output.