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.
I've built a protobuf RPC in C++, but it might help a bit.
The
controller
generally controls the status of the message, likeFailed
. Example here.In my implementation, there is no
channel
at all. I would imagine thatchannel
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.