JSON-RPC Swagger combination

前端 未结 2 2046
北荒
北荒 2021-01-18 07:54

I am considering to implement JSON-RPC for my web service with this library. I would also like to implement Swagger for my service.

However, I am not sure, if these

2条回答
  •  误落风尘
    2021-01-18 08:08

    A word on the API pattern...

    JSON-RPC is incredibly powerful. It is transport agnostic, where as REST is locked to HTTP. If you want to use a stream instead of isolated requests, you would have to hack quite a bit. JSON-RPC changes your paradigm from the onset and running your API over any new transport (socket.io, raw binary, ZeroMQ, fax->OCR, sms, anything) is a trivial implementation.

    In my opinion, JSON-RPC is to REST, as REST is to SOAP

提交回复
热议问题