The invention provides for the coordination of client/server processes.
One or more embodiments provide a completion object comprised of various
states of completion of a client request. The completion object may be
manipulated to transition from one state to another by both the client
and server. The following states of completion may be provided: idle,
ready, active, completing, completed, and acknowledged. In the idle
state, the completion object is obtained by the client (by constructing a
new object or retrieving an existing object that has been recycled). In
the ready state, the request has been initialized but not yet issued to
the server or I/O device. In the active state, the server processes the
I/O request. In the completing state, the server has completed the I/O
operations requested but has not yet stored the results. In the completed
state, the server stores the results to be returned to the client and
notifies the client. At the acknowledged state, the client examines the
results, performs additional operations and frees up the completion
object for use by another client request. Depending on the state of the
completion object, a request to cancel the I/O operations may require
varying actions. The completion object provides the ability to easily and
quickly determine where in the completion process an I/O request is.
Further, when a client request is canceled, the completion object
provides the ability to easily identify the actions necessary to properly
cancel the request.