Forum: Building VoltDB Clients

Post: Responses On the Level of the Wire Protocol

Responses On the Level of the Wire Protocol
henning
Apr 17, 2010
The Wire Protocol lists only one type of Invocation Request (pg. 10) and it's asynchronous:
"A request to invoke a stored procedure identifies the procedure to invoke by name, the parameters to pass to the procedure, and an 8 byte piece of client data that will be returned with the response to the invocation request. A client does not need to wait for a response to a request to continue sending requests."
Just to check if I am getting this right: the use of a callback function as parameter to client.callProcedure() as described in Using VoltDB 3.2.3.3 "Invoking Stored Procedures Asynchronously", pg. 21 is something that is 'bolted on' inside of org.voltdb.client.Client, purely on the client side? Possibly with a simple list that has unique invocation identifiers pointing to the callbacks? The server knows nothing of them, it's not RPC or anything at all?
Thanks!
Henning
Hi Henning, Yes, there is an
aweisberg
Apr 18, 2010
Hi Henning,
Yes, there is an AtomicLong used to generate the client data and a map from Long values to the provided callbacks for each connection to a VoltDB node. Synchronous invocations use an automatically generated SynchronousCallback. To the server the client data is opaque and not necessarily unique so it generates a transaction id and uses that to map to the client connection and client data for a response.
-Ariel