varlink.github.io
varlink.github.io copied to clipboard
Suggestion: add an optional id field copied from input to output for async support
I suggest a method call could include an optional id
field. No processing for it is required, if present - it's simply to be copied to the output.
This would allow implementations to potentially run via async
or in several threads to handle out of order processing while using a single file handle / single connection. The client, in that case, can wait for a specific return value that matches the input id without depending on the pipeline order and stalling the process.
The suggestion is backwards compatible. The current server implementation can simply copy the id from input to output without actually doing any async stuff.