Handling asynchronous requests
How synchronous and asynchronous processing differ
The server component of a distributed application can handle
both synchronous and asynchronous requests. When a client issues
a synchronous
call, the server executes the
function immediately while the client waits until processing has
completed. When a client issues an asynchronous
call,
the server performs the processing at a later point in time; meanwhile,
the client can continue to do other work while the server handles
the request.
Requests are queued
When a client issues an asynchronous call, the server queues
the request. Asynchronous calls are first queued locally on the
client so that the calling function can continue to execute immediately.
As each request is pulled off the local queue, it is sent to the
server, where it is added to the client session’s asynchronous
request queue. The server then executes the requests in the order they
are received.
Synchronous requests take priority
If a synchronous call comes in after several asynchronous
calls have been made, the synchronous call is executed as soon as
possible. Asynchronous requests against a particular object will
be processed after all synchronous requests made against this object.
For more information
For instructions on making an asynchronous function call from
a client application, see “Making asynchronous
function calls”.