Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

6 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Erasure Lab

Interactive Erasure Coding Explorer for Distributed Storage Engineers

Stop guessing. Start seeing the trade-offs.

Live Demo Β· δΈ­ζ–‡ζ–‡ζ‘£ Β· Report Bug

Erasure Lab preview


Why does EC(4,2) vs EC(6,3) matter if they're both 1.5x?

They share the same storage overhead β€” but everything else is different.

EC(6,3) tolerates 3 simultaneous failures instead of 2. It also demands 9 I/Os per write instead of 6, and needs to read 6 chunks to repair a single lost block instead of 4. These hidden dimensions β€” repair bandwidth, degraded read latency, cascading failure risk β€” are the trade-offs that take senior engineers years to internalize.

Erasure Lab makes them visible in seconds.

Β Β Β Β πŸ”— Try it now β†’ ec-lab.steinslab.ioΒ Β Β Β 

What is Erasure Lab?

Erasure Lab is a pure-frontend, embeddable, interactive web tool built as an Explorable Explanation β€” a format where reading and interacting are inseparable. It helps distributed storage engineers build engineering intuition about encoding scheme trade-offs through direct manipulation.

Drag a slider. Kill a node. Watch the math come alive.

Encoding Types Covered

Type Description
Replication N-way copies (e.g., 3-replica) β€” simple, expensive, fast repair
Erasure Coding (EC) Reed-Solomon style (k data + m parity) β€” space-efficient, higher I/O
LRC Local Reconstruction Codes β€” local parity groups for faster repair

Features

πŸŽ› Interactive Parameter Exploration

Drag sliders to adjust k, m, replica count, AFR, MTTR, and cluster size. Every chart, metric, and formula updates in real-time (<16ms) β€” no "Calculate" button, no page refresh.

πŸ“Š 8-Dimensional Trade-off Analysis

Simultaneously visualize the metrics that actually matter:

  • Storage Overhead β€” Capacity bar showing raw vs. effective storage
  • Fault Tolerance β€” Maximum simultaneous failures survived
  • Repair Cost β€” Chunks read per single-block repair
  • I/O Fan-out β€” Write amplification per operation
  • Deployment Threshold β€” Minimum nodes required
  • Durability β€” Annual data loss probability (Markov chain model)
  • Read Performance β€” Degraded-mode read penalty
  • Compute Overhead β€” Encoding/decoding computational cost

πŸ•Έ Multi-Scheme Radar Chart

Overlay multiple encoding schemes on a single radar chart. Instantly spot where LRC wins on repair cost but loses on storage, or why 3-replica dominates on read performance.

πŸ’€ Node Failure Simulator

Click to "kill" nodes on an interactive grid. Watch the system transition through Safe β†’ Degraded β†’ Data Lost states. Compare how EC(4,2) and EC(6,3) behave under identical failure scenarios.

πŸ“ "Show Your Math" β€” Transparent Formulas

Every computed result has an expandable formula panel powered by KaTeX. Variables are live-bound to your slider values β€” change a parameter and watch the math update in real-time. No black boxes.

Includes full Markov chain derivation for durability probability with intermediate state transition visualization.

⚑ Preset Configurations

One-click presets for industry-standard configurations:

  • Ceph default EC(4,2)
  • HDFS 3-Replica
  • Azure LRC(10,4,2)
  • And more...

🌐 Additional Highlights

  • Dark / Light Theme β€” Engineer-friendly dark mode by default
  • PWA Offline Support β€” Works completely offline, install as a desktop app
  • i18n β€” English and Chinese interface
  • Embeddable β€” Drop into any wiki, blog, or internal platform via iframe
  • Zero Backend β€” Pure static site, deploy anywhere

Quick Start

Online

Visit ec-lab.steinslab.io β€” no installation required.

Local Development

git clone https://github.com/user/erasure-lab.git
cd erasure-lab
npm install
npm run dev

Open http://localhost:5173 in your browser.

Build

npm run build    # Production build β†’ dist/
npm run preview  # Preview production build locally

Test

npm test              # Run all tests
npm run test:coverage # With coverage report

Tech Stack

Layer Technology
Framework React 19 + TypeScript
Build Vite 7
State Zustand (selector-based, <16ms update budget)
Charts Recharts + Custom SVG
Math KaTeX (synchronous rendering)
Styling Tailwind CSS 4 + Shadcn UI
Validation Zod
Testing Vitest + Testing Library
PWA vite-plugin-pwa

Architecture

src/
β”œβ”€β”€ engine/        # Pure math β€” zero UI dependencies, 100% tested
β”‚   β”œβ”€β”€ erasureCode.ts    # EC/LRC/Replication calculations
β”‚   β”œβ”€β”€ probability.ts    # Markov chain durability model
β”‚   └── simulation.ts     # Node failure state machine
β”œβ”€β”€ store/         # Zustand state β€” the only bridge between engine and UI
β”œβ”€β”€ components/
β”‚   β”œβ”€β”€ charts/    # RadarChart, NodeGrid, IOFanout, PersistenceFlow...
β”‚   β”œβ”€β”€ controls/  # ScrubbableSlider, PresetCard, ParameterPanel...
β”‚   β”œβ”€β”€ math/      # FormulaBlock, MathBlock (KaTeX rendering)
β”‚   └── content/   # Explorable Explanation article renderer
β”œβ”€β”€ content/       # Article content (narrative + embedded interactives)
└── locales/       # i18n translations

Key architectural invariant: engine/ never imports from store/ or components/. UI never calls engine/ directly β€” all computation flows through the store.

Contributing

Contributions are welcome! Whether it's a bug fix, new encoding scheme, or improved visualization β€” feel free to open an issue or submit a pull request.

npm run lint          # Lint check
npm run format:check  # Format check
npm test              # All tests must pass

Other Project

This project is an interactive utility for the Distributed Storage Roaming Guide.

Erasure Lab provides interactive engineering intuition. Together, they help you build a distributed storage knowledge system and technical intuition.

License

MIT


Built for the engineers who care about every bit.
ec-lab.steinslab.io

About

πŸš€ Interactive Erasure Coding Explorer for Distributed Storage Engineers | εˆ†εΈƒεΌε­˜ε‚¨ε·₯η¨‹εΈˆηš„δΊ€δΊ’εΌηΊ εˆ η ζŽ’η΄’ε·₯ε…· πŸ› οΈπŸ“¦

Topics

Resources

Stars

7 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages