pub-sub based simple message push system.
- pub-sub #admin publisher
- pub-sub #channel_name publisher
- pub-sub #admin subscriber
- pub-sub #channel_name subscriber
used for chat group administration
- create/dele channel
- join/leave to/from channel
used for chat messages for each channel
start a redis-server
$ redis-server &
$ python sub_admin.py
sub_chat.py is dynamically forked from sub_admin.py.
$ python pub.py --create channel
$ python pub.py --remove channel
$ python pub.py --join channel user
$ python pub.py --leave channel user
$ python pub.py --speak channel message
db_name = 5 is used.
- type : set
- key : channel
- value : {channel_name, channel_name, ...}
- type : set
- key : user:channel_name
- value : {user_name, user_name, ...}
- type : hash
- key : process
- value : {channel_name : pid, channel_name:pid, ...}