This project aims to implement a simple distributed bank system that can either be fault tolerant or highly available using gRPC interface for communication. Written in spring 2021 for CSE 531.
The customers should interact with system as a single coherent system that satisfy these goals:
- Access transparency: Customers does not know the implementation details of Branch application.
- Support redundancy: Each branch has a replica for other branches
- Location transparency: Customers can’t see where the data actually stores
- Failure transparency: If a failure happen in the system, customers should not inform about that failure and recovery procedure.
- Efficient customer to server and server to server communication
$ git clone git@github.com:afshinpaydar/gRPC-Distributed-Bank.git
$ cd gRPC-Distributed-Bank
$ virtualenv -p python3 venv
$ pip install -r requirements.txt
Branch:
$ source venv/bin/activate
$ python Bank/src/Branch.py input.json
Customer:
$ source venv/bin/activate
$ python Bank/src/Customer.py input.json
{'id': 1, 'recv': ["{ 'interface': 'query', 'result': 'success', 'money': 400 }", "{ 'interface': 'withdraw', 'result': 'success' }"]}
{'id': 2, 'recv': ["{ 'interface': 'deposit', 'result': 'success' }", "{ 'interface': 'query', 'result': 'success', 'money': 570 }"]}
{'id': 3, 'recv': ["{ 'interface': 'withdraw', 'result': 'success' }", "{ 'interface': 'query', 'result': 'success', 'money': 330 }"]}