Asynchronous applications are often layered. In these types of applications, the lower layer protects the higher layer from low-level asynchronous detail.
The higher-level layer typically consists of:
Mainline code
Routines that asynchronously perform large operations.
In this discussion, a “large” operation is a task that requires several Client-Library calls to complete. For example, updating a database table is a large operation because an application calls ct_command, ct_send, and ct_results to perform the update.
The lower-level layer typically consists of:
The Client-Library routines required to perform a large operation
Code to handle low-level asynchronous operation completions