Skip to content

Implementation of a distributed token management system, designed to facilitate secure and efficient token transactions across a network of clients and servers. The system includes a client-side interface and a server-side interface, both built with asyncio in Python for asynchronous operation.

Notifications You must be signed in to change notification settings

yosefede06/Distributed-Payment-System

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Distributed Token Management System

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.

Features

  • 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.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

What things you need to install the software and how to install them:

Python 3.7+

Installing

A step by step series of examples that tell you how to get a development environment running:

  1. Clone the repository:
git clone https://github.com/yosefede06/Distributed-Payment-System.git
  1. Navigate to the project directory:
cd Distributed-Payment-System
  1. Install necessary packages:
pip install -r requirements.txt
  1. Run some server:
python main.py server
  1. Run some client:
python main.py client

Usage

Client Commands

  • 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.

Server Commands

  • Transform: transform Convert the server into a client mode.
  • Quit: quit Safely shut down the server.
  • Help: help Display available commands.

Testing

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

Authors

  • Yosef Edery - yosefede06

About

Implementation of a distributed token management system, designed to facilitate secure and efficient token transactions across a network of clients and servers. The system includes a client-side interface and a server-side interface, both built with asyncio in Python for asynchronous operation.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages