distributed task distribution framework
Project description
Fleet
Fleet is a generic distributed task distribution framework based on a distributed file system. Task distribution frameworks like Ray and Celery require network connections for communication, which makes them difficult to use in clusters with poor network conditions. Fleet is a distributed framework based on a shared file system, independent of any network communication, allowing for task distribution among nodes without any network connections.
Features
- Distributed task distribution based on a shared file system
- Supports dynamic scaling
- Supports worker node heartbeat
- Supports manager node restart
- Supports set timeout for each task
- Supports set max_job and max_work_time for worker
- Pure Python implementation
Install
pip install open-fleet
Usage
See more examples in ./examples.
# run_manager.py
from fleet.manager import Manager
from fleet.config.config import get_args
base_dir = "./share_dir"
def main():
job_list = [1,2,3,4]
args = get_args(f"--base_dir {base_dir}")
manager = Manager(args=args, job_list=job_list)
manager.run()
if __name__ == '__main__':
main()
# run_worker.py
from fleet.worker import Worker
from fleet.config.config import get_args
from run_manager import base_dir
def add_one(x, info):
return {"status": "success", "result": x + 1}
def main():
args = get_args(f"--base_dir {base_dir}")
worker = Worker(args=args, job_func=add_one)
worker.run()
if __name__ == '__main__':
main()
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
open_fleet-0.0.6.tar.gz
(15.1 kB
view details)
Built Distribution
File details
Details for the file open_fleet-0.0.6.tar.gz
.
File metadata
- Download URL: open_fleet-0.0.6.tar.gz
- Upload date:
- Size: 15.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a87f3fe5d5e07d3b631b7743d84e7c7dc9cacb5b24bbbb630dc92ad59ec4f653 |
|
MD5 | ea1670bd9f2223b60295d7fe689b66ca |
|
BLAKE2b-256 | f80e7a894b1992b7ee9c8d236a3256c9872ad46cf08193361bd124a26f7c2ab8 |
File details
Details for the file open_fleet-0.0.6-py3-none-any.whl
.
File metadata
- Download URL: open_fleet-0.0.6-py3-none-any.whl
- Upload date:
- Size: 15.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b352b56b416f0430add461be45b5b3a521ba65acd50d32d70d3f5ba1105eeeaf |
|
MD5 | 050e8780206437c442e67f9cf772453f |
|
BLAKE2b-256 | 69e6960c51bfa05b0e7d9c454c24f3bcf60cef42024090ade769cb7327f5955d |