Giter Club home page Giter Club logo

distributedsystem1-project's People

Contributors

dadebulba avatar pivoz avatar

Stargazers

 avatar

Watchers

 avatar  avatar

distributedsystem1-project's Issues

Initialize Client System

Client requests. The client can issue read and write requests to any replica. Both types of request contain
the ActorRef of the client. The write request also contains the new proposed value v*.

Update Protocol

Update Protocol: To perform the update request, the coordinator initiates the protocol by broadcasting to
all replicas the UPDATE message with the new value. Then, it waits for their ACKs until a quorum Q of
replicas is reached. In this implementation, Q = N/2 + 1, i.e., a majority of nodes. Once enough ACKs are
collected, the coordinator broadcasts the WRITEOK message.

Each UPDATE is identified by a pair <e,i> where e is the current epoch and i is a sequence number. The
epoch is monotonically increasing; a change of epoch corresponds to a change of coordinator. The sequence
number resets to 0 for every new epoch, but identifies uniquely each UPDATE in an epoch. Upon a WRITEOK,
replicas apply the update and change their local variable. They also keep the history of updates to ensure none
of them is lost in the case of a coordinator crash (see \Coordinator election").

Coordinator election protocol

Coordinator election. If the coordinator crashes, the remaining replicas must elect a new coordinator to take
its place. Coordinator election must be performed by a simple ring-based protocol, where the ring topology is
established based on replica IDs. ELECTION messages forwarded in the ring should contain the information
about the known updates for each node. The new coordinator should be a replica that knows the most recent
update. IDs are used to disambiguate replicas that are equally up-to-date. Eventually, the best candidate
broadcasts a SYNCHRONIZATION message to announce the new leadership and synchronize all other replicas
by sending all the updates that they missed. Then, the broadcast protocol can continue.

Create Timeout

Create a Timeout class that takes in input a value representing the millis and a callback to call when time expires. It has to implement a cancel method that stops the timeout.

Each Replica has a different timeout to avoid concurrent message start. Used also during ELECTION

READ request

Implement READ request from Client to Replica

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.