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

Support multiple actor systems #18

Open
jodal opened this issue Jan 16, 2013 · 1 comment
Open

Support multiple actor systems #18

jodal opened this issue Jan 16, 2013 · 1 comment

Comments

@jodal
Copy link
Owner

jodal commented Jan 16, 2013

I want to replace the global ActorRegistry with an "actor system" concept. You should be able to run multiple actor systems in the same process at the same time. Any actor lookups, like you today do using ActorRegistry, should only return results from the same actor system. Two actors in two different actor systems should under normal API usage not be able to get references to each other. In other words, an actor system should be isolated from other actor systems.

The use case here is mostly to get rid of the global state maintained by ActorRegistry, not to make it possible to have multiple actor systems in the same process. That's just a convenient side effect. Isolated actor systems will also be of great help in tests, and should make parallel test running possible since tests no longer share any global state.

Today's ActorRegistry API can maybe be kept around as a convenience wrapper around a default actor system.

@fatuhoku
Copy link

I think an actor system concept would also resolve #30 (cyclic initialisation).

  1. Register actors with an actor system (a bag)
  2. Once all participating actors have been initialised (i.e., they're ready to receive messages; even before their on_start() handlers have been called), the actor system would then call each actor's on_start() to execute once-off behaviour
  3. Be happy

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

2 participants