Protobuf-Net: implementing server, rpc controller and rpc channel

758 views Asked by At

I am trying to implement a set of services which are temporarily implemented with tcp but will eventually be moved to udp. I had my proto file converted to the rpc interface, but this requires a server, rpc channel, and rpc controller.

I don't know what rpc controller and rpc channel are, much less how to implement them. Can anyone explain?

Thanks in advance.

1

There are 1 answers

1
Madwyn On BEST ANSWER

I've built a protobuf RPC in C++, but it might help a bit.

The controller generally controls the status of the message, like Failed. Example here.

In my implementation, there is no channel at all. I would imagine that channel takes care of keeping the message flows' consistency, e.g., an internal session state. So the server can accept multiple requests at the same time and response correspondingly. (I could be wrong about this)

Take a look of my bare bone RPC middle ware here, it's really simple, only 8 source files.