You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
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.
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
The text was updated successfully, but these errors were encountered:
Problem
In order to notify mounted protocols of new messages,
wakunode2
makes use ofsubscriptions
- an extendable map of protocol strings to handlers. This is used, for example, to notify thestore
of new messages or to check if a message match any registeredfilters
.This pattern works, but is unnecessarily confusing for two reasons:
notify
on mounted protocols without having them register a handler in a separate map.subscription
, which is also used to refer to topic subscriptions in the PubSub model.Acceptance criteria
The text was updated successfully, but these errors were encountered: