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

Worker pool API? #66

Open
goodboy opened this issue Mar 10, 2019 · 1 comment
Open

Worker pool API? #66

goodboy opened this issue Mar 10, 2019 · 1 comment
Labels
docs enhancement New feature or request help wanted Extra attention is needed question Further information is requested

Comments

@goodboy
Copy link
Owner

goodboy commented Mar 10, 2019

@parity3 made a gitter request for a system to delegate work to an actor/task cluster or pool.

for my use case, I've got multiple "clients" that wish to use the same
set of workers, coming in at sporadic times. So they'd need to connect
to a running arbiter, and the arbiter needs to make sure that some
workers are free before starting on the client-specified set of task
chunks (as a method of resource manageement). It'd be nice to see an
example for that use case, or more built in api support for such case.

And with a little follow up requirement:

also, it's not clear to me how best to implement a pattern where actors
are all notified that there are no more unclaimed tasks of a set (for
the actors that were involved with the task set). It would be nice for
such actors to be notified so they can "wrap up" any transient data
associated with the tasks they performed, aggregate / summarize it, and
send it back to the client

That last part will probably be to do with a lack of docs on how actor cancellation can be done using one of ActorNursery.cancel(), Portal.cancel_actor() or a plain old trio.CancelScope.

This worker pool is something I've though about a bit and it reminded me of a couple projects:

More discussion and brainstorming is greatly welcome!

@goodboy goodboy added enhancement New feature or request help wanted Extra attention is needed question Further information is requested docs labels Mar 10, 2019
@goodboy goodboy changed the title Worker pool super-system? Worker pool API? Mar 10, 2019
@goodboy
Copy link
Owner Author

goodboy commented Dec 10, 2020

A much delayed follow up: we'll probably start with an example in the README / docs (#163) and add a more extensive tutorial surrounding this later on.

In terms of an API being incorporated into tractor itself I'd like to see a slew of implementations before getting to set on anything.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs enhancement New feature or request help wanted Extra attention is needed question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant