Skip to content

Repository files navigation

Distributed Computing Framework

A high-performance distributed computing framework built with C++ and MPI (Message Passing Interface) for parallel computations across multiple nodes.

Features

  • Parallel Computing: Distributed computation across multiple nodes using MPI
  • Data Partitioning: Efficient data distribution algorithms for optimal workload distribution
  • Load Balancing: Dynamic and static load balancing strategies
  • Fault Tolerance: Automatic retry mechanisms and node failure handling
  • Scalability: Support for adding/removing compute nodes dynamically

Architecture

Components

  1. Master Node: Coordinates task distribution and result aggregation
  2. Worker Nodes: Execute assigned computational tasks
  3. Load Balancer: Distributes tasks based on node capacity and current load
  4. Fault Tolerance Manager: Monitors node health and handles failures

Key Algorithms

  • Round-robin task distribution
  • Work-stealing load balancing
  • Checkpoint-based fault recovery
  • Data partitioning with overlap handling

Prerequisites

  • C++17 or higher
  • MPI implementation (OpenMPI or MPICH)
  • CMake 3.10+
  • Linux/Unix environment (recommended)

Installation

Install MPI (Ubuntu/Debian)

sudo apt-get update
sudo apt-get install mpich libmpich-dev

Install MPI (macOS)

brew install open-mpi

Build the Project

mkdir build
cd build
cmake ..
make

Usage

Running a Simple Example

# Run with 4 processes
mpirun -np 4 ./distributed_framework

# Run with specific hosts
mpirun -np 8 --hostfile hosts.txt ./distributed_framework

Example: Matrix Multiplication

mpirun -np 4 ./matrix_multiply 1000 1000

Example: Monte Carlo Simulation

mpirun -np 8 ./monte_carlo_pi 1000000000

Configuration

Edit config/framework.conf to customize:

  • Task timeout settings
  • Retry attempts
  • Load balancing strategy
  • Checkpoint intervals

Performance Metrics

  • Speedup: Linear scaling up to 64 nodes
  • Fault Recovery: < 2 second node replacement
  • Load Balance Efficiency: > 95% on homogeneous clusters

Project Structure

DistributedComputingFramework/
├── src/
│   ├── core/              # Core framework components
│   ├── partitioning/      # Data partitioning algorithms
│   ├── load_balancing/    # Load balancing strategies
│   ├── fault_tolerance/   # Fault handling mechanisms
│   └── examples/          # Example applications
├── include/               # Header files
├── tests/                 # Unit and integration tests
├── config/                # Configuration files
└── docs/                  # Documentation

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages