Skip to content

Trapster/DevLab_multi_processing

Repository files navigation

Multi-PC Multi-Processing

A collection of projects demonstrating distributed computing techniques in Python — from simple single-machine multiprocessing to browser-based WebAssembly workers.

Projects

Project Description
0-local_primes_single_process Baseline: single-threaded prime search
1-local_primes_multi_process Multi-core prime search on one machine
2-net_primes_multi_process Distributed prime search across multiple machines
3-net_mandelbrot Distributed Mandelbrot rendering over network
4-web_primes Browser-based distributed computing (primes via Pyodide)
5-web_mandelbrot Browser-based distributed Mandelbrot rendering

⚙️ Configuration (Before Running)

Before using these projects, you'll need to configure a few values:

Network Projects (2-net_primes, 3-net_mandelbrot)

Edit the worker.py file in each project and replace the placeholders:

# In worker.py
master_ip_vpn = '<YOUR_MASTER_IP>'  # ← Your master machine's IP address
port = 50000                         # ← Default port (change if needed)
authkey = b'your_secret_password'    # ← Shared secret (must match master)

Finding your IP address:

# Linux/macOS
ip addr show   # or hostname -I

# Windows
ipconfig

Web Projects (4-web_primes, 5-web_mandelbrot)

The default ports are:

  • 4-web_primes: Port 5554
  • 5-web_mandelbrot: Port 5555

To change, edit the app.run() call at the bottom of each server.py:

app.run(host='0.0.0.0', port=YOUR_PORT, debug=True, threaded=True)

Quick Start

  1. Clone the repo
  2. Configure values as described above
  3. Install dependencies: pip install -r requirements.txt (in relevant project folder)
  4. Run the project — see each project's README for specific instructions

License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published