A distributed computing framework for multi-machines over the network
Project description
Master-Worker Connection Manager Tutorial
This tutorial will guide you through setting up and using the Master-Worker Connection Manager system.
Prerequisites
- Python 3.x installed on all machines (master and workers)
- Network connectivity between the master and worker machines
Setup
-
Ensure all necessary files are in place:
connection_manager.py(contains the MasterManager class)- Any additional dependencies
-
Install required Python packages:
pip install socket threading sqlite3
Usage
Starting the Master Server
-
Create a Python script (e.g.,
run_master.py) with the following content:from connection_manager import MasterManager master = MasterManager() master.start_master_server(ip_address='0.0.0.0', port=5000, authorized_workers=['192.168.1.100', '192.168.1.101'])
-
Run the master server:
python run_master.pyThis will start the master server on all available network interfaces (0.0.0.0) on port 5000.
Connecting Workers
-
Ensure workers have the necessary client-side code to connect to the master.
-
Workers should send their local IP addresses to the master upon connection.
-
Only authorized workers (as specified in
authorized_workerslist) will be allowed to connect.
Features
- Authorization: The master server authorizes workers based on their IP addresses.
- Multi-threading: The server can handle multiple worker connections simultaneously.
- SQLite Database: Client IDs and specifications are stored in an SQLite database.
Troubleshooting
- If connections fail, check firewall settings and ensure the correct IP addresses and ports are being used.
- Verify that all workers' IP addresses are correctly listed in the
authorized_workerslist.
Extending the System
To add more functionality:
- Modify the
MasterManagerclass inconnection_manager.py. - Implement additional methods for task distribution, result collection, etc.
- Update the client-side code on workers to handle new features.
For more detailed information, refer to the comments in the connection_manager.py file.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file multipal-0.1.1.tar.gz.
File metadata
- Download URL: multipal-0.1.1.tar.gz
- Upload date:
- Size: 9.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
da55ab1b2519c8d14bdbd2bf0edb39922799babde4e5cdaa297f0af2e1a444f4
|
|
| MD5 |
2e7d622afd66a9473c27cfb125702b67
|
|
| BLAKE2b-256 |
5bc722a33e3fd463c7f779ccf6ea1f9a1b046054db8f81ac1bc5c63cc4f20ab5
|
File details
Details for the file multipal-0.1.1-py3-none-any.whl.
File metadata
- Download URL: multipal-0.1.1-py3-none-any.whl
- Upload date:
- Size: 10.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.10.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b3f09e9bb4d35706f0ef6173c249a09aa09a851f6f56a92da80fc37f690a70e8
|
|
| MD5 |
353f4f61ffc6a93b79000eaf7c241990
|
|
| BLAKE2b-256 |
6ffca8088b4214e0403631bcac6f28022b4171b72e916c3c4adbecfe3004570c
|