Skip to main content

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:

  1. Builds the mpi-master and mpi-worker images (Rust + OpenMPI compilation — takes a few minutes on first build)
  2. Builds the frontend image (installs npm deps, runs Vite build, copies to nginx)
  3. Starts all three services on a private Docker bridge network

On subsequent runs without code changes, use:

docker compose up

Verify It's Running

ServiceURLExpected
Frontendhttp://localhost:3000React app loads
API health checkhttp://localhost:8000/health{"status":"ok"}
MPI statushttp://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