Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Support multiple actor systems #18

Open
jodal opened this Issue · 1 comment

2 participants

@jodal
Owner

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

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
Something went wrong with that request. Please try again.