-
Notifications
You must be signed in to change notification settings - Fork 12
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
Supervisor API #22
Comments
Worth a read is |
We had a brief discussion a while back slightly in regard to #190 (this comment) related apis. For supervisors I actually think we can make quite a nice api by just offering composed async context managers: async with tractor.open_nursery() as n:
async with tractor.supervise.one_for_one(n) as one_for_one_nursery:
await one_for_one_nursery.run_in_actor(blah) In 3.10 parentheses syntax this becomes: async with (
tractor.open_nursery() as n,
tractor.supervise.one_for_one(n) as one_for_one_nursery,
):
await one_for_one_nursery.run_in_actor(blah)
This has the benefit of being simple to implement:
Further questions:
|
I think the most compatible (though not fully convinced yet) api that we might want to adopt is the code block retrying. njs just proposed better native |
A nice short post from @catern affirming the supervisor at every layer design is the future of process management. |
I want to start design discussion on how to approach erlang-like supervisors including restart strategies and how this will interplay with a service discovery system and possibly real-time code replacement.
Some questions/comments I have:
what's the (semantic) difference between a
nursery
and asupervisor
?supervisor
be specific to managing (possibly distributed) processes in which case does having anursery
mean anything other then a special type of supervisor?asyncio
might be approaching nurseries/supervisorsan explicit distinction should be made between a
MainProcess
supervisor and thearbiter
actorArbiter
is per-host and is part of service discovery between hostshow do we best implement a distributed supervisor (one that spawns actors over multiple hosts)?
arbiter
who will then create or use a host-local nursery?what does a distributed process supervisor API look like?
arbiter
and service discovery system?how does an orchestration layer build on all this?
here's erlang's supervisor behaviors
Much more to come...
The text was updated successfully, but these errors were encountered: