Learning Ractor with Raft
summary
Builds a simple Raft implementation from scratch inside one Ruby process using Ractor, creating five Ractors that elect a leader, append and replicate an append-only log, and survive leader exit by reelecting a new leader; demo shows replicated data across nodes and successful failover. Uses Ractor inbox ordering, move ownership and deep copy semantics, and receive filters; skips durable disk commits, strict log-matching checks, and network validation so correctness is demonstrated but not production-ready.
AI-written summary · about
chapters (8)
- 0:00Start
- 0:43Background on Raptor and Draft
- 2:01Main Reactor
- 3:38Actor Model
- 7:22Caveats
- 10:41How Raft Elections Work
- 24:18Adding or Replacing Nodes
- 26:47Return Value
related talks
25mRactor Demonstration
30mRactor on Ruby 3.4
29mUsing Ractors and Making Ractors Usable
28mCome Discuss Ractors and Concurrency with 'The Dude'!
28mRactors in Ruby 4.0: Message Passing Without the Pain
29mMillion-Agent Ruby: Ractor-Local GC in the Age of AI
28mThread-Coordinated Ractors: The Pattern That Delivers
43mRails is a Follower
