Question
UHG
UHG
US
UHG
Posted: Apr 15, 2018
Last activity: Apr 30, 2018
Last activity: 30 Apr 2018 16:08 EDT
Closed
synchronous Vs Asynchronous process,
Hello,
Can someone please explain about what is the difference between synchronous and Asynchronous process with example.
Thanks
Hi,
Use asynchronous mode if the service is long running and the response is not required immediately. Use synchronous incase if you are looking for immediate response.
An external application sends a request to a service which is asynchronous .
The asynchronous service uses the agent queue functionality to create a queue item for the request.
The service queues the request with the status "Immediate" and spawns a batch requestor to run the request.
The service returns the queue item ID to the calling application and ends the service call.
If the request is executed successfully the service page is populated with the results and included in the queued item, the status of the queued item is set to Success.
If the request fails, the number of failed attempts is incremented and the request status is either set to "Scheduled" or "Broken-Process" depending on if maximum number of attempts has been reached.
If status is set to "Scheduled", the request is queued for the agent associated with the queue. The next time the agent runs, it attempts to run this service.
At some later time, the external application sends the queue ID from the original response to another service which is synchronous
The synchronous service retrieves the data from the queue and map it to the response. The external application waits till it gets response from the synchronous service.
Hi,
Use asynchronous mode if the service is long running and the response is not required immediately. Use synchronous incase if you are looking for immediate response.
An external application sends a request to a service which is asynchronous .
The asynchronous service uses the agent queue functionality to create a queue item for the request.
The service queues the request with the status "Immediate" and spawns a batch requestor to run the request.
The service returns the queue item ID to the calling application and ends the service call.
If the request is executed successfully the service page is populated with the results and included in the queued item, the status of the queued item is set to Success.
If the request fails, the number of failed attempts is incremented and the request status is either set to "Scheduled" or "Broken-Process" depending on if maximum number of attempts has been reached.
If status is set to "Scheduled", the request is queued for the agent associated with the queue. The next time the agent runs, it attempts to run this service.
At some later time, the external application sends the queue ID from the original response to another service which is synchronous
The synchronous service retrieves the data from the queue and map it to the response. The external application waits till it gets response from the synchronous service.
Please refer to below article for information related to Synchronous and Asynchronous processing
https://docs-previous.pega.com/data-and-integration/how-asynchronous-service-processing-works
Hope this helps.