Zettelkasten

CRDT Conflict-Free Replicated Data Types

·수정 2026.04.23·수정 1

https://www.youtube.com/watch?v=FG5Varj1Ows&list=PLjTveVh7FakLdTmm42TMxbN8PvVn5g4KJ&index=21&ab_channel=Jordanhasnolife https://velog.io/@heelieben/%EC%8B%A4%EC%8B%9C%EA%B0%84-%EB%8F%99%EC%8B%9C-%ED%8E%B8%EC%A7%91-OT-%EC%99%80-CRDT

  1. Last Write wins(LWW)
  2. detect concurrent writes and sotre siblings
  3. Have db merge them

what is a CRDT

Pasted image 20241127094412.png

  • 어떤 변경사항을 받을때, 순서와 관계없이 변경사항만 같으면 같은 상태
  • 각 문자에 고유한 id를 부여하고 이를 기반으로 보정함

Where are CRDTs used?

  • Riak
  • Redis (sets in Redis enterprise)

downsides

  • add ham, remove ham 에서 add ham 이 replication 과정에서 실패하면 어떻게 할 것임?
  • we need casually consistent message delivery no drops, no duplicate
  • idempotent: same thing many times and no different

state-based CRDTs merge function must be

  • commutative
  • Associative
  • Idempotent

gossip protocol

  • no extra messaging infra
  • 2