Skip to content

Add a DispatchBroadcastingActor #291

@leandro-lucarella-frequenz

Description

What's needed?

We need an actor that is in charge of abstracting the access to the dispatch API for receiving dispatches, and that can act as a local cache for dispatches, so if the connection to the dispatch API is lost other actors can still get whatever contents could be fetched in the past.

Proposed solution

Add a DispatchBroadcastingActor that will poll the dispatch API and save currently active dispatches (start time in the present or future) and broadcast them, so it can reach other actors.

When an actor first subscribe to the dispatch channel, they will get the whole list of active dispatches and then when new dispatches are found in the dispatch API, they will be sent to the channel too.

This could be done in a class or actor, but an actor is preferred because we only need one cache for a whole microgrid location, not one per process/controller.

Use cases

No response

Alternatives and workarounds

No response

Additional context

  • Dispatch architecture with diagram.

  • We have an internal actor, we can start moving this actor to the SDK or build it from scratch depending on how much will change with the dispatch API client.

Metadata

Metadata

Assignees

No one assigned

    Labels

    part:dispatchAffects the interactions with the dispatch APIresolution:invalidThis doesn't seem rightstatus:blockedOther issues must be resolved before this can be worked ontype:enhancementNew feature or enhancement visitble to users

    Type

    No type

    Projects

    Status

    Done

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions