Is there a relationship between CRDTs and the RAFT protocol - or are they orthogonal?

hawkeye

Take the use case of a multi-player networked game. Instantly you have the problem of replicating and reconciling shared state across the network.

There appear to be a multiple of tools aimed at aspect of this problem, and two in particular seem to overlap:

  1. Conflict-free Replicated Data Types (CRDTs) - used for
  2. The RAFT consensus algorithm - for choosing a transactional leader in a distributed network to help achieve consensus.

My question is: Is there a relationship between CRDTs and the RAFT protocol - or are they orthogonal?

kuujo

In distributed systems terms, the two are quite different and serve very different use cases. While both aim to achieve strong consistency, CRDTs do so generally without sacrificing availability, and Raft does so at the expense of availability. In the face of a network partition, CRDTs will remain available, but a Raft cluster can become either partially or fully unavailable. Raft is a consensus algorithm that relies on a majority of the cluster communicating with each other to progress.

There are also differences in the type of state that can be managed by each. CRDTs work to represent a limited and well defined set of data types, while Raft and other consensus algorithms can be used to model a much more wide array of potential data structures and algorithms. Raft is typically used to model a replicated state machine. Commands to the state machine are logged and replicated through the Raft algorithm and applied to a state machine. State machines can be used to model data structures like maps and sets or control concurrency by modeling things like locks, leader elections, and semaphores.

You also have to look at your system in terms of scalability, and Raft and CRTDs differ significant here as well. Raft is a leader-based system. Raft elects a single node as the leader, and all state changes to a Raft replicated state machine go through that single leader and are synchronously replicated to a majority of followers before being applied to the state machine. Alternatively, CRDTs are significantly more scalable as they're not limited by a single node.

Ultimately, the difference between Raft and CRDTs is the difference between consistency and performance. Raft is designed to create a consistent view of a single system with a focus on safety over performance. Typically, consensus algorithms like Raft are used for things like configuration management and service discovery. CRDTs are designed to be fast and as consistent as possible without sacrificing availability. Typically, CRDTs are used for storage in more availability dependent and less critical systems.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

What is the protocol / relationship between encodings and programming languages?

From Dev

RAFT consensus protocol - Should entries be durable before commiting

From Dev

poly() in lm(): difference between raw vs. orthogonal

From Dev

The relationship between SelectionDAG and SelectionDAGISel

From Dev

Relationship between rxJava and promises

From Dev

Relationship between pickle and deepcopy

From Dev

relationship between pool and heap

From Dev

SQL - Relationship between actors

From Dev

OR relationship between places

From Dev

Relationship between OAuth and JWT

From Dev

Relationship between Sheet and Worksheet

From Dev

Relationship between Alloy and UML?

From Dev

Phalcon Relationship between yourself?

From Dev

Create relationship between to entities

From Dev

Relationship between HttpContext & HttpConnection

From Dev

Relationship between model in cakephp

From Dev

Laravel Relationship Between Tables

From Dev

relationship between 2 arrays

From Dev

The relationship between SelectionDAG and SelectionDAGISel

From Dev

Relationship between IBM & Lenovo

From Dev

The relationship between dll and rdlc

From Dev

compdata: relationship between :+: and Subsume

From Dev

Relationship between Alloy and UML?

From Dev

Relationship between compiler and interpreter

From Dev

The relationship between cpu and kernel

From Dev

Mysql relationship between tables

From Dev

Difference between id<protocol> and NSObject<protocol>

From Dev

Difference between pgp protocol and rsa protocol

From Dev

Difference between SOAP and HTTP protocol?