Publisher Side Message Filtering

Summary

The current state of message filtering in the PUB/SUB topology relies on Subscriber side filtering of messages. The goal of this topic is to address this inefficiency, specifically the sending of unwanted messages, and determine the best path to a solution(s). At the bottom there is a list of posts to the mailing list regarding this topic.

The most straight forward way to address this may be to simply collect use cases. At least this will provide a simple test for proposed solutions, ie does this solution solve all of these use cases.

Use Cases

Example Use Case: Market Data Quote Server
Topology of this case is a simple Server-Client. One server distributes market data to 5-50 clients each subscribed to 10-1000 topics. Number of topics essentially equals the number of symbols, ie for US equities and equity options ~ 450k with up to 500k msg/sec. The number of clients and subscriptions are just made up to make the case more concrete, but the number of symbols and rate of messages correspond to real market data. One of the interesting things about this case is that while PUB side message filtering at least makes this possible with 0MQ, the implementation I am used to follows an Observer pattern. So there is no filtering required, every topic/symbol has a list of subscribers. Message filtering efficiency will obviously be important, which has been addressed here:

http://www.zeromq.org/whitepapers:message-matching

Questions

  1. Should the PUB/SUB topology be simply changed to use PUB side filtering or is it better to have multiple types of PUB/SUB topologies? Is PUB side filtering simply inefficient and to be replaced or are there cases where it is preferred, if only because the inefficiencies in some cases are so small that the simplicity of the current implementation is more important?
  2. How does PUB side filtering compare to using an Observer pattern where every topic has a list of subscribers/listeners?

Mail List Related Posts:

publisher side filtering
http://lists.zeromq.org/pipermail/zeromq-dev/2010-June/004194.html
Wed Jun 30 02:54:25 CEST 2010

Pubsub: matching on the publisher end on TCP sockets
http://lists.zeromq.org/pipermail/zeromq-dev/2010-July/004705.html
Wed Jul 28 18:43:53 CEST 2010

Pub/Sub for data distribution
http://lists.zeromq.org/pipermail/zeromq-dev/2010-August/004967.html
Sun Aug 8 17:42:06 CEST 2010

pub/sub topic matching on sender side
http://lists.zeromq.org/pipermail/zeromq-dev/2010-August/005023.html
Tue Aug 10 11:07:24 CEST 2010

PUB-SUB filtering question
http://lists.zeromq.org/pipermail/zeromq-dev/2010-August/005198.html
Fri Aug 13 17:57:48 CEST 2010

PUB-SUB scalability
http://lists.zeromq.org/pipermail/zeromq-dev/2010-August/005248.html
Mon Aug 16 16:44:48 CEST 2010

Publisher Side Filtering Revisited
http://lists.zeromq.org/pipermail/zeromq-dev/2010-August/005363.html
Wed Aug 18 18:20:57 CEST 2010

pub matcher again
http://lists.zeromq.org/pipermail/zeromq-dev/2010-August/005388.html
Fri Aug 20 18:47:49 CEST 2010

ZMQ_REQ/ZMQ_XREP - FSM = ZMQ_NODE/ZMQ_XNODE?
http://lists.zeromq.org/pipermail/zeromq-dev/2010-August/005389.html
Fri Aug 20 22:35:42 CEST 2010

Comments: 1

Add a New Comment