The Distributed Token Management System is an asyncio-based Python application designed to manage and facilitate token transactions across a network with crash and omission failures between clients and servers. It allows users to execute token transactions, retrieve token ownership information, and change client and server roles within a distributed architecture.
- Token Transactions: Execute payments and transfer token ownership.
- Token Retrieval: Retrieve detailed information about token ownership based on user IDs.
- Dynamic Role Transformation: Transition between client and server functionalities to maintain network flexibility and efficiency.
- Server and Client Management: Manage server and client operations with intuitive command-line interfaces.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
What things you need to install the software and how to install them:
Python 3.7+
A step by step series of examples that tell you how to get a development environment running:
- Clone the repository:
git clone https://github.com/yosefede06/Distributed-Payment-System.git
- Navigate to the project directory:
cd Distributed-Payment-System
- Install necessary packages:
pip install -r requirements.txt
- Run some server:
python main.py server
- Run some client:
python main.py client
- Pay: pay <tokenid,version,newowner> Send payment or transfer ownership of a token.
- Get Tokens: gettokens <owner,> Retrieve tokens based on ownership.
- Check: check Verify connectivity with all servers.
- Transform: transform Convert the client node into a server.
- Help: help Display available commands.
- Transform: transform Convert the server into a client mode.
- Quit: quit Safely shut down the server.
- Help: help Display available commands.
This project uses unittest for testing its components. To run tests, navigate to the project directory and execute the following:
python -m unittest discover -s tests
- Yosef Edery - yosefede06