Upgrade to Pro — share decks privately, control downloads, hide ads and more …

「ウチも、gRPC使えますか?」

Sponsored · SiteGround - Reliable hosting with speed, security, and support you can count on.
Avatar for uhzz uhzz
October 10, 2021

 「ウチも、gRPC使えますか?」

Avatar for uhzz

uhzz

October 10, 2021
Tweet

More Decks by uhzz

Other Decks in Programming

Transcript

  1. こんなお悩みはないだろうか 実装言語ごとに、似たような関数を新しく作ってるけど、、、うーん🤔 # メッセージを暗号化 def hash(message) return crypt(message) end //

    メッセージを暗号化 func hash(message string) string { return crypt(message) } そのお悩み、解決できるかもしれません
  2. RPC -Remote Procedure Call- // メッセージを暗号化 func hash(message string) string

    { return crypt(message) } サーバーを超えた、リモートでの関数(手続き)呼び出しのこと! 近年ではHTTP/HTTPSベースかつXML/JSON形式でやりとりするWeb API hash関数を呼び出し
  3. コードの自動生成 protoファイルのアウトプットをProtocol Buffers*でカスタム message Person { required string name =

    1; required int32 id = 2; optional string email = 3; } .proto Person john = Person.newBuilder() .setId(1234) .setName("John Doe") .setEmail("[email protected]") .build(); output = new FileOutputStream(args[0]); john.writeTo(output); .java Protocol Buffers*による自動生成 ※生成されたコードからロジックを組み立て * `protoc`というProtocol Buffersコンパイラのこと https://developers.google.com/protocol-buffers
  4. 参考 [OpenStindia](https://openstandia.jp/oss_info/grpc/) [Introduction to gRPC](https://grpc.io/docs/what-is-grpc/introduction/) [Protocol Buffers](https://developers.google.com/protocol-buffers) [HTTP/2の特徴HTTP/1.1との違いについて](https://blog.redbox.ne.jp/http2-cdn.html) [サービス間通信のための新技術「gRPC」入門](https://knowledge.sakura.ad.jp/24059/) [API設計:gRPC、OpenAPI、RESTの概要と、それらを使用するタイミングを理解す

    る](https://cloud.google.com/blog/ja/products/api-management/understanding-grpc-openapi-and-rest-and-when-to-use-them) [初めてのgRPC/ Starting gRPC](https://speakerdeck.com/line_developers/starting-grpc) [コピペでできるGoでgRPCサーバ立ててRailsからアクセスする方法](https://tech.smartcamp.co.jp/entry/2019/03/28/175137) [マイクロサービスとは何か -IBM Cloud Blog](https://www.ibm.com/blogs/solutions/jp-ja/what-is-microservices/)