-
Notifications
You must be signed in to change notification settings - Fork 212
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
How many uses of makeNotifierKit should use makeSubscriptionKit instead? #3784
Comments
Defenitely Notifiers on ERTP purses shoulde Subscriptions instead, specially on Zoe fee purses of running contract vats. The latter for fuel gauge alarm reasons alone. |
@Chris-Hibbert This needs an area label to get picked up the right Wed planning meeting. This looked like Core Economy, please change if that is not right. |
A general note is that notifiers should be used only to report states, not transitions. Thus dropping one update doesn't prevent getting the latest state update. To use notifiers to communicate events, the update for a |
or, if you are communicating events, use subscriptions rather than notifiers. If subscriptions are not better at events than notifiers, then subscriptions should either be fixed or retired. |
Hi @gibson042 , I just added you |
Outside of the notifier package, and test and demo directories, it looks like we have 34 calls to
makeNotifierKit
in agoric-sdk. With those same filters, we currently have 1 call tomakeSubscriptionKit
. This may or may not be a good split --- it depends on the semantics of the notifications being pushed. Fortunately, 35 is small enough to inspect. FromI suspect that some of these notifier uses really should be subscription uses. The example which made me aware of this is represented well by #3783 . The code it corrects happened to work with a notifier by accident. #3783 demonstrates how painless it is to convert code from using a notifier to using a subscription. Please take a look.
The text was updated successfully, but these errors were encountered: