Chronista is a project developed as part of the college assignment for the course CK0117 - Database Management Systems. This project focuses on the implementation of the conservative 2-Phase Locking (2V2PL) protocol for concurrency control.
The primary objective of Chronista is to accept any given schedule (a set of transactions and their operations) as input and ensure the correct synchronization of the operations within that schedule.
- Conservative 2-Phase Locking Protocol: Implements the 2V2PL protocol for effective concurrency control.
- Transaction Schedule Processing: Accepts and processes various transaction schedules.
- Synchronization Assurance: Ensures correct synchronization of operations to prevent data anomalies.
You can run the command line interface provided by Chronista using the following syntax:
chronista_cli [option] [input|filename]
-f [filename]: Specify a file containing the transactions to be processed.-i: Accept transactions from the standard input (STDIN). You can pipe data directly into the command.-h: Display help information about the available options and usage.
- Using a file:
chronista-cli -f transactions.txt- Using standard input:
echo "transaction data" | chronista-cli -i- Displaying help:
chronista-cli -hTo build and run the project, ensure you have the following installed:
- Compiler:
clang++,gccorcl - Build System:
CMakeandmake - Testing Framework:
ctest(optional)
First generate all configuration and build files with:
cmake .Then, to build all executables and libraries, run the following command in the project directory:
makeor, if want only the Chronista library run:
make ChronistaTo run the Chronista command-line interface (CLI), use one of the following commands:
make runor
make chronista_cli && ./bin/chronista_cliTo compile and run the tests, follow these steps:
- Compile the test binary:
make chronista_tests - Run the tests using one of the following commands:
- Using
ctest:ctest - Using
make:make test - Directly executing the test binary to view the native doctest output:
./bin/chronista_tests
- Using
This project is licensed under the GNU General Public License v3.0 (GPL-3.0).