I myself am struggling with this problem. And I have no answer yet, but I have some thoughts.
Having considered the answers provided by others, there is still a third option.
In my application to the server, it takes about ten or twelve calls to get the data I need. Some data fields are varchar max and varbinary max fields (images, large documents, video, and audio files). All my calls are synchronous - that is, while the data is being requested, the user (and on the client side) has no choice but to wait. He may only want to read or view data that has a general meaning only when he is ALL, and not only partially. This process, I believe, is slower, and I am developing an alternative approach based on asynchronous server calls from the DLL, which raises events for the client to report progress to the client. The client is programmed to handle DLL events and set a client-side variable indicating that the chich requests are complete. The client program can then do what it needs to do to prepare the data received in call # 1, while the DLL goes asynchronously to receive call data # 2. When the client is ready to process the data of call No. 2, he must check the status and wait to continue if necessary (I hope it will be short or not need to wait at all). Thus, both server and client software perform work in a more efficient manner.
Vancman
source share