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

Supervision Trees #4

Open
2 tasks done
tpunt opened this issue Mar 3, 2018 · 1 comment
Open
2 tasks done

Supervision Trees #4

tpunt opened this issue Mar 3, 2018 · 1 comment

Comments

@tpunt
Copy link
Owner

tpunt commented Mar 3, 2018

Work on supervision trees has begun in the supervision-trees branch. The API I currently have in mind looks as follows:

final class Supervisor
{
    public const ONE_FOR_ONE = 0;

    public function __construct(ActorRef|string $supervisor[, int $strategy]);

    // Add a pre-existing actor to the group of supervised workers
    public function addWorker(ActorRef|string $worker) : void;

    // Creates a new actor, links it to the supervisor, and return its actor reference
    // This should be used if the actor's constructor may throw an exception
    public function newWorker(string $actorClass[, array $ctorArgs[, string $actorName]]) : ActorRef;
}

To do list:

  • Prevent the supervision tree from containing cycles
  • Work out what the semantics should be for a crashing supervisor
@tpunt
Copy link
Owner Author

tpunt commented Mar 15, 2018

The basic implementation from the supervision-trees branch has been merged. I'm leaving this issue open because there is still much work to be done on the supervision trees feature.

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

No branches or pull requests

1 participant