Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for composition of Completes #14

Open
jkonecki opened this issue May 21, 2019 · 0 comments
Open

Support for composition of Completes #14

jkonecki opened this issue May 21, 2019 · 0 comments

Comments

@jkonecki
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant