This project depicts a fault tolerant banking system. It is composed of three main entities: an ATM, a Consortium and a Bank.
The execution flows starting from the ATM, which creates a request message to be forwarded to the Bank through the Consortium.
- UDP/IP as communication protocol
- Emulated outbound/inbound link failure
- Multithreaded
- Execution failure tolerant
REQUIREMENTS
- mysql 5+
- maven 3+
- java 1.5+
- git
QUICK GUIDE
-
Choose your desired folder location and clone the repo issuing
git clone https://github.com/marcos-sb/distributed-banking-system.git
The folderdistributed-banking-systemshould have been created -
Change directory to the one just created and maven install:
cd distributed-banking-system && mvn install -
mysql user
albahas to be created:
mysql -uroot -p
mysqlprompt$> create user 'alba'@'localhost' identified by 'alba'
mysqlprompt$> grant all on *.* to alba@localhost identified by 'alba' -
mysql DBs, tables and tuples creation is scripted:
mysql -ualba -palba < bank/src/main/resources/bank.sql
mysql -ualba -palba < consortium/src/main/resources/consortium.sql
A parameters file could be found at {cashmachine, bank, consortium}/src/main/resources. It configures networking and database connections. Note that if any value where to be changed a new mvn install should be issued.
It is adised to run each agent in a different terminal so following the message flow would be easier.
To start execution, type (one line per terminal):
java -jar cashmachine/target/cashmachine-0.0.1.jar
java -jar consortium/target/consortium-0.0.1.jar
java -jar bank/target/bank-0.0.1.jar
- Full design diagrams in magicdraw folder.
- Check out the Manual.pdf, browse through the code or contact me.