Skip to content

Revisit UX for singleton #396

@yim-lee

Description

@yim-lee

Right now singletons are registered during system setup:

let system = ActorSystem("test") { settings in
    settings += ActorSingleton("greeter", greeterBehavior)
}

But the shortcomings of this design becomes apparent rather quickly.

  1. Users might end up copy/pasting the same logic in tests, which is annoying
  2. It leads to disconnection between singleton and non-singleton actors

We should consider the other approach where settings contains just the flag to enable the plugin and allow users to spawn singletons anywhere.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions