Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Support for composition of Completes #14

@jkonecki

Description

@jkonecki

I would like to suggest a new feature of Complete composition.

I would like to create a new single Complete from a collection of Completes. This will support a fan-out design pattern, where the client may message multiple actors and need to await all the calls to finish (equivalent of Task.WhenAll). Another potential scenario to support is the equivalent of Task.WhenAny - the new Complete will trigger when the first of the source completes triggers.

The suggested interface (I don't know Java so please forgive any syntax errors):

static <T[]> Completes<T> whenAll(final Completes<T>[]) 
static <T> Completes<T> whenAny(final Completes<T>[]) 

It may be useful to have support for composing Completes of different generic types - the scenario here would involve querying multiple actors for different type of information and than aggregating results.

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