In my application, I have multiple instances of a service/Microservice which I hope to develop in a Stateless manner, and which need to do the following steps as part of processing a single configuration request received from the UI:
- Receive a large configuration request from the UI.
- Break down the request into multiple configuration objects that need to be created on the Network Devices (these devices are outside of the application and on the Network). For this case, lets say we break this down to 4 parts: A, B, C and D.
- Send requests to configure A on the Network Device.
- Send requests to configure B on the Network Device.
- Send request to configure C on the Network Device.
- Send request to configure D on the Network Device.
The constraints are:
- Requests in each step should be sent Asynchronously and their
responses received asynchronously.
- Requests at #3 should be sent only if we are successful with the requests at step #2.
- Requests at #4 should be sent only if we are successful with the requests at step #3.
- Requests at step #5 should be sent only if we are successful with the requests at step #4.
- A Success for Request at step #5, means all previous steps were successful.
Now my question is:
Are there any "standard" ways to do this ? Are there any frameworks (in Java) that help us achieve this ?
question from:
https://stackoverflow.com/questions/65878937/any-standard-ways-to-handle-multi-step-request-response-in-a-stateless-manner 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…