-
Notifications
You must be signed in to change notification settings - Fork 30
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
start of the pubsub proposal #259
Conversation
Signed-off-by: danbugs <[email protected]>
Signed-off-by: danbugs <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The first draft looks decent to me! Left some comments / questions on some design choices and pubsub concepts.
static open: func(name: string) -> expected<pubsub, error> | ||
|
||
// unsubscribes from a channel | ||
unsubscribe: func(location: channel) -> expected<unit, error> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we really need this method?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Considering subscriptions are handled by the runtime, I figured it would be a good idea to, at least, be able to unsubscribe - What are your thoughts?
[capability.configs] | ||
MOSQUITTO_HOST = "localhost" | ||
MOSQUITTO_PORT = "1884" | ||
SUBSCRIBE_TO = "my-subscription" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we combine both pub and sub, does it mean that users who want to use publisher only are forced to open a subscriber as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It depends on the crate implementation ~ for Mosquitto, there's only one client open at any time per Wasm module.
Signed-off-by: danbugs <[email protected]>
The concluded interface (i.e., from ... so I'm closing this issue, and will get to work on the implementation. |
This is part of #247 and is addressing #249
You can see the rendered version of the file: here.
Signed-off-by: danbugs [email protected]