Method and apparatus for providing a synchronous interface for an asynchronous service
First Claim
1. A method, comprising:
- in a synchronous interface engine executing on a processor to provide the synchronous interface, receiving a first request from a first client for a first asynchronous service;
issuing a first asynchronous service request to perform the first asynchronous service, the first asynchronous service request including a first unique client identifier associated with the first client;
associating a first wait condition with a first semaphore and the first unique client identifier to indicate to the first client to wait for a first result of the first asynchronous service, the associating comprising representing the first request in a first row of a hash table comprising;
the first unique client identifier; and
the first semaphore representing the associated first wait condition;
acquiring the first semaphore;
representing a second request associated with a second client in a second row of the hash table comprising a second unique client identifier associated with the second client and a second semaphore representing an associated second wait condition;
receiving the first result of the first asynchronous service, the first result including the first unique client identifier;
removing the associated first wait condition comprising;
locating the first unique client identifier in the first row of the hash table; and
releasing the first semaphore represented in the first row of the hash table; and
sending the first result to the first client.
1 Assignment
0 Petitions
Accused Products
Abstract
Methods and apparatus for providing a synchronous interface for an asynchronous service including, in a synchronous interface engine executing on a processor, receiving a request from a client for the asynchronous service, issuing an asynchronous service request to perform the asynchronous service, the asynchronous service request including a unique client identifier, and associating a wait condition with the unique client identifier to indicate to the client to wait for a result of the asynchronous service. Methods and apparatus further include receiving the result of the asynchronous service, the result including the unique client identifier, removing the associated wait condition, and sending the result to the client.
79 Citations
14 Claims
-
1. A method, comprising:
-
in a synchronous interface engine executing on a processor to provide the synchronous interface, receiving a first request from a first client for a first asynchronous service; issuing a first asynchronous service request to perform the first asynchronous service, the first asynchronous service request including a first unique client identifier associated with the first client; associating a first wait condition with a first semaphore and the first unique client identifier to indicate to the first client to wait for a first result of the first asynchronous service, the associating comprising representing the first request in a first row of a hash table comprising; the first unique client identifier; and the first semaphore representing the associated first wait condition; acquiring the first semaphore; representing a second request associated with a second client in a second row of the hash table comprising a second unique client identifier associated with the second client and a second semaphore representing an associated second wait condition; receiving the first result of the first asynchronous service, the first result including the first unique client identifier; removing the associated first wait condition comprising; locating the first unique client identifier in the first row of the hash table; and releasing the first semaphore represented in the first row of the hash table; and sending the first result to the first client. - View Dependent Claims (2, 3, 8, 9)
-
-
4. An apparatus, comprising:
-
a microprocessor; a synchronous interface engine executing on the microprocessor to provide the synchronous interface, comprising; an asynchronous request broker configured to; receive a first request from a first client for a first asynchronous service; associate a first unique client identifier with the first client; and issue a first asynchronous service request to perform the first asynchronous service, the first asynchronous service request including the first unique client identifier; a wait condition processor configured to; associate a first wait condition with a first semaphore and the first unique client identifier to indicate to the first client to wait for a first result of the asynchronous service, associate the first wait condition comprises representing the first request in a first row of a hash table comprising the first unique client identifier and the first semaphore representing the associated first wait condition; acquire the first semaphore; represent a second request associated with a second client in a second row of the hash table comprising a second unique client identifier associated with the second client and a second semaphore representing an associated second wait condition; and an asynchronous result broker configured to; receive the first result of the first asynchronous service, the first result including the first unique client identifier; and remove the first associated wait condition comprising; locating the first unique client identifier in the first row of the hash table; and releasing the first semaphore represented in the first row of the hash table row, wherein upon removing of the first associated wait condition, the wait condition processor sends the first result to the first client. - View Dependent Claims (5, 10, 11, 12)
-
-
6. An article, comprising:
a non-transitory storage medium having stored instructions thereon that when executed by a machine result in a synchronous interface for an asynchronous service enabling; in a synchronous interface engine executing on a processor to provide the synchronous interface, receiving a first request from a first client for a first asynchronous service; issuing a first asynchronous service request to perform the first asynchronous service, the first asynchronous service request including a first unique client identifier associated with the first client; associating a first wait condition with a first semaphore and the first unique client identifier to indicate to the first client to wait for a first result of the first asynchronous service, the associating comprising representing the first request in a first row of a hash table comprising; the first unique client identifier; and the first semaphore representing the associated first wait condition; acquiring the first semaphore; representing a second request associated with a second client in a second row of the hash table comprising a second unique client identifier associated with the second client and a second semaphore representing an associated second wait condition; receiving the first result of the first asynchronous service, the first result including the first unique client identifier; removing the associated first wait condition comprising; locating the first unique client identifier in the first row of the hash table; and releasing the first semaphore represented in the first row of the hash table; and sending the first result to the first client. - View Dependent Claims (7, 13, 14)
Specification