gorpc icon indicating copy to clipboard operation
gorpc copied to clipboard

bidirectional support

Open jmptrader opened this issue 10 years ago • 3 comments

Powerfull code.

You have in your roadmap the bidirectional support.

-- x -- I work in an simple server that resolve transactions and route message between different peers in bidirectional mode.

You can imagine, the lots concerns and pitfalls when using tcpsockets, channels, goroutines and so on.

It's like many services with an central coordinator.

--- x --- I can assign an port to each service, and set it's to server-RPC, and an client-RPC to Server-resolver.

Finally, the Server-resolver it's an client-RPC of all services.

Please, your comments.

Thank's. JM

jmptrader avatar Nov 18 '15 19:11 jmptrader

Unfortunately gorpc architecture requires major redesign for decent bidirectional RPC support. This may break existing apps.

Currently I have plans to design and create yet another RPC package from scratch with bidirectional RCP support from the day one (it already has a name - fastrpc :) ). Fastrpc will have the following new features comparing to gorpc:

  • bidirectional RPC
  • lower CPU and memory overhead
  • network channels and byte streams with flow control (probably - this requires additional research).

valyala avatar Nov 19 '15 15:11 valyala

+1

gyf19 avatar Dec 22 '15 04:12 gyf19

For bidirectional RPC on the same connection, yamux or muxado could work well. They can also solve the problem where one side is behind a firewall/NAT and the other side is not and you can only establish connections in one direction only.

bits01 avatar Jan 12 '16 01:01 bits01