timemates / rrpc-kotlin

RPC framework for Kotlin built on top of RSocket
https://rrpc.timemates.org
MIT License
9 stars 0 forks source link

Add support of metadata push and fire-and-forget request types in rRPC #9

Open y9vad9 opened 4 months ago

y9vad9 commented 4 months ago

I am planning to implement Fire-and-Forget through message-marker in the following way:

rpc foo(Bar) returns (Ack);

And for the metadata push:

rpc foo(Ack) returns (Ack);

So, effectively, Ack means nothing to be send, for the fire-and-forget we expect to send data, but never receive a response – that's why there's Ack. For the metadata push, we don't expect to have request/response data to be sent/received – that's why we use Ack for the both.

In addition, Ack can be considered as google.protobuf.Empty alternative, but as it can lead to the misunderstanding the concepts and compatibility problems (that gRPC and google.protobuf.Empty does not have – there's not dedicated request types as it's in the RSocket), we introduce alternative structure. Naming is still considered.