RW Quorum Calculator
 Simulator to calculate read quorum, write quorum and system availability

In a distributed system, data is replicated on multiple nodes of the network rather than storing it in a centralized node. This decentralization of the data over multiple nodes of the network holds benefits and poses challenges at the same time.
One approach for managing replication of data is through the assignment of votes(weights) to the individual copies. It allows one to prefer copies that reside on reliable and well connected nodes.
In order to find the combination of nodes to be read from or written to:
Votes are assigned to each nodes based on two heuristic approaches:
In Heuristic 1, only the probabilities of the links connected to the node is considered while assigning the vote to the node
In Heuristic 2, the probabilities of the links as well as the node to which they are connected is considered while assigning the vote to the node.
Once the votes are assigned to each node, the read and write quorums are then found based on the formula

r + w > Sum of all the votes
w > sum of all the votes / 2

The system availability is calculated by:
1. Finding the state probability for all possible configurations of the nodes and links that correspond to a read and write quorum.
2. When the read and write quorums are not the same, then the percentage of reads and writes are taken into account for calculating the corresponding system availability.
3. In this simulator, 75% reads and 25% writes are assumed for calculating system availability when read and write quorums are not identical.