1 Sessions filtering and management port {#Sessions}
 
    6 Before this document, only publishers were discoverable via ZeroConf, and the
 
    7 announced information was weak for filtering for supported events and any other
 
    8 semantics. Also, subscribers always subscribed automatically to every discovered
 
    9 publisher which used the same schema.
 
   11 To overcome already applied workarounds and missing features for filtering,
 
   12 application-compatible subscriptions and user-controllable subscriptions, this
 
   13 document describes necessary changes to ZeroEQ.
 
   15 Use-cases are coupling of applications that belong to a certain user/session,
 
   16 not coupling all applications on the same network. User-interfaces for selection
 
   17 of applications that should connect to each other need more information for the
 
   18 user and for the system to perform filtering.
 
   22 * Introduction of Session: only publishers of the same session and compatible
 
   23   events are automatically subscribed in the subscriber. The default session
 
   24   name is the current username. It can be set to a different value at runtime
 
   25   with the ZEROEQ_SESSION environment variable. If the session name is
 
   26   empty/non-existant, no filtering is performed and automatic subscription to
 
   27   all discovered publishers happens.
 
   28 * Schemas in URIs are superseded by the session; user-specified schemas are
 
   29   ignored. Filtering is now done via sessions and compatible events. As a future
 
   30   use-case, the schema might control the transport for zmq (tcp, inproc, ...)
 
   31 * The ZeroConf record contains information about published/subscribed events,
 
   32   application name (derived automatically), username and session.
 
   33 * Vocabulary stores event type information from an associated publisher or
 
   34   subscriber. The vocabulary information can be requested (this class implements
 
   35   request-reply using the REQ-REP socket from zmq). One vocabulary is associated
 
   36   with exactly one publisher or with one subscriber.
 
   37 * Broker can handle explicit (un)subscriptions instructed by a remote
 
   40 # Changes for Publisher
 
   42 * ZeroConf/Servus service name is _zeroeq_pub._tcp
 
   43 * Schema is fixed, internal and ignored if specified
 
   44 * URI can contain hostname and port
 
   45 * ZeroConf announcement:
 
   46   * Instance name is hostname:port
 
   48     * vocabulary_request = zmq connection string
 
   49     * vocabulary = semi-colon separated list of published event UUIDs
 
   50     * session = <user-name> by default, env ZEROEQ_SESSION if specified
 
   52     * application = <application-name>
 
   53 * Published events must be registered in the publisher. Non-registered events
 
   54   cannot be published. (TBD: Published events are auto-registered).
 
   55 * Add (un)registerEvent()
 
   57 # Changes for Subscriber
 
   59 * ZeroConf/Servus service name is _zeroeq_sub._tcp
 
   60 * Schema is fixed, internal and ignored if specified
 
   61 * URI can contain hostname and port
 
   62 * Automatic subscription only via session (default session is username),
 
   63   otherwise explicit subscription via Broker.
 
   64 * ZeroConf announcement:
 
   65   * Instance name is a UUID to uniquely identify this subscriber
 
   67     * vocabulary_request = zmq connection string
 
   68     * vocabulary = semi-colon separated list of published event UUIDs
 
   69     * session = <user-name> by default, env ZEROEQ_SESSION if specified
 
   71     * application = <application-name>
 
   72 * Event registration for vocabulary happens in
 
   73   registerHandler/subscribe
 
   75 # Changes for Broker/Management port
 
   77 * Supports subscribe/unsubscribe requests for any remote application
 
   78   * Tell application to subscribe to an event of a publisher
 
   79 * List of current subscriptions (for NodeGraph UI for instance)
 
   81 # New class Vocabulary
 
   83 * Provides a request-reply for vocabulary information
 
   84 * Holds registered events from a publisher or subscriber