-
Notifications
You must be signed in to change notification settings - Fork 38
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
Effect API+impl for actions #258
Conversation
sdk/src/main/java/com/akkaserverless/javasdk/action/Action.java
Outdated
Show resolved
Hide resolved
sdk/src/main/java/com/akkaserverless/javasdk/action/Action.java
Outdated
Show resolved
Hide resolved
sdk/src/main/java/com/akkaserverless/javasdk/action/Action.java
Outdated
Show resolved
Hide resolved
sdk/src/main/java/com/akkaserverless/javasdk/action/Action.java
Outdated
Show resolved
Hide resolved
Done for final review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There are a few FIXME left. Are you planning to create issues and address them on upcoming PRs or do you want to include here?
/** | ||
* Create a reply from an async operation result returning an effect. | ||
* | ||
* @param futureEffect The future effect to reply with. | ||
* @return A reply, the actual type depends on the nested Effect. | ||
* @param <S> The type of the message that must be returned by this call. | ||
*/ | ||
<S> Effect<S> asyncEffect(CompletionStage<Effect<S>> futureEffect); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not clear to me in which case we would need this one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Look at the TCK Action. I thought it felt superficial at first but I think it makes sense that any effect and its side effects, not only messages, can be created as a consequence of a future completing.
// FIXME async + closing over stateful action context will be a pain for users | ||
ActionContext actionContext = actionContext(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that will be a concern indeed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The two FIXMEs in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
re-approved
Ready for merge?
Refs #52
Effects API for actions and implementation plus codegen.
Old Reply type left in place even though Actions does not use it anymore since replicated entities still does.