Giter VIP home page Giter VIP logo

ds2022-mini-proj-1's Introduction

ds2022-mini-proj-1

Distributed Systems mini project 1 - Mutual exclusion in distributed systems Implementation of Ricart–Agrawala algorithm

Full Description of the task is here


Architecture


./
├── .gitignore ----------------------------------- list of files im git commits
├── README.md ------------------------------------ this documentation
├── LICENSE -------------------------------------- To be Added
├── constants.py --------------------------------- Default values and string literals
├── critical_section.py -------------------------- Implementation of Critical Section
├── process.py ----------------------------------- Thread based simulation of Process
├── process_service.py --------------------------- Decoupled-server service to spawn process thread tied to ConnectionService
├── connection_service.py ------------------------ Decoupled-client service to communicate with handler task and ProcessService
├── ra_program_server.py ------------------------- Entry point ListenerService to Spawn Threads and observe RA algorithm
├── ra_program_client.py ------------------------- Client input point to send method calls to ListenerService
└── requirements.txt ----------------------------- pip requirements file

Requirements:

  • rpyc (Really! That's it ;)

How to run?

  1. Install the requirement (just the one) from requirements.txt
  2. Open two command line interfaces.
  3. Run the server. Optionally, pass --verbose flag to see algorithm's message hand-off logs.
	python ra_program_server.py
  1. Run the client. Here, N denotes number of processes to be initialized.
	python ra_program_client.py N

Commands:

  1. List: List processes and their current state.
    $ list
  1. time-p: Update upper bound for timeout of processes. t represents timeout in seconds.
    $ time-p t
  1. time-cs: Update upper bound for timeout of Critical Section. t represents timeout in seconds.
    $ time-cs
  1. exit: Terminate all threads, connections and release all acquired ports and exit program.
    $ exit

TODO:

  1. More Testing.
  2. Observe effect of asynchronous callbacks over synchronous.
  3. Documentation.

ds2022-mini-proj-1's People

Contributors

a3darekar avatar bodias avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.