๐Ÿ”— Chord DHT Interactive Simulation

Distributed Hash Table Visualization

Ring Configuration

Node Management

Visualization Controls

Key Lookup

Object Management

Active Nodes
Successors
Finger Table
Lookup Path
Coordinator

Activity Logs

[System] Chord DHT Simulation initialized
[Info] Add nodes to build the Chord ring

Ring Statistics

0
Active Nodes
Currently in the ring
8
Ring Size
Total positions (2^m)
0
Objects Stored
Current round objects
0
Current Round
Simulation round
0
Last Lookup Hops
Steps in last search
0.0
Average Hops
Across all lookups

Message Statistics

0
Total Messages
All experiment messages
0
Round Messages
Current round messages
None
Coordinator
Current round coordinator

Node Information

Click on a node to see its details

Lookup Results

Perform a lookup to see results

๐Ÿ“ฑโžก๏ธ๐Ÿ“ฒ

Please Rotate Your Device

For the best experience, please rotate your device to landscape mode to view this Chord DHT simulation.

๐Ÿ”— Chord DHT Feature Guide

๐Ÿ”ง Ring Configuration

  • Ring Size: Sets the total positions in the hash ring (2^m). Larger rings allow more nodes but increase hop counts.
  • Recommended: Start with 8 positions (2^3) for learning, use 32+ for performance testing.

๐Ÿ–ฅ๏ธ Node Management

  • Add Random Node: Automatically places a node at a random position on the ring.
  • Add Specific Node: Place a node at an exact position (0 to ring size - 1).
  • Remove Node: Removes a node and triggers ring stabilization.
  • Best Practice: Add 4-6 nodes for optimal visualization and O(log n) performance.

๐Ÿ‘๏ธ Visualization Controls

  • Show Finger Tables: Displays purple lines showing each node's routing shortcuts.
  • Hide Finger Tables: Removes finger table visualization for cleaner view.
  • Clear Ring: Removes all nodes and starts fresh.

๐Ÿ” Key Lookup

  • Key Lookup: Find which node is responsible for a specific key (0 to ring size - 1).
  • Object Lookup: Search for objects using their original key (0-999). The system hashes it to find the responsible node.
  • Path Visualization: Red lines show the actual routing path taken during lookup.
  • Performance: Watch hop counts - should be O(log n) where n = number of nodes.

๐Ÿ“ฆ Object Management

  • Objects per Round: Choose how many random objects to distribute (3, 5, 8, or 10).
  • Start New Round: Generates new random objects and distributes them to responsible nodes.
  • Coordinator: One node is randomly selected as coordinator for each round.
  • Distribution: Objects are automatically assigned based on consistent hashing.

โš ๏ธ Fault Injection

  • Crash Fault: Makes a node completely unresponsive (shown in gray).
  • Byzantine Fault: Node responds but gives wrong answers 30% of the time (shown in dark red).
  • Clear Faults: Restores all nodes to normal operation.
  • Testing: Try lookups after injecting faults to see how the system routes around failures.

๐Ÿ“Š Understanding the Visualization

  • Blue Circles: Active healthy nodes
  • Green Lines: Successor relationships (ring structure)
  • Purple Lines: Finger table entries (routing shortcuts)
  • Red Lines: Active lookup path being traced
  • Gray Nodes: Crashed nodes
  • Dark Red Nodes: Byzantine (malicious) nodes
  • Gold Border: Current round coordinator

๐ŸŽฏ Recommended Experiments

  1. Basic Setup: Add 4-5 nodes โ†’ Start new round โ†’ Try key lookups
  2. Performance: Compare hop counts with different ring sizes and node counts
  3. Fault Tolerance: Add nodes โ†’ Start round โ†’ Inject crash fault โ†’ Try lookups
  4. Byzantine Behavior: Inject Byzantine fault โ†’ Perform multiple object lookups โ†’ Observe inconsistent results
  5. Ring Dynamics: Add/remove nodes while performing lookups to see stabilization

๐Ÿ“ˆ Statistics Panel

  • Active Nodes: Current number of healthy nodes in the ring
  • Objects Stored: Number of objects distributed in current round
  • Current Round: Round number for object distribution
  • Last Lookup Hops: Number of routing steps in the most recent lookup
  • Average Hops: Average hops across all lookups performed
  • Message Statistics: Communication overhead tracking