Some features to Pub/Sub

274 views
Skip to first unread message

Александр Лозовюк

unread,
Jul 5, 2010, 11:05:03 AM7/5/10
to redi...@googlegroups.com
Hi all,

After some weeks using Redis Pub/Sub in production and testing
enviropments, i thought, how can further improve this thing to
facilitate use in real-time messages system.

In main usage pattern - publisher publish, subscribers read messages,
and if nobody subscript, message is lost.
But - why dont do this:
- if no subscibers, messages are stored to list with timestamp (when
its added to queue)
- if subscriber connect with params TIMESTAMP, at first all messages
stored after this time, will be reposted to subscriber.
- if connect with TIMESTAMP = 0, only new, real time messages will be
posted to him.

This is memory-based persistent queue. Queue length is fixed for
channel and shared to all subscribers and may be expired.

Is there good idea? (I know, all this features i can emulate yourself
with list+pub/sub, but.... )

--
C уважением, Александр Лозовюк
Alpha-Beta-Release Blog
http://abrdev.com

Pieter Noordhuis

unread,
Jul 5, 2010, 11:32:58 AM7/5/10
to redi...@googlegroups.com
The point of Redis pub/sub is that is it lightweight. Not everybody
needs these features and because they *can* be implemented using
exising Redis primitives (the timestamp pattern you propose
beautifully fits the sorted set datastructure), they will never be
natively supported. However, if you plan to wrap this functionality
inside a client, please do share on the mailinglist.

Cheers,
Pieter

2010/7/5 Александр Лозовюк <aleks....@gmail.com>:

> --
> You received this message because you are subscribed to the Google Groups "Redis DB" group.
> To post to this group, send email to redi...@googlegroups.com.
> To unsubscribe from this group, send email to redis-db+u...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/redis-db?hl=en.
>
>

Reply all
Reply to author
Forward
0 new messages