I would like to make some web service, but I have no idea how to implement some specific behaviour. The scaenario is like that:
- server waits for request fom client,
- when request is received, server has to communicate (send some request with specific id) with other server,
- the other server immediately confirms that request is received (synchroneus) and it starts processing it,
- when processing is done (generaly should be quick) the second server sends asynchroneus response to the first one (for example some POST data) with the previous specific id
- the first server receives this asynchroneus response, and uses it to respond to make response for the client (and in fact this response is synchroneus)
There are of course some bad scenarious to handle with some timeouts for example when the second server does not respond etc.
Can someone give me a tip that will help me to start. I have an experience only with simple web services in request-response model. I will appreciate any advice.