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

Watch WICG Scheduling API proposal #6525

Open
benlesh opened this issue Jul 15, 2021 · 3 comments
Open

Watch WICG Scheduling API proposal #6525

benlesh opened this issue Jul 15, 2021 · 3 comments
Assignees

Comments

@benlesh
Copy link
Member

benlesh commented Jul 15, 2021

The proposal can be found here:

https://github.com/WICG/scheduling-apis

I think this may be a viable future for replacing our schedulers with something vastly more useful and flexible, and (even better) integrated into the platform.

There are so many interesting bits here. In particular I think the TaskController is of particular interest to us, as it has a signal property that can mirror the behavior of AbortSignal, and it has the ability to setPriority for all posted tasks. On such priority includes immediate, which seems to ensure it will happen before everything else, which might make a reasonable replacement for QueueScheduler.

This proposal has already shipped behind a flag in Chrome. No idea (at the moment, I'll need to read more) if it will have an analog of any sort in Node.

Additional reading on the API design is here:

https://docs.google.com/document/d/1xU7HyNsEsbXhTgt0ZnXDbeSXm5-m5FzkLJAT6LTizEI/edit#

cc @shaseley (who I think is the primary author of the proposal)

@benlesh benlesh self-assigned this Jul 15, 2021
@benlesh benlesh added the AGENDA ITEM Flagged for discussion at core team meetings label Jul 15, 2021
@shaseley
Copy link

Yep, I'm driving this project. A little more info:

  • That doc you linked was the first iteration of postTask(), so it's now a bit outdated. The most up-to-date info for scheduler.postTask() is the explainer (and optionally spec).
  • We're aiming to ship postTask() soon, hopefully in Chrome M94
  • postTask() is the first thing we want to ship, but have plans to do more in the broader scheduling space
  • There was some preliminary discussion on plans for adding this to Node here

As I mentioned here, we'd be interested to hear more about your use cases. We do want the scheduler to be something we evolve over time to cover more use cases. Maybe it would make sense to have a higher-bandwidth conversation? I'm always interested to hear about how frameworks are thinking about scheduling.

@benlesh benlesh removed the AGENDA ITEM Flagged for discussion at core team meetings label Aug 25, 2021
@benlesh
Copy link
Member Author

benlesh commented Feb 11, 2022

@vdawg-git
Copy link

Can you add a banner for the proposal to the docs?
This needs to get upvoted, it's so cool

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