distributedsystem1-project's People
distributedsystem1-project's Issues
Convert ACK key from value to progressive id
Let clients to send updates with values from 0 to Integer.MAX_INT
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*.
Implement time intervals to simulate network time delays
Test the behaviour if a replica crash after having sent an ElectionMessage
isElectionInProgess flag never put to false on the new coordinator
Test sequential consistency based on the log file
Complete the TODO in Test.java
Weak algorithm for sequential consistency
Flows like the following (that is correct) are signaled as not consistent:
a = [5,6,8,9,10,11]
b = [1,2,7]
c = [5,1,2,7,6]
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.
Fix election problem when replica sends an ElectionMsg to a dead replica
Check the behaviour if the quorum is not reached during the update
The coordinator should keep that message in memory forever in the current implementation
Coordinator can be null during the election
If any client send an update to any replica during the election, the "coordinator" object can be null
Check timeout crash on second election
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
UpdateRequestTimer is based on value. Problem if 2 UpdateRequest with same value hit one replica
READ request
Implement READ request from Client to Replica
Keep list of deads and alives updated
Convert Timers list to MAP to maintain message order in case of network delay
Ack entry in recreated in the ack map after deleting it
Fix problem if client sends update to the coordinator
Check for pending updates not propagated after having elected a new coordinator
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.