Skip to content

[Feature Request] Add a global worker registry #605

@antlai-temporal

Description

@antlai-temporal

Is your feature request related to a problem? Please describe.

In order to enable Eager Workflow Start we need to find compatible workers that are associated with the current core instance. This feature will provide an internal interface that given a (namespace, task_queue_name) pair provides a list of suitable workers.

Describe the solution you'd like

WorkerRegistry is a singleton object that is lazily initialized and protected by a RwLock. Workers register at creation time (Worker.new_with_pollers()) and unregister during shutdown (Worker.initiate_shutdown()).

The main consumer of the query interface is the client, and since we don't want the client crate to depend on other internal crates,
we use dependency injection with a trait defined by the client.

Additional context

This is just a stepping stone towards enabling Eager Workflow Start for core-based languages

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions