SRE(Site Reliability Engineering)チームの@cubicdaiyaです。今年のはじめから開発しているWidebulletというシンプルなAPI Gatewayを紹介します。 WidebulletはJSON-RPCをベースにしたシンプルなAPI Gatewayです。Goで書かれています。 github.com JSON-RPCはJSONによるRPC(Remote Procedure Call)プロトコルで、リクエストやレスポンスのボディに含まれるJSONを利用してクライアント/サーバ間の通信を行います。 # リクエストボディ { "jsonrpc": "2.0", "method": "echo", "params": {"msg": "ok"}, "id": "1"} # レスポンスボディ {"jsonrpc": "2.0", "result": "ok",
![Widebullet〜API Gateway with JSON-RPC〜 | メルカリエンジニアリング](https://cdn-ak-scissors.b.st-hatena.com/image/square/b39056dc78c1590704328bf8ffd40ef64fe5b697/height=288;version=1;width=512/https%3A%2F%2Fengineering.mercari.com%2F%2Fimg%2Fogp%2Fogp_a.jpg)