node-jsonrpc2 icon indicating copy to clipboard operation
node-jsonrpc2 copied to clipboard

Batch support

Open dcharbonnier opened this issue 12 years ago • 3 comments

http://www.jsonrpc.org/specification#batch To send several Request objects at the same time, the Client MAY send an Array filled with Request objects.

dcharbonnier avatar Jan 20 '14 06:01 dcharbonnier

how hard would to implement that in the current way the library exists? the handleCall should be able to execute the params in order. does the batch need to be synchronous (aka expect a response after executed) or all the results are appended and sent at once?

pocesar avatar Jan 26 '14 23:01 pocesar

I think this is very easy to do all the results are appended and sent at once. I don't understand, what do you mean with execute the params in order ?

dcharbonnier avatar Jan 27 '14 05:01 dcharbonnier

seeing the DOCs, I thought the method calls needed to be executed in order, and their resulting callbacks also called in order. method with id = 1 > result with id = 1, etc, but send the results all at once, instead of sending them as requested

pocesar avatar Jan 28 '14 03:01 pocesar