-
Notifications
You must be signed in to change notification settings - Fork 30
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
Ensure that potentially blocking API's can be called asynchronously #24
Comments
The design is based on REST invocations which already provide asynchronous calls. Do we need anything more for the initial proposal? IMO the spec embedded execution may complicate / confuse first implementors. |
This is for the LRAClient right, as in the programatic API. Under the covers it could use asynchronous REST but this is at the Java API level? Or perhaps I misunderstood the query @xstefank ? |
LRAClient is REST invocations (https://github.com/eclipse/microprofile-lra/blob/master/api/src/main/java/org/eclipse/microprofile/lra/client/LRAClient.java#L106). @mmusgrov already mentioned that programmatic API (LRAParticipant) already do support async invocations that's why I've described only REST. Sorry for the confusion @tomjenkinson . |
I think what @mmusgrov is suggesting is to change things like:
to:
Then those rest invocations which can be async can be benefitted from in the business logic too? |
I see, wouldn't it be better to provide both options? Like |
That is a good point. startLRA puts the LRA on the thread (although implementations could use the future too and poll it before propagating? I think if we do both we have to do both in LRAParticipant too right? |
Two points, firstly, @xstefank, what precisely do you mean by "The design is based on REST invocations ..". The spec specifies annotations that application developers apply to their JAX-RS resource methods. Is that what you mean? Secondly, yes I am referring to the LRAClient API. Perhaps we could delay the async version of the APIs to release 1.x which I guess would imply that LRAParticipant methods should be synchronous. |
@mmusgrov 1/ yes, you are right. I also agree with 2/ |
I also agree with 2 from a consistency point of view |
Ensure that potentially blocking API calls can be called in asynchronous mode. Some API methods such as LRAParticipant already do whereas others such as LRAClient do not,
The text was updated successfully, but these errors were encountered: