Skip to content

Is there internal communication mechanism between application workers? #33

@oleksandr-lilak

Description

@oleksandr-lilak

Scenario:

  • Application serves WebSocket protocol
  • Clients subscribe to the WebSockets room/channel via sending message to API using metacom message schema. The incoming request is handling by worker W1. The logic was taken from this example
  • At some moment, domain logic initiates application.scheduler.add() that should invoke some task in 1 minute.
  • The scheduler task execution is launching on worker W2 (default application behaviour). The task should broadcast WebSocket message to all subscribed clients connected to the application.
  • Because the Room Map object is initiated in W1 worker (application logic by default), the W2 worker doesn't contain the Room Map object, and this is logical.
  • How we can implement that internal communication between application workers? So we can broadcast some messages/events from all application workers to some master worker, and then broadcast messages to all connected WebSocket clients?

Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions