-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME
41 lines (30 loc) · 1.4 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
Copyright Casey Beach 2012
ParthenonMQ- A very simple message queue server.
This applications is written solely in Python. It requires:
python twisted
redis
python redis interface
python-json
To Run:
In separate terminals (or hosts, it shouldn't matter) start the
msg_host.py, subscriber.py, and publisher.py. Publisher.py
accepts strings from the command line and sends them to
the message server, which sends them to all available
subscribers.
Description:
All messages are passed through a central server. I have been using
RabbitMQ for one of my projects so I am fairly familiar with this model.
Persistence is handled by requiring acknowledgements from subscribers,
and retrying the messages every two seconds. After 5 attempts the
messages are dropped.
I implemented a simple 'fanout' exchange. The main reason for this design
decision was ease of implementation. A good place to expand functionality
would be to add routing keys to the queue; i.e. subscribers will only get
the messages that they are interested in.
A downside to the strict fanout implementation is that it puts the pressure
of sorting the messages on the subscribers, and adds extra traffic to the
network.
I chose json to serialize my strings because it is implemented in a wide
variety of languages.
Partial persistence is handled with Redis, depending on how the Rredis server
is set up the queue may survive a full system crash.