Quick Start
This guide walks you through your first graph algorithm execution after the system is running.
Step 1: Prepare a Graph File
The system accepts two text-based formats. Create a simple test file:
test-graph.txt (edge list format):
# Simple directed weighted graph
0 1 2.5
0 2 1.0
1 3 1.5
2 3 0.5
3 4 2.0
1 4 5.0
Each line is source target weight. Lines starting with # or % are skipped. Weight is optional (defaults to 1.0).
Step 2: Open the Frontend
Navigate to http://localhost:3000.
You'll see:
- Left panel — the graph visualization canvas (WebGL)
- Right panel — controls for file upload, algorithm selection, and results
Step 3: Upload the Graph
- Click "Choose File" in the right panel
- Select your
test-graph.txt - Set Format to
Edge List
The WASM parser runs in a Web Worker — the graph appears in the canvas almost instantly. Node colors indicate degree (cyan = low, orange = high hub nodes).
Step 4: Run an Algorithm
- Select Dijkstra from the algorithm dropdown
- Set Start Node to
0 - Click Execute
The request goes to POST http://localhost:8000/process_file. The MPI master distributes the computation to the worker, merges results, and returns:
{
"path": [0, 2, 3, 4],
"distances": {"0": 0.0, "1": 2.5, "2": 1.0, "3": 1.5, "4": 3.5},
"mpi_processes": 2,
"mpi_mode": "distributed"
}
The shortest path from node 0 to all reachable nodes is highlighted in cyan.
Step 5: Animate the Path
Click Play in the results panel. The path nodes light up progressively at the configured speed (Fast: 40ms, Medium: 100ms, Slow: 280ms per step).
Step 6: Explore Further
| Action | How |
|---|---|
| Hover a node | Highlights all neighbors; dims others |
| Search for a node | Type node ID in the search box, press Enter |
| Switch layout | Use the Layout dropdown (Force 2D/3D, Circular, Radial) |
| Compute metrics | Click "Compute Metrics" for density, component count, hub nodes |
| Try PageRank | Select PageRank → nodes colored by rank score |
| Try SCC | Select SCC → nodes colored by component |
API Quick Reference
You can also call the API directly without the frontend:
# Health check
curl http://localhost:8000/health
# MPI status
curl http://localhost:8000/mpi_status
# Run Dijkstra via API
curl -X POST http://localhost:8000/process_file \
-F "file=@test-graph.txt" \
-F 'request={"algorithm":"dijkstra","file_format":"edge_list","start_node":0}'
# Graph metrics (no MPI)
curl -X POST http://localhost:8000/graph_metrics \
-F "file=@test-graph.txt" \
-F 'request={"file_format":"edge_list"}'
See the full REST API reference for all endpoints and parameters.