Coder Social home page Coder Social logo

distributedsystem's Introduction

Installation

python3 -m pip install -r requirements.txt

Use

Needs 5 console windows. Launch the name server in the first console window:

pyro4-ns

then, in no particular order, at least 2 instances of:

python3 replicaManager.py

1 instance of

python3 frontEnd.py

and 1 instance of

python3 Client.py

No time pressure for launching, the different parts of the program will just keep complaining until everyone can detect everyone.

Once all parts are launched (in separate console windows/tabs), use the client to write commands. Write help in the client for a complete tutorial. A typical sequence of commands would be search ab followed by read, followed by rate A 4.5 or rate sabrina 3.0. Servers will print various messages to the screen, reflecting their internal states.

Functioning

Each replica manager consists of 3 threads, one for monitoring and processing its log and query queue based on internal state (value timestamp); one for serving incoming calls like replica whispers and client requests forwarded by the front end server; and one for emitting whisper messages and responses to client requests. Query requests are handled through regex search of the movie list.

Front end server forwards client requests and replica manager responses. Adds its timestamp onto requests before passing them to replica managers, and updates it whenever update response is received. Should in theory detect and handle lost connections to replica managers (the exception falls through the handler for an unknown reason and goes to the client)

Client gives a text interface to generate requests (search ... corresponds to a query and rate ... ... corresponds to an update)

distributedsystem's People

Contributors

marko-z avatar

Watchers

 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.