-
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
Interoperability: Clients running on different MP platforms need to know how to start and end and LRA #62
Comments
As it was discussed on the hangout this week, here are starting proposed REST definitions: start: parameters:
responses: Produces join parameters:
responses: close: paramerters:
responses: cancel: paramerters:
responses: |
We need to follow REST HATEOS principles, ie the POST request should return the newly created resource in the Location header and a link header containing three URLs that can be used to close, cancel and join the LRA (with relation types close , cancel and join respectively). |
After thinking further on your proposal and on what I said in my last comment, I have two questions/observations:
|
Also note that from my point of view this work should cover starting, closing and cancelling LRAs but should also include how to join an LRA: @rdebusscher may we move this issue back to #17 since starting, joining and ending are all tied to each other, ie starting an LRA should return something that participants can use to join with the new LRA? |
@mmusgrov I've added the join to the initial proposal. I also included completeTimelimit for both start and join as now it is also configurable. I definitely agree that we should move configuration options to JSON passed as payload. This would allow us to be more flexible if need be to change it in later releases / add new things easily while staying backward compatible. I also agree with your second point. Just to clarify that I understood your intention: |
I like the Mike's point about the JSON as configuration options. In addition what was already said as benefits it seems to me kind of "cleaner" design as I think JSON is more suitable for one think I don't understand now is the second point of Mike's comment
Does the commend proposes there will be only one URL from the |
@ochaloup you are right. Starting an LRA will create a new LRA resource {lraId}. To close or cancel the LRA you would send a PUT request to {lraId} and the body of the request would contain some JSON that contains the desired resource representation that corresponds to the closed state: {
...
"state": "closed"
...
} @xstefank Does that clarify my proposal: I am saying that we do not have separate REST resources for {lraId}/close and {lraId}/cancel. There is a single resource that corresponds to the LRA. The resource representation contains things like its status, its list of participants, its time to live etc. If the client wants to close the LRA he issues a resource update (using PUT) with the desired new state (sending a partial representation in a PUT request conforms to REST principles). Also I would prefer not to allow the timelimit for compensate and complete to be different in release 1.0. When POSTing to the "start URL" (to request the creation of a new LRA resource), the payload should contain an initial JSON representation of the LRA which identifies the ClientID, TimeLimit, ParentLRA, TimeLimit, participant and the opaque data (ie my proposal was to not use query params and the link header). Also we need to support |
The decision made at the last hangout was to defer this topic to milestone 1.1 |
In MP environments running different MP implementations a client running on one platform must be able to start and end an LRA implemented by another vendor.
This requirement was briefly discussed in issue #17 .
The specification should:
The text was updated successfully, but these errors were encountered: