RPC server built on top of HTTP


RPC server registers two paths (/_goRPC_ and /debug/rpc) and their handlers as HTTP server. The handler of /debug/rpc handles the http requests and display debug info. The handler of /_goRPC_ hijacks the underlying HTTP connection, hence http requests to /_goRPC_ will only display an error message. Instead, the handler calls the registered rpc service if the incoming request is a rpc request. From the client side, the RPC client first sends an HTTP "CONNECT" request to server. If the response is "connected", then the connection between the client and server is established. The client starts sending calls and receiving responses. The client has a underlying ClientCodec which does the actual transports over the wire. The default codec is golang native Gob codec. Some other choices may be protocol buffers, JSON, etc.




  


Comments:

Write a comment
Anonymous

Captcha image

Reload

Type the number you see in the image above: