https://github.com/jayrbolton/zmq-ch4
ZeroMQ Chapter 4 Examples in Python
https://github.com/jayrbolton/zmq-ch4
python zeromq
Last synced: 2 months ago
JSON representation
ZeroMQ Chapter 4 Examples in Python
- Host: GitHub
- URL: https://github.com/jayrbolton/zmq-ch4
- Owner: jayrbolton
- Created: 2020-08-06T06:08:36.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2020-10-07T20:38:09.000Z (over 4 years ago)
- Last Synced: 2025-01-04T23:41:22.000Z (4 months ago)
- Topics: python, zeromq
- Language: Python
- Homepage: http://zguide.zeromq.org/php:chapter4
- Size: 11.7 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Reliable Request-Reply Patterns
Refactored Python code examples with comments based on the various patterns from the [ZeroMQ guide, chapter 4](http://zguide.zeromq.org/php:chapter4).
The patterns:
* [Lazy Pirate Pattern](/lazy_pirate): reliable request-reply from the client side
* [Simple Pirate Pattern](./simple_pirate): reliable request-reply using with multiple workers and load balancing
* [Paranoid Pirate Pattern](./paranoid_pirate): reliable request-reply with heartbeating of the workersTODO:
* [Majordomo](./majordomo): service-oriented reliable queueing
* [Titanic Pattern](titanic): disk-based/disconnected reliable queueing
* [Binary Star Pattern](binary-star): primary-backup server failover
* [Freelance Pattern](freelance): brokerless reliable request-replySet up dependencies with `pip install poetry && poetry install`.
Run any example with:
```py
poetry run python -m .run.py
```See the corresponding `README.md` files in each subdirectory.
From the docs:
> Of all the different patterns, the two that stand out for production use are the Majordomo pattern, for broker-based reliability, and the Freelance pattern, for brokerless reliability.