A simple task-queue-like implementation with a HTTP server.
Contrary to dask-distributed-like systems workers connect to the HTTP server and fetch work continously until nothing is left. The server does not keep track of worker nor does the server push tasks onto them. This should reduce a lot of networking overhead.
Tasks are pickled with cloudpickle and distributed as messages. The server internally holds a queue of those tasks and allows workers to fetch them in FIFO manner.
The HTTP server can be viewed as a very simplified message queue (like RabbitMQ).
- start a redis server that listens at
redis://localhost:6379(or configure viaHQ_REDIS_URLenv variable), e.g.:
redis-server --port 6379- start the queue server with
bun:
bun run typescript/server.ts- submit some tasks with
uv:
uv run example/simple/client.py- start a worker to consume those tasks with
uv:
uv run example/simple/worker.pyOnce all tasks are finished redis, the server and the worker(s) can be shut down with ctrl+c.