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

Define endpoint to retrieve status of all known LRAs in the system. #175

Open
rdebusscher opened this issue Jun 24, 2019 · 21 comments
Open
Milestone

Comments

@rdebusscher
Copy link
Member

We can define an endpoint, like /lra, which return the status (and the status of all participants for each LRA) of all known LRAs in the system.

This endpoint is not participant specific, but global to the deployment (like /metric a
nd /openapi)

A configuration option defines the time the LRA remains 'known' in the system after it has reached a final state. In that time, it is reported with the final state through this endpoint.

It SHOULD be possible to protect this endpoint.

Format JSON, data: To Be defined

@rdebusscher rdebusscher added this to the 1.x milestone Jun 24, 2019
@mmusgrov
Copy link
Contributor

mmusgrov commented Jun 25, 2019

-1 We used to have query mechanisms in the project (recall LRAInfo etc) and I fought hard to keep them but the majority of the group asked for query mechanisms to be removed - there is a discussion history on the topic. Why the change of heart?

@mmusgrov
Copy link
Contributor

The Narayana implementation uses the following JSON data: https://github.com/jbosstm/narayana/blob/master/rts/lra/lra-coordinator/src/main/java/io/narayana/lra/coordinator/domain/model/LRAData.java#L6

but I think we could improve on that definition.

An example endpoint is https://github.com/jbosstm/narayana/blob/master/rts/lra/lra-coordinator/src/main/java/io/narayana/lra/coordinator/api/Coordinator.java#L107. There are others in the same file which I think are probably overkill.

@rdebusscher
Copy link
Member Author

rdebusscher commented Jun 25, 2019

I don't think we discussed an endpoint to view the LRAs known by the system.

This is not about participant retrieving the info of an LRA, but about governance.

@tomjenkinson
Copy link
Contributor

We would want to consider this without the need for a centralised resource I expect.

@rdebusscher
Copy link
Member Author

Works in the case of the solution chosen for Payara (which is also non centralised) but doesn't work in case of a routing-slip implementation. (thanks Martin for that remark)

@tomjenkinson
Copy link
Contributor

I think this could be left to vendors to provide for now?

@xstefank
Copy link
Member

xstefank commented Mar 20, 2020

We could still have an endpoint per microservice which would give only the information about the LRAs that the particular microservice knows of. Would that be useful?

But of course, we can mention that if the implementation is using a form of centralized coordination than there should be an endpoint exposing all LRAs.

@tomjenkinson
Copy link
Contributor

I think this could be left to vendors to provide

@xstefank
Copy link
Member

I think this could be left to vendors to provide

but better for it to be unified from the user perspective.

@tomjenkinson
Copy link
Contributor

can routing slip achieve it?

@xstefank
Copy link
Member

can routing slip achieve it?

Yes, because it will still travel between microservices. So individual microservices can expose an endpoint about processed LRAs.

@tomjenkinson
Copy link
Contributor

I don't quite understand how routing slip would be able to collect a list of all LRA in the system? The propagated LRA would only know about it's own environment (and proceeding ones). In a centralised system all the LRA can be known, and in the case of totally decentralised is it possible to establish a list of all nodes that may have LRA in progress to collect this and return from a call to /lra

As I think a bit further /lra being an endpoint I am not sure how it would look in code and so on? We don't have a REST interface currently (IIRC we used to have this but removed it) for the @LRA methods but do a URI for a specific LRA so would need to consider that.

@xstefank
Copy link
Member

@tomjenkinson in my comment above #175 (comment):

We could still have an endpoint per microservice which would give only the information about the LRAs that the particular microservice knows of. Would that be useful?

I was talking only about LRAs the service knows of. Did you possibly misread my intention?

To you second point: we can have /lra or something else in a similar manner as we have /health or /metrics.

@tomjenkinson
Copy link
Contributor

I think the important part is defining what comprises the system in the following:

return the status (and the status of all participants for each LRA) of all known LRAs in the system.

@xstefank
Copy link
Member

@tomjenkinson I understand that this was the original proposal but I proposed something slightly different and I thought you are reacting to my comment #175 (comment).

I still think that the variation of Rudy's idea can be specified.

@rdebusscher
Copy link
Member Author

The reasoning behind my proposal is that such a list could help as there are scenarios where manual actions are required in case automatic completing or cancelling fails.

It is easier to retrieve the information for the action points from an endpoint then to parse the log files (as such situations needs to be logged according to the current spec)

A single endpoint for all LRA information is easier as developers don't need to call several endpoints to gather that information.

When using routing slip as implementation, this global endpoint is not possible.

@rdebusscher
Copy link
Member Author

So an updated proposal is to have either a single endpoint that returns all information or an endpoint per service which returns service-specific information.

@xstefank
Copy link
Member

Or both :)

One thing. We're really hypothesizing about routing slip. So why can't potential routing slip implementation implement "another" routing slip that would collect and aggregate the information from all microservices in the system? And this functionallity can be exposed by any service in the system. -- really just an idea. I would definitely like to see something like this suggestion in the later version of the spec.

@tomjenkinson
Copy link
Contributor

We could still have an endpoint per microservice which would give only the information about the LRAs that the particular microservice knows of. Would that be useful?

Have you a suggestion on how an interested party could discover all the endpoints?

@xstefank
Copy link
Member

xstefank commented Mar 23, 2020

We could still have an endpoint per microservice which would give only the information about the LRAs that the particular microservice knows of. Would that be useful?

Have you a suggestion on how an interested party could discover all the endpoints?

I don't understand how that relates to the text you've copied but service discovery is a solved problem in microservices architectures (otherwise the microservices cannot communicate with each other). You only need to know one endpoint which is probably going to be one you're communicating with.

@tomjenkinson
Copy link
Contributor

The requirement as expressed was to find the status "of all known LRAs in the system" so without knowing who is in the system I am not sure how to collect the results of all "/lra" calls

@mmusgrov mmusgrov modified the milestones: 1.x, 1.0 Sep 3, 2021
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

4 participants