-
Notifications
You must be signed in to change notification settings - Fork 188
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
Global Validators #58
Comments
I don't think the validator should pick which topics it validates. I think we should register a validator for a given topic (or set of topics). |
What do we gain by having Validators select the topic they validate? |
For one, multiple subscribers (i.e., pubsub as a service). Otherwise, if
we have two subscribers, one will fail to register its validator. I'd
expect validators to work like DHT record validators (you register your
validators up-front).
Also, garbage collection. If I register a validator for each individual
topic, I can't garbage collect them even if I unsubscribe.
|
I don't understand why that's different from the per-topic validator implementation.
That would still be true with global validators. |
Per discussion on irc, the big gain from global validators would be validator classes. |
I've been trying to use validators in IPNS over pubsub and this issue is making it very difficult to do so reliably. At the moment, I can:
(and none of these options work in the presence of multiple subscribers) |
I've been talking with @Stebalien about this a bit in the context of #184, which has necessitated that we take another look at the PubSub interfaces. There's a current proposal to shift from PubSub functions like One issue that's come up in the new interfaces is how to deal with Validators and generally if there should exist one shared @raulk @Stebalien @vyzo Any thoughts you have on this (or the #184 PR in general) would be very helpful. |
I've created a new issue (#198) to discuss this as it's a bit off topic here. I've also tried to fill in the background a bit so anyone joining the discussion can better understand the proposal and motivation. |
TODO in #55.
Instead of registering per-topic validators as we do in #55, validators should decide whether or not they care about a topic when we first subscribe to it. E.g.,
The text was updated successfully, but these errors were encountered: