Why does Redis, a datastore, have Pub/Sub features? My first thought is that it's the wrong layer to implement such a thing. But maybe I need to think outside the box.
Asked
Active
Viewed 4,298 times
28
-
I'll happily +1 this question if you remove the last sentence. :-) – John Parker Feb 08 '11 at 21:16
-
haha-- well, I want to keep an open mind. Maybe before databases had fulltext indexing people thought the idea of including it was silly, but now it makes perfect sense for most types of data. – John Bachir Feb 08 '11 at 21:18
-
1"But maybe I need to keep an open mind" is in fact a significant improvement to the current sentence. :-) – John Parker Feb 08 '11 at 21:19
-
1Not sure I follow. I see the concept "thinking outside the box" as being a subset of the concept "keeping an open mind", in particular it's appropriate for use in the context of discussing the design of a system (the purpose/scope of the system being "the box"). – John Bachir Feb 09 '11 at 16:25
2 Answers
17
Redis is defined as data structure server. Redis provides multiple functionality like memcache, queue, pubsub etc. This is very useful for a cloudapp/webstack where 3 components RabbitMQ(queuing) + XMPP(pubsub) + Memcache can be currently replaced with redis. Queuing is not as feature rich as RabbitMQ though.

Anoop
- 1,757
- 1
- 19
- 24
6
That would be true if it was about feeds for end users to subscribe to. Actually it's closer to the concept of events or database triggers - a process that knows the internals of the datastore keeps a connection open and does something when a change happens.

Tom Clarkson
- 16,074
- 2
- 43
- 51
-
I've used Pub/Sub in Redis. Is there a way in Redis to create a 'hook' on a particular hash so that if a hash changes, I get a callback? – Manu Manjunath Nov 06 '13 at 09:34