ZMQ-based framework for building simple Pub-Sub Systems, written in Python 3.
Project description
Branch |
Build Status |
Coverage |
Documentation |
---|---|---|---|
master |
|||
dev |
Hermes
ZMQ-based framework for building simple Pub-Sub Systems, written in Python 3.
It offers thread-based wrappers for zmq’s SUB and PUB sockets, a pre-configured proxy device and a Node class to pull it all together.
Hermes allows you to quickly build a cluster of publishers which can support arbitrary numbers of subscribers via single address.
Since the project was birthed with a financial use-case in mind, it supplies some basic data structures (called Message) to transport data via hermes. These are optional, but are used by other parts of our system to efficiently process incoming data streams.
Design
There as several basic components that interact in a hermes-based system: On the processing layer, we have:
the Node object, which may consist of any number of Receiver and Publisher objects.
the Proxy object, which aggregates data streams from several Node objects and allows subscribers to subscribe to them from a single address.
On the transport layer, we have:
the Envelope object, which is just a wrapper data structure to send around messages with some meta data attached (time stamp of creation, origin, topic, etc)
the Message object, which is usually sent by assigning it to an Envelope (although the usage of a Message object is optional - Envelope takes any kind of serializable data).
Motivation
Hermes is the base for our Crypto trading system, and allows us to set up new node clusters in a convenient and maintainable way, without our contributors having to worry too much about the inner workings of ZMQ.
Usage
install via pip install hermes-zmq and import with import hermes.
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
File details
Details for the file hermes-zmq-1.3.0.tar.gz
.
File metadata
- Download URL: hermes-zmq-1.3.0.tar.gz
- Upload date:
- Size: 8.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 97c43347aada818617ca5fa3ef8d5761a7cabeb6fb288762794a027ce9bf5feb |
|
MD5 | 1a7fe47bcf1e6f45ec0d510044a237c9 |
|
BLAKE2b-256 | fd86ce86a04575ad837b0ae95cb0c28de2ad163427847477ef41d96ccc57dbe9 |