Is it possible to use interfaces in messages detached from all other RPC 
code like TwoPartyVatNetwork ?

For example, write down an Interface {...} in a scheme matching to the 
interface of the actual class that will be called, generate code with capnp 
and use the resulted client and server in 2 different threads just to 
serialize and dispatch requests/responses?
Or, can I only do this with usual capnp messaging? Create a usual message 
with a code for a specific function that should be called and some sort of 
generic scheme for parameters pack.

Thanks

On Wednesday, July 1, 2020 at 8:24:41 PM UTC+3, Kenton Varda wrote:
>
> Hi Dmitry,
>
> You should be able to accomplish this by writing a custom implementation 
> of VatNetwork. You can look at TwoPartyVatNetwork for an example.
>
> That said, if you're thinking about optimizations like lock-free ring 
> buffers, you may find that the RPC system itself adds too much overhead for 
> your use case, due to the bookkeeping it does that is primarily designed to 
> compensate for latency over a network -- which you don't really have. It 
> might make more sense to use Cap'n Proto's serialization layer directly and 
> implement your own work queue around that.
>
> -Kenton
>
> On Wed, Jul 1, 2020 at 11:47 AM Ambrase <[email protected] <javascript:>> 
> wrote:
>
>> Is it possible to use Capnproto RPC messaging to deliver function calls 
>> through lockfree ring buffer between threads?
>> There are 2 ring buffers (client -> server, server->client, 1 to many 
>> scenarios are also possible).
>> I'm thinking about how to use capnproto RPC messaging to pack a call to 
>> an object's interface from another thread and pass it through this 
>> interthread transport.
>> Any ideas or examples of how to approach this? Or Capnproto isn't 
>> suitable for such a task?
>>
>> Many thanks
>>
>> -- 
>> 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 [email protected] <javascript:>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/capnproto/ca16c240-365a-4f53-ab73-552b175a444eo%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/capnproto/ca16c240-365a-4f53-ab73-552b175a444eo%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/capnproto/fccb2c61-8094-4858-97ae-7235b194ff19o%40googlegroups.com.

Reply via email to