Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pubsub: Filter messages on the sender side #74

Open
gdamore opened this issue Oct 25, 2014 · 1 comment
Open

pubsub: Filter messages on the sender side #74

gdamore opened this issue Oct 25, 2014 · 1 comment

Comments

@gdamore
Copy link
Contributor

gdamore commented Oct 25, 2014

Originally: https://bitbucket.org/gdamore/mangos/issue/18/pubsub-filter-messages-on-the-sender-side

Ondrej Kupka created an issue 2014-04-27
Just checked the source code for pubsub out of curiosity and as far as I understand it, the messages are filtered on the receiver side. If that is true, I would propose to use something like go-patricia (radix tree written in Go) to filter messages on the sender side.
Actually I am the one who wrote go-patricia, needed message filtering as well :-)
Regards, Ondrej Kupka
Comments (4)
Garrett D'Amore
This is an interesting idea; but note that sender filtering is not part of nanomsg itself. So we'd need to have some new protocol exchange for the subscriber to tell the publisher what it wants. I propose that this could be done using a simple message format along the lines of + to add a sub, - to remove a sub, and no notification from the publisher. (The subscriber would intrinsically know.) I'll discuss this on the mailing list.
Edit Mark as spam Delete 2014-05-03
Ondrej Kupka
Sure. Hmm, I thought that nanomsg is doing sender-side filtering...
Mark as spam Delete 2014-05-03
Ondrej Kupka
It is true that this complicates things, of course. You need to handle subscriptions, you need to clean them up when the subscriber is not there any more etc. But in any case I guess that you could use something else than just a list of subscriptions in mangos, perhaps this trie. But that is also questionable, I am wondering how many subscriptions you would have to manage for the subscriptions list to become a bottleneck...
Mark as spam Delete 2014-05-03
Garrett D'Amore
I sent a message to the mailing list detailing my thoughts on this. There are some non-trivial challenges. The biggest problem is ensuring that you handle subscription requests reliably -- you cannot simply have a best-effort solution like we have today.

Basically, until we get a standard protocol for this in nanomsg, we can't do this. We could invent a protocol or pattern only for our use, but that seems of limited value.

@gdamore
Copy link
Contributor Author

gdamore commented Oct 19, 2018

This won't happen in mangos v1 for sure. Maybe in mangos v2, but only if we get a portable design for this. I have some ideas but haven't had time to write it up.

@gdamore gdamore transferred this issue from nanomsg/mangos-v1 Nov 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant