Installation
Prerequisites
Before you begin, make sure you have the following installed:
- Docker 24+ and Docker Compose v2
- Git
That's it. All Rust compilation, MPI setup, and npm dependency installation happen inside the Docker build — no local Rust or Node.js toolchain required.
tip
If you want to develop locally without Docker, you'll also need Rust (1.75+), OpenMPI, Node.js 22+, pnpm, and wasm-pack. See the repo README for local dev setup.
Clone the Repository
git clone https://github.com/sinhaparth5/distributed-graph-system
cd distributed-graph-system
Build and Start
docker compose up --build
This command:
- Builds the
mpi-masterandmpi-workerimages (Rust + OpenMPI compilation — takes a few minutes on first build) - Builds the
frontendimage (installs npm deps, runs Vite build, copies to nginx) - Starts all three services on a private Docker bridge network
On subsequent runs without code changes, use:
docker compose up
Verify It's Running
| Service | URL | Expected |
|---|---|---|
| Frontend | http://localhost:3000 | React app loads |
| API health check | http://localhost:8000/health | {"status":"ok"} |
| MPI status | http://localhost:8000/mpi_status | {"mpi_processes":2, ...} |
Stopping
docker compose down
To also remove the built images:
docker compose down --rmi all
Directory Structure
distributed-graph-system/
├── src/ # Rust backend (MPI master + worker)
│ ├── bin/server.rs # Rocket HTTP server
│ ├── graph.rs # Graph data structure + algorithms
│ └── mpi_processor.rs # MPI distribution layer
├── wasm/ # Rust → WebAssembly crate
│ └── src/lib.rs # WASM-exported functions
├── frontend/ # React + Vite app
│ ├── src/
│ │ ├── App.tsx
│ │ ├── GraphView.tsx
│ │ └── workers/parseGraph.worker.ts
│ └── Dockerfile
├── Cargo.toml
├── docker-compose.yml
└── Dockerfile