Asynchronous Operation


Asynchronous Operation is the exchange of messages, such as among the hosts on a network or devices in a computer, by reading and responding as schedules permit rather than according to some clock that is synchronized for both the sender and receiver or in real time.

Asynchronous Operation is usually used to describe communications in which data can be transmitted intermittently rather than in a Synchronous Operation.

Asynchronous Operation allows Concurrency

LDAP Asynchronous Operation#

Most of the JAVA LDAP SDKs and other LDAP API function calls have both Asynchronous Operation and Synchronous Operation versions.

When you make an Asynchronous Operation LDAP Request call, the client can continue with other tasks, including making new requests to the server, or processing the results of a search, while the Asynchronous Operation request is in progress.

Asynchronous Operation LDAP Request do not return a Message ID (which then must be queried to get a LDAP Result Codes) for each LDAP Request.

This is in contrast to Synchronous Operation LDAP Requests which wait for a LDAP Result Codes before continuing.

At any time a client application can check on the status of an Asynchronous Operation call by calling LDAP Result with the message ID.

To abandon an Asynchronous Operation call in progress, call Abandon Request.

Because the Asynchronous Operation LDAP Request returns a Message ID, rather than a LDAP Result Codes, these Asynchronous Operation functions are typically NOT thread-safe. To determine whether the LDAP Request returned a LDAP Result Codes, you have to retrieve the LDAP Result Codes from the Message ID. With Asynchronous Operation it is possible for another thread to overwrite the LDAP Result Codes before you retrieve it.

Extended Request operations calls provided with LDAP 3 (identified by an _ext suffix) are thread-safe because they pass the message ID back to the caller as an out parameter.

Generally, Asynchronous Operation should NOT be used within LDAP Connection Pools

More Information#

There might be more information for this subject on one of the following: