Closed gkaissis closed 3 years ago
SerializedBlob is only for request arguments so you can't use it for responses. Maybe I'll look into this to see if this perhaps can be added in a future version.
In the meantime, the easiest solution is to just not worry about it and pass the bytes as a regular result. If you're not happy with the performance, consider switching to marshal as pyro serializer format, or try one of the other 'raw bytes' transfer options mentioned in the docs https://pyro5.readthedocs.io/en/latest/tipstricks.html#binary-data-transfer-file-transfer
Second question: what do you mean exactly with "reflexive rpc call"?
Thanks a lot for the clarification!
By reflexive, I mean a client call to the server which triggers a server call to the client. I suppose "callback" is the closest to what I am thinking, but the mental model of the "server" calling the "client" isn't entirely clear to me from the example. My concrete use-case is the following:
I hope this makes sense... Thanks again!
@gkaissis you closed the issue, managed to get the callbacks working?
I did, but then refactored the routine to be more Pyro-like with remote generators and a one-way call which made it both faster and more elegant. Thanks for your help!
I am glad you found a good solution !
Is it possible to use the SerializedBlob (or some other construct) to suppress serialization on a certain return statement? We would like to send a plain bytestring which is efficiently pre-serialized in a custom format directly via return from an RPC to a daemon.
also: is there a simple way to perform a reflexive rpc call? Example:
I looked into the callback example but it left me a tad confused...
Thanks and congratulations for your great work on this project!