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

Implement prioritized channels #8

Open
sandreim opened this issue Oct 3, 2022 · 1 comment
Open

Implement prioritized channels #8

sandreim opened this issue Oct 3, 2022 · 1 comment
Assignees

Comments

@sandreim
Copy link
Collaborator

sandreim commented Oct 3, 2022

Quoting from Polkadot issue paritytech/polkadot-sdk#824:

Extend the metered::* types to have send::<Priority = Standard> generic argument which can either be Droppable, Low, Standard, High (not an enum!, all marker types).

Pros:

  • allow a more nuanced handling of messages
  • keep the semantics simple

Cons:

  • Complexity:
    • Will require more logic around sending
    • Requires multiple channels per subsystem
@vstakhov
Copy link
Contributor

We actually don't need Droppable/Low priorities as we have try_send method. So I would propose to implement just High priority channel and configure it per-subsystem consumer. In this case we will allow each consumer to define if it should have any high priority messages or not (and the size of that priority queue as well).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants