开发者

Redis _changes feed?

开发者 https://www.devze.com 2023-02-06 09:12 出处:网络
In Redis is there a feature roug开发者_如何学运维hly equivalent to the _changes feed feature in CouchDB?You could probably build similar functionality using Redis\'s PUBSUB features. Of course this is

In Redis is there a feature roug开发者_如何学运维hly equivalent to the _changes feed feature in CouchDB?


You could probably build similar functionality using Redis's PUBSUB features. Of course this is more work, but it may be worth looking into.

The redis documentation on pubsub:

http://redis.io/topics/pubsub


If that function shows a feed of updated documents, then no, there is no current equivalent function in Redis.


Using PUBSUB as xer0x suggested would only be roughly similar (but definitely good enough for typical server-push situation). Even if you fired an event for every possible change in Redis, clients still would not be able to disconnect, and then get all of the events since the last one received on reconnect. The way I would to it is I'd use a sorted set containing all of the changes and only use PUBSUB to notify clients about changes in that list.

0

精彩评论

暂无评论...
验证码 换一张
取 消