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

Simplify wakunode2 subscriptions model #574

Closed
1 task done
jm-clius opened this issue May 25, 2021 · 0 comments · Fixed by #662
Closed
1 task done

Simplify wakunode2 subscriptions model #574

jm-clius opened this issue May 25, 2021 · 0 comments · Fixed by #662
Assignees

Comments

@jm-clius
Copy link
Contributor

jm-clius commented May 25, 2021

Problem

In order to notify mounted protocols of new messages, wakunode2 makes use of subscriptions - an extendable map of protocol strings to handlers. This is used, for example, to notify the store of new messages or to check if a message match any registered filters.

This pattern works, but is unnecessarily confusing for two reasons:

  1. It is difficult to read and follow due to the indirection it introduces. It should be possible to simply call notify on mounted protocols without having them register a handler in a separate map.
  2. It overloads the idea of a subscription, which is also used to refer to topic subscriptions in the PubSub model.

Acceptance criteria

  • something that simplifies the above, is clear to read and doesn't overload terminology
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

Successfully merging a pull request may close this issue.

1 participant