[zeromq-dev] PUB/SUB protocol (a strawman)

Brad LaFountain blafountain at gmail.com
Wed Aug 31 16:22:17 CEST 2011


What is the SP mailing list. I would be interested in seeing this logic in
zeromq. As it stands i feel pub/sub filtering is pretty worthless. For my
application I've re-implemented a pub sub using dealers, routers
and subscriptions.

 - brad

On Wed, Aug 31, 2011 at 7:39 AM, Martin Sustrik <sustrik at 250bpm.com> wrote:

> Sorry, this should have gone to SP mailing list :)
>
> Martin
>
> On 08/31/2011 01:38 PM, Martin Sustrik wrote:
> > Hi all,
> >
> > This is a strawman for how protocol for PUB/SUB pattern could possibly
> > look like:
> >
> > The PUB/SUB protocol is built on top of the underlying of SP framing
> > layer (see SP framing I-D).
> >
> > The PUB/SUB topology is assumed to form a tree. Each node except the
> > publisher is connected to exactly one "upstream" node. Every node is
> > connected to 0..N "downstream" nodes.
> >
> > There are "messages" flowing downstream and "subscription commands"
> > flowing upstream (if possible).
> >
> > "Messages" have no SP-specific fields. They are composed entirely of the
> > opaque payload defined on the application layer.
> >
> > "Subscription commands" look like this:
> >
> > +--------+---------+-------+
> > | cmd-id | algo-id | query |
> > +--------+---------+-------+
> >
> > cmd-id is a 16-bit network byte order unsigned integer specifying the
> > action to take. There are two defined values for this field:
> >
> > 1 - subscribe
> > 2 - unsubscribe
> >
> > algo-id is a 16-bit network byte order unsigned integer that specifies
> > the algorithm to use for subscription matching. The values for this
> > field are managed by IANA. Possible values are: prefix matching, regexp,
> > x-path query, SQL-like selector etc.
> >
> > query is an arbitrarily large field, spanning from the end of algo-id
> > field to the end of the payload. The value of this field is interpreted
> > by the algorithm specified by algo-id.
> >
> > Thoughts?
> > Martin
> > _______________________________________________
> > zeromq-dev mailing list
> > zeromq-dev at lists.zeromq.org
> > http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20110831/9abe6f24/attachment.htm>


More information about the zeromq-dev mailing list