- Centralized Multi User Concurrent Bank Account Manager
- Two Phase Commit protocol
- Clock Synchronization
Just run make file to compile and create executables.
- It uses SPDLog concurrent logging library (https://github.com/gabime/spdlog)
- Uses Thread-Pool implementation for concurrency
- Uses Apache AB tool to test concurrency and server KPI such as Requests Per Minutes etc.
We benchmark the bank server by sending 50000 transactional total with client varying from 30 to 300. The total_no_req/sec and total_time are calculated and plotted.
When you kill the Server it also prints the stats about request/sec and other KPI's
Usage: ./Client [options]
Options are:
-n requests Number of requests to perform, Default is 20000
-c concurrency Number of concurrent requests to make, Default is 30
-h host Host to connect to, Default is 127.0.0.1
-p port Port to connect to, Default is 8080
-f file Address Transaction file address, Default is ./src/Transactions.txt
Usage: ./Server [options]
Options are:
-t thread pool size Thread pool count, Default is 100;
-p port Server port to listen, Default is 8080
-f file Address of startup data file for customers, Default is ./src/Records.txt
1. make
2. Run Server
- ./Server -t 200 -p 9999 -f Records.txt
3. Run Client
- ./Client -n 20000 -c 50 -h 127.0.0.1 -p 9999 -f Transactions.txt
- run "make" to generate all binaries
- or you can generate individual binaries by running "make Berkeley", "make Causal", "make NonCausal", "make DistributedME"
- run "make clean" to delete all the binaries and object files
I have provided Python script which allows you to run multiple instances of the same program without manual intervention. You just need to pass command line argument to Python script specifying which executable you want to run
- run "“./helper.py berkeley" to execute Berkeley binary
- run "./helper.py causal" to execute Causal binary
- run "./helper.py noncausal" to execute NonCausal binary
- run "./helper.py bonus" to execute Distributed Mutual Exclusion algorithm binary.