Reputation: 726
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.
Upvotes: 0
Views: 757
Reputation: 429
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.
Upvotes: 1