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

Extensions vs Plugins #6011

Open
mrocklin opened this issue Mar 28, 2022 · 1 comment
Open

Extensions vs Plugins #6011

mrocklin opened this issue Mar 28, 2022 · 1 comment

Comments

@mrocklin
Copy link
Member

Currently we have two mechanisms to extend the scheduler and workers:

  1. Extensions: primarily used by Dask developers to modularize the scheduler and worker systems.
  2. Plugins: primarily used by Dask users to add new features to Dask from the user-side

Plugins contract

Plugins have an explicit contract and methods like transition, remove_worker, and so on. They are well defined.

Extension conventions

Extensions don't have such a contract but often do a few things by convention:

  1. Define some new handlers and inject those into the server's handlers
  2. Add themselves to server.extensions (although this is moved to a contract in Allow worker extensions to piggy-back on heartbeat #5957)

Well, that's pretty much it actually. In #5957 it's proposed to add a heartbeat mechanism .

Nothing here is set or required. Extensions are just classes that hang around. We don't really have any rules around them.

Open questions

  1. Should we try to merge these two so that there is only one extension mechanism?
  2. If not, should we try to formalize Extensions a little more?

This is low priority (I think). I'm raising this mostly to capture a conversation that was in a PR but didn't get resolved.

@mrocklin
Copy link
Member Author

My current gut reaction is that we should not try to merge plugins and extensions. I think that eventually we should try to formalize them a bit more, but that there isn't much pain around this right now, and so I personally view it as low priority.

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

1 participant