Asynchronous database API
First Claim
1. A computer readable medium having stored thereon computer-executable instructions for providing an asynchronous database Application Programming Interface (“
- API”
) that allows a client application to open a database connection asynchronously, said API comprising;
instructions for an initialization method that is configured to be invoked by a client thread to request a database operation, wherein upon invocation of said initialization method, said initialization method;
initiates a return communication with said client thread without waiting for any external event, said return communication allowing said client thread to continue executing without waiting for a response from a database server associated with said database operation;
validates input parameters for said database operation;
sets up said database operation by generating database instructions based on data passed to said initialization method; and
sends a request for said database operation to said database server;
instructions for signaling said client thread when said database operation is complete; and
instructions for a finalization method that is configured to be invoked by said client thread, in response to said signaling, to obtain any results of said database operation, wherein upon invocation of said finalization method, said finalization method;
prepares database results for said client thread; and
returns said database results to said client thread.
2 Assignments
0 Petitions
Accused Products
Abstract
An asynchronous database API allows threads to call a database and continue to execute without spawning a thread to wait for the database and without polling the database. The API immediately returns to a caller without waiting for a database operation to complete or for any other external event. A call to an asynchronous database API can invoke an initialization method. The initialization method may validate the input parameters, build them into a message for a database operation, send the message to the database server, and return signal information to the client process thread. Signal information provides a client thread with a way to recognize a signal indicating the return of results from a database. Upon completion of a database operation, a thread can call a finalization method to perform any final step to process the database results and pass the formatted results to the thread.
51 Citations
13 Claims
-
1. A computer readable medium having stored thereon computer-executable instructions for providing an asynchronous database Application Programming Interface (“
- API”
) that allows a client application to open a database connection asynchronously, said API comprising;instructions for an initialization method that is configured to be invoked by a client thread to request a database operation, wherein upon invocation of said initialization method, said initialization method; initiates a return communication with said client thread without waiting for any external event, said return communication allowing said client thread to continue executing without waiting for a response from a database server associated with said database operation; validates input parameters for said database operation; sets up said database operation by generating database instructions based on data passed to said initialization method; and sends a request for said database operation to said database server; instructions for signaling said client thread when said database operation is complete; and instructions for a finalization method that is configured to be invoked by said client thread, in response to said signaling, to obtain any results of said database operation, wherein upon invocation of said finalization method, said finalization method; prepares database results for said client thread; and returns said database results to said client thread. - View Dependent Claims (2, 3, 4, 5)
- API”
-
6. A computer readable medium having stored thereon computer-executable instructions for providing an asynchronous database Application Programming Interface (“
- API”
) allowing a client application to open a database connection asynchronously, said API comprising;instructions for an initialization method, wherein said initialization method is configured to be invoked by a client thread to request a database operation, wherein upon invocation of said initialization method, said initialization method; initiates a return communication with the client thread without waiting for any external event, said return communication allowing said client thread to continue executing without waiting for a response from a database server associated with said database operation; validates input parameters for said database operation; sets up said database operation by generating database instructions based on data passed to the initialization method, said database operation comprising at least one instruction to execute a Structured Query Language (“
SQL”
) statement; andsends a request for said database operation to a database server; instructions for signaling said client thread when said database operation is complete; instructions for a finalization method that is configured to be invoked by said client thread, in response to said signaling, to obtain any results of said database operation, wherein upon invocation of said finalization method, said finalization method; prepares database results for said client thread; and returns said database results to said client thread. - View Dependent Claims (7, 8, 9)
- API”
-
10. A computer-implemented method for allowing a client application to asynchronously access database services, said method comprising:
-
receiving, by an Application Programming Interface (API) software executing on a computer, a client thread invocation of an initialization method, wherein said client thread invocation comprises input parameters for a database operation; initiating, by said initialization method without waiting for any external event, a return communication to said client thread, said return communication allowing said client thread to continue executing without waiting for a response from a database server associated with said database operation; validating, by said initialization method, said input parameters; setting up said database operation by generating database instructions based on said input parameters, said database operation comprising at least one instruction to execute a Structured Query Language (“
SQL”
) statement;sending a request for said database operation to said database server; signaling said client thread when said database operation is complete; receiving, by said API, an invocation of a finalization method from said client thread in response to said signaling; preparing, by said finalization method, database results for said client thread; and returning, by said finalization method, said database results to said client thread. - View Dependent Claims (11, 12, 13)
-
Specification