[nanomsg] Re: publisher side filtering

  • From: Martin Sustrik <sustrik@xxxxxxxxxx>
  • To: nanomsg@xxxxxxxxxxxxx
  • Date: Mon, 05 May 2014 07:21:10 +0200

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 04/05/14 18:33, Alex Elsayed wrote:

> I see another way of managing it - negate the semantics of
> subscription.
> 
> Instead of send-nothing-except-whitelist when the optimization is
> enabled, make it send-everything-except-blacklist. With that,
> subscribe messages _don't_ need to be reliable - you just send one
> when you get a message you don't want, since that indicates that
> the upstream didn't get it.
> 
> With the multiple-types-of-filters support, we could have positive
> and negative variants of each - send-only-with-prefix versus
> exclude-with- prefix, for example. That would keep the inversion
> from causing an explosion of subscriptions.
> 
> Since a reliable back-channel is no longer needed, all the
> blocking-up problems go away.

It's a clever twist of the problem, but I think it won't work.

The reason is that we want to add topics to the feed rather than
remove them. And reason for that in turn is that the publisher may
produce large amount of messages and if the subscriber subscribed for
the whole feed by default it could get overloaded by messages before
it's able to blacklist the unneeded topics.

If the blacklist is created ahead of the time and sent at the
connection establishment time to prevent the overload problem, then
you are back to the reliability problem: the subscription set must be
delivered to the publisher before the publishing even starts.

Martin


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJTZx/GAAoJENTpVjxCNN9YoD4H/1hr4JrmdjOli0H3egkNfpi6
0AonxbqgkFuyyZrl4ID5jnpISymcF+9YdBgUwCdiIxb7UbDZr9nWwOud2Gs0ye8F
qoRosgi02WixTjxjxY4AQuiC39/bbmV0gn54Iq1LmAmDMUGrpvCkr1Uk+xUdX2pm
dPYn/m8aNDXnsTjA9iV7wFrPJRPAQynEx5FEDVrPovCEm8MQ4HKOGaZIXjlKh4U7
9kWydTwCLFBX7Yo+A7750Xxs9aqxShr+VookrfC3vKeqQVkaBa0OZ+BwaR05EMdy
tbmppxUR5q7Gsm2FcfpS9syabRcpiM7gY38se2jyyuyc/tI3eAehZgvydFRH+kM=
=/jn4
-----END PGP SIGNATURE-----

Other related posts: