-
Notifications
You must be signed in to change notification settings - Fork 6
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
Add type to Broker
's _actor_infos
#205
Conversation
I'm going to sneak 275d37d in here. (So I do not need to hand in another pull-request after this one with an updated signature :) ) I think it would also be good to expose the actor infos directly, since otherwise it would be hard for the API to find out which actors are actually available. |
Same here, fixed the conflict. |
Hey :) so, we recently conducted a redesign of the Actor methodology. The regular Actor, which can also be seen in the example in the readme, now simply accepts a Signal. We think most Actor behaviors can be expressed this way. If not, the ActorBase ABC is to be sublcassed (Actor is also just an ActorBase implementation). Because we expect most Actors to be of this new type, I don't think adding a type to all actor infos/states is a common use case. For your usecase: Can you add the type to the actor state? (There will also be a new PR making this process a bit easier for the regular Actor, instead of overwriting the whole function that is)
|
Hey :) I mainly used the type to be able to differentiate vessim's Like I said, a
Right, that's not a bad feature actually. Then, my argument for adding the I'd say you can close this PR and #203 then, since they are not relevant to the current vessim version anymore. From the point of developing a custom API it would be nice to easily tell what kind of actor state one is dealing with, but I'm not sure is a good built-in solution for this with the new actor system.
Thanks :) |
This is one of the solutions I suggested - fixes #203.
I'm not sure it is the solution that is the best, because it changes the interface of the broker again. But it stores the type directly with the state, which I think is nice.
I don't mind another solution being added instead of this one though!