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

start of the pubsub proposal #259

Closed
wants to merge 3 commits into from

Conversation

danbugs
Copy link
Collaborator

@danbugs danbugs commented Nov 25, 2022

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]

@danbugs danbugs added the 📐 proposal A concept/proposition, no design work has been done yet label Nov 25, 2022
@danbugs danbugs added this to the End of Year Milestone milestone Nov 25, 2022
@danbugs danbugs requested review from devigned and Mossaka November 25, 2022 00:48
Signed-off-by: danbugs <[email protected]>
Copy link
Member

@Mossaka Mossaka left a 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.

proposals/pubsub-mq-interfaces-proposal.md Outdated Show resolved Hide resolved
proposals/pubsub-mq-interfaces-proposal.md Show resolved Hide resolved
proposals/pubsub-mq-interfaces-proposal.md Show resolved Hide resolved
proposals/pubsub-mq-interfaces-proposal.md Show resolved Hide resolved
static open: func(name: string) -> expected<pubsub, error>

// unsubscribes from a channel
unsubscribe: func(location: channel) -> expected<unit, error>
Copy link
Member

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?

Copy link
Collaborator Author

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?

proposals/pubsub-mq-interfaces-proposal.md Show resolved Hide resolved
proposals/pubsub-mq-interfaces-proposal.md Show resolved Hide resolved
[capability.configs]
MOSQUITTO_HOST = "localhost"
MOSQUITTO_PORT = "1884"
SUBSCRIBE_TO = "my-subscription"
Copy link
Member

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?

Copy link
Collaborator Author

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.

@danbugs
Copy link
Collaborator Author

danbugs commented Dec 5, 2022

The concluded interface (i.e., from wasi-messaging) very closely resembles the already existing one — w/ the only differences being:
(1) the change from payload to event, and
(2) creation of the channel type to unify the mq, and pubsub capabilities.

... so I'm closing this issue, and will get to work on the implementation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📐 proposal A concept/proposition, no design work has been done yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants