Skip to content
This repository has been archived by the owner on Aug 26, 2022. It is now read-only.

SideEffects as Broadcast #122

Open
sleipnir opened this issue Feb 25, 2022 · 0 comments
Open

SideEffects as Broadcast #122

sleipnir opened this issue Feb 25, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@sleipnir
Copy link
Member

Today by the Cloudstate protocol you can emit many side effects (a list of them) but the proxy handles each side effect call individually.
It would be interesting to allow the user role to emit a side effect for all entities registered in each of the Nodes of the cluster of a certain type. That is, to allow a call in Broadcast mode to be possible.

For that I see that we would have to change the SideEffect message to include a boolean flag to indicate this behavior. Something like:

// A side effect to be done after this command is handled.
message SideEffect {

    // The name of the service to perform the side effect on.
    string service_name = 1;

    // The name of the command.
    string command_name = 2;

    // The payload of the command.
    google.protobuf.Any payload = 3;

    // Whether this side effect should be performed synchronously, ie, before the reply is eventually
    // sent, or not.
    bool synchronous = 4;

    // Send side effect to all entities of the given type.
    bool broadcast = 6;

    // The metadata to include with the side effect
    Metadata metadata = 5;
}

``
@sleipnir sleipnir added the enhancement New feature or request label May 20, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant