Skip to content

Commit

Permalink
Monitor spec
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefan Eilemann authored and Stefan Eilemann committed Jul 6, 2017
1 parent 40e042a commit c6fb523
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
34 changes: 34 additions & 0 deletions doc/feature/monitor.md
@@ -0,0 +1,34 @@
Subscription Monitor {#monitor}
============

To enable an application to republish all its state when a new subscriber
connected, we need a way to monitor connection requests. This RFC describes this
feature for this use case, based on zmq_socket_monitor.

## API

class Sender
{
virtual void* getSocket() = 0;
};

class Publisher : public Sender {};

class Monitor : public Receiver
{
Monitor( Sender& sender );
Monitor( Sender& sender, Receiver& shared );

virtual notifyNewConnection() {}
// other notifies and params lazy, on use case
};

## Examples

Livre Communicator derives from Monitor and republishes all events on notify.


## Implementation

Monitor installs zmq_socket_monitor() on Sender::getSocket(). Monitor::process()
calls Monitor::notifyNewConnection().
1 change: 1 addition & 0 deletions doc/feature/rfcs.md
Expand Up @@ -9,3 +9,4 @@ RFCs {#rfcs}
* @subpage restapi
* @subpage restapi
* @subpage reqrep
* @subpage monitor

0 comments on commit c6fb523

Please sign in to comment.