pocesar/node-jsonrpc2

Batch support

dcharbonnier opened this issue · 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.

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?

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 ?

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