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

Messaging Improvement #348

Open
1 of 4 tasks
Tracked by #238
Mossaka opened this issue Mar 8, 2023 · 0 comments
Open
1 of 4 tasks
Tracked by #238

Messaging Improvement #348

Mossaka opened this issue Mar 8, 2023 · 0 comments
Assignees
Labels
⭐ epic A grouping of features or tasks 📐 proposal A concept/proposition, no design work has been done yet
Milestone

Comments

@Mossaka
Copy link
Member

Mossaka commented Mar 8, 2023

Had a hour-long chat with @danbugs to discuss areas of improvments for the messaging implementaitons, and we have identified a few action items that can immediate start working on to give a much better messaging experience.

Start a messaging client per thread

Currently all the messaging clients are included in a locked hashmap which limits the concurrency to only one client that can receive messages. This is obviously not going to be able to scale out. The solution to fix this is to create a client in its own thread in the host and the client thread will publish/receieve messages for that specific client.

open function will create a new client

Current implementation creates one client per subscription of a topic. This multiplies the number of connecitons for each running thread/process because if there are 10 consumers and each consumer subscribes to 10 topics, the number of clients being created are 10 * 10 = 100. Ideally, the number of clients should be equal to the number of consumers + producers. Thus, a client can subscribe to multiple topics.

To make that above happen, we will need to create a client in the level of open instead of subscribe.

Wildcard in resource namespaces

We should allow wildcard or "star" namespaces in slightfile so that users can declare as many consumer/producer as they want in the configuration file. This work needs a seperate issue and possibly a proposal to flesh out the details of the what it means to have star namespace for other capabilities like keyvalue. But from an initial discussion, we thought it would be useful for other capabiltiies to use a wildcard namespace as well.

Support competing consumers a.k.a queues

This is the MQ capability we had before but with the new messaging capability that merges the mq and pub/sub capabiltieis, we introduced a regression that we no longer have competing consumers. Further discussion and design proposal are probably needed to layout if the channel type could be helpful in distinguishing message queues and topics in slightfile.

I will a sub-task for each of the action items described above.

@Mossaka Mossaka added 📐 proposal A concept/proposition, no design work has been done yet ⭐ epic A grouping of features or tasks labels Mar 8, 2023
@Mossaka Mossaka added this to the February Milestone milestone Mar 8, 2023
@danbugs danbugs moved this to Backlog in Wasm Projects Mar 9, 2023
@danbugs danbugs moved this from Backlog to Todo in Wasm Projects Mar 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⭐ epic A grouping of features or tasks 📐 proposal A concept/proposition, no design work has been done yet
Projects
Status: Todo
Development

No branches or pull requests

2 participants