alp carsikarsi wrote:Thanks jayesh. is this solution works on heavy simultaneus request load ?
Best regards.
Any solution that uses a synchronous call that waits on a background job to complete will have an inherent cost:- The
thread that called your synchronous method will wait till the background process is complete. This means that if your app server spawns a thread for each request, there is one more thread for the OS to keep track off, or if the app serves uses a thread pool (as most app servers do), there is one less thread to service other requests. Either way, you will be bottlenecking. This may or may not be a big deal depending on the frequency of requests, and time taken to process each request.
Besides that, if you use the mechanism that I described, there will be an overhead while you continuously poll for completion. It depends on what the cost of each call is. I am not familiar with the library that you are using. If the mechanism that Stephen described is available, it should be less costly, since you will be spending more time in wait