Skip to content
joaop21 edited this page Mar 16, 2021 · 6 revisions

Welcome to SpringRaft's Wiki

This wiki aims to clarify important parts of the project, such as the design phase, the various types of deployment, the various coded examples, and also the load testing done against the created solutions.

  1. What Is Consensus?
  2. What Is Raft?
  3. What Is SpringRaft?
  4. What Is SpringRaft For?
  5. What Problem Does SpringRaft Solve?
  6. What Design Principles Underlie SpringRaft?
  7. How Does SpringRaft Accomplish Its Goals?

What Is Consensus?

Agreement problems are at the core of any distributed fault-tolerant system. A system may have to reach agreement in various situations, for example when it has to choose a leader, or when it has to approve or abort a distributed transaction, etc. The various problems involving distributed agreement can be reduced to an abstract formulation known as the consensus problem. Given a finite set of processes, which initially propose a value, an algorithm that solves the consensus problem on that same value should satisfy the following properties:

  • Termination: Every correct process eventually decides;
  • Validity: The decision is on a voted value;
  • Agreement: No two processes decide differently;

In a system without faults the consensus problem is easily solved. However, in the presence of faults and depending on the assumed fault model, solving this problem can be very difficult or even impossible. This impossibility was demonstrated by Fischer, Lynch and Paterson in 1985, where they proved that it is impossible to solve the consensus problem using a deterministic algorithm on an asynchronous system in a crash-stop fault model, even with reliable channels.

What Is Raft?

Raft is a consensus algorithm that is designed to be easy to understand. It's equivalent to Paxos in fault-tolerance and performance. The difference is that it's decomposed into relatively independent subproblems, and it cleanly addresses all major pieces needed for practical systems. To solve the consensus problem mentioned above, Raft uses some synchronous assumptions, such as time barriers for receiving communications.

Superficially, Raft solves the consensus by electing a leader and assigning it all the responsibility of managing the replicated log, greatly simplifying the process, because the data flows only from the leader to the other processes without being consulted. The leader accepts log entries from clients, replicates them to the other processes and informs them when it is safe to apply the received changes to their state machine.

What Is SpringRaft?

SpringRaft is a dissertation project, which consists in the Raft's consensus algorithm implementation, both in Servlet and Reactive stacks. This implementations should be modular, so that they can be expanded, and should be generic, so that they can be reused in different use cases.

What Is SpringRaft For?

The final purpose of this project is the comparison of the 2 stacks, when applied in this case.

What Problem Does SpringRaft Solve?

What Design Principles Underlie SpringRaft?

How Does SpringRaft Accomplish Its Goals?

Learn more about How It Works and How To Use.