https://github.com/mangalaman93/pstickle
Publish Subscribe System using ZMQ
https://github.com/mangalaman93/pstickle
pubsub zmq
Last synced: 2 months ago
JSON representation
Publish Subscribe System using ZMQ
- Host: GitHub
- URL: https://github.com/mangalaman93/pstickle
- Owner: mangalaman93
- License: mit
- Created: 2017-03-18T14:32:43.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-03-21T14:41:32.000Z (over 9 years ago)
- Last Synced: 2025-12-25T19:12:58.545Z (6 months ago)
- Topics: pubsub, zmq
- Language: Python
- Size: 48.8 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# pstickle
Publish Subscribe System using ZMQ
# How to Run
```
$ ./main.py
```
# System Architecture
## System Components
`pstickle` consists of 5 components (drops) as shown in the following figure:

## Flow of messages
Messages are passed around using an intermediary `proxy`. It implements
ZMQ `XPUB` and `XSUB` sockets which can be connected from publishers and
subscribers. First, all subscribers send their respective subscriptions
to the proxy. Proxy then, relays all the subscriptions to all the
publishers. Publishers filter messages based on the received subscription
and forwards them to correct subscribers through the proxy. Here, proxy
allows us to dynamically add and remove publishers and subsribers to/form
the system.
Following figure shows the flow of messages in the system:

## How to add new drops (components)
Simply modify `main.py` and add more drops using the `Drop` class.
## Limitations
* `main.py` only runs on localhost
* Doesn't stop cleanly on `ctrl+c`
* Subscribers do not receive messages until the subscription has been completely processed by the publishers which can result in loss of messages