# Examples

> Two-phase commit, Raft, Dijkstra's token ring and classic algorithms, explained step by step with runnable models, failure traces and diagrams.

Canonical: https://fizzbee.io/design/examples/


For shorter, runnable models of common patterns (locks, sagas, queues, caches), see the [Distributed Systems Patterns](/design/patterns/) library.

- [Cycle Detection in Linked List](/design/examples/linked_list_cycle/)
- [Die Hard](/design/examples/die-hard/)
- [EWD426 Token Ring](/design/examples/ewd426-token-ring/)
- [Two Phase Commit](/design/examples/two_phase_commit/)
- [Two Phase Commit (Procedural)](/design/examples/two_phase_commit_procedural/)
- [Two Phase Commit (Actor model/Object oriented)](/design/examples/two_phase_commit_actors/)
- [Raft Consensus Protocol - FizzBee Specification for Reasoning](/design/examples/raft-algorithm-reasoning-spec/)
- [Raft Consensus Protocol](/design/examples/raft-consensus-algorithm/)
- [Knuth-Yao Sampling Algorithm for Random Variate Generation](/design/examples/knuth-yao-sampling-algorithm/)
- [Time oblivious Sampling Algorithm for Random Variate Generation](/design/examples/time-oblivious-sampling-algorithm/)

    

