Add monitor support #15

wants to merge 1 commit into


None yet

2 participants



This commit adds support for the streaming 'monitor' command. A few things to note:

  1. I generalized 'open-channel' to something like 'open-stream' - since both monitoring and subscribing to channels need to open a connection that listens for an unbounded list of responses and pass them to their corresponding callback functions. This uses a multi-method 'stream-record' to build the record based on the type (:monitor or :channel).
  2. I tried renaming "RedisChannel" to "RedisStream" and implementing the monitor and pub/sub protocols, but having one record that represented both a pub/sub metaphor (where you can add and remove subscriptions) and a monitor metaphor (where you can start and stop the monitor) made interaction with the record more confusing. I chose to break these concepts apart instead.
  3. I renamed "IRedisChannel" to "IRedisClosable" since both a monitor and channel record should implement close functionality.

Feedback is much appreciated, thanks!



Some notes from our discussion:

  • Push the polymorphism up into the protocols
  • Genericise the receive/open semantics
  • Docstrings/Documentation for the marginalia docs
@abedra abedra closed this Oct 12, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment