g***@gmail.com
2017-08-08 08:40:22 UTC
Hi everyone,
I apologize in advance if I have missed this in the docs or other thread,
but I have not been able to understand why, when a method gets called,
there are three packets being sent: call (@2), return (@3), finish (@4)
even if no capabilities are involved (except for the bootstrap). The setup
I have used is just plain "Hello world" type bootstrap interface like
"interface Hello { hello @0 (a :Text) -> (a :Text); }" and I saw it in
Python, C++ and Rust. (Same effect with any numeric call/return type).
(Observing the network traffic with wireshark.)
Why is there the need for a finish message even when the returned content
contains no capabilities? (I figure that message may only point to caps
declared in its capTable.)
When the return payload contains no capability, is it possible to somehow
reuse the server-side content? (I did not figure out how, wireshark shows
the data being sent back and forth.) Is anything from the reply actually
stored server-side after the server sends the return without caps?
Until the client does delete the replied payload (for example because it
wants to keep the data in capnp without copying),,the finish is not sent
which might require the server to retain some info on the call (used ID? or
even the data?), even though I have not found it in the sources.
(I believe it is not because of IDs, as for every client independently, if
the server receives e.g. an abort (actually a finish (@4)) with an ID it
has not receiver a call it has not returned yet, it can be sure the abort
is meant for an ID it has returned recently and can ignore the abort.)
Note that this is not a big performance problem for my use-case but since
we are mostly sending simple one-time messages between long-lived caps, it
seems like a waste.
Thanks for any clarification and all the great work!
Tomáš GavenÄiak
I apologize in advance if I have missed this in the docs or other thread,
but I have not been able to understand why, when a method gets called,
there are three packets being sent: call (@2), return (@3), finish (@4)
even if no capabilities are involved (except for the bootstrap). The setup
I have used is just plain "Hello world" type bootstrap interface like
"interface Hello { hello @0 (a :Text) -> (a :Text); }" and I saw it in
Python, C++ and Rust. (Same effect with any numeric call/return type).
(Observing the network traffic with wireshark.)
Why is there the need for a finish message even when the returned content
contains no capabilities? (I figure that message may only point to caps
declared in its capTable.)
When the return payload contains no capability, is it possible to somehow
reuse the server-side content? (I did not figure out how, wireshark shows
the data being sent back and forth.) Is anything from the reply actually
stored server-side after the server sends the return without caps?
Until the client does delete the replied payload (for example because it
wants to keep the data in capnp without copying),,the finish is not sent
which might require the server to retain some info on the call (used ID? or
even the data?), even though I have not found it in the sources.
(I believe it is not because of IDs, as for every client independently, if
the server receives e.g. an abort (actually a finish (@4)) with an ID it
has not receiver a call it has not returned yet, it can be sure the abort
is meant for an ID it has returned recently and can ignore the abort.)
Note that this is not a big performance problem for my use-case but since
we are mostly sending simple one-time messages between long-lived caps, it
seems like a waste.
Thanks for any clarification and all the great work!
Tomáš GavenÄiak
--
You received this message because you are subscribed to the Google Groups "Cap'n Proto" group.
To unsubscribe from this group and stop receiving emails from it, send an email to capnproto+***@googlegroups.com.
Visit this group at https://groups.google.com/group/capnproto.
You received this message because you are subscribed to the Google Groups "Cap'n Proto" group.
To unsubscribe from this group and stop receiving emails from it, send an email to capnproto+***@googlegroups.com.
Visit this group at https://groups.google.com/group/capnproto.