Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JSON/XML-RPC over TCP and Message Framing

Tags:

tcp

json-rpc

I was thinking about JSON/XML-RPC over HTTP vs TCP. In case of HTTP, the HTTP request and response provide a message framing mechanism. However, since TCP is a stream,

  1. How are RPC messages framed?
  2. Does the RPC spec dictate that?
  3. Are there any other standards defining framing mechanisms?
  4. Is there one mechanism more often used than the other?

I'm trying to guage this before inventing a framing mechanism.

like image 603
0cd Avatar asked Oct 20 '22 00:10

0cd


1 Answers

There are many framing standards, HTTP being one of them. Websocket being another, on top of HTTP, more suited for bidirectional streams.

JSON-RPC 2.0 does not concern itself with transport, intentionally.

(1.0 had some transport specifics, that was removed in the new version.)

like image 130
fiddur Avatar answered Oct 22 '22 22:10

fiddur