You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert
How to best handle errors in Go is a divisive issue, leading to opinion pieces by illustrious bloggers such as Dave Cheney, the commander himself Rob Pike as well as the official Go blog. I’m not going to tackle those opinions here, instead I’m going to talk about best practices for errors when using gRPC and Go. The gRPC Status package The Go gRPC implementation has a status package which exposes
By Miguel Mendez (Yik Yak) | This post was originally a part of the [Yik Yak Engineering Blog](https://medium.com/yik-yak-eng) which focused on sharing the lessons learned as we evolved Yik Yak from early-stage startup code running in Amazon Web Services to an eventual incremental rewrite, re-architecture, and live-migration to Google Cloud Platform. Wednesday, April 12, 2017 In our previous blog
Cloudflare launched support for gRPC® during our 2020 Birthday Week. We’ve been humbled by the immense interest in the beta, and we’d like to thank everyone that has applied and tried out gRPC! In this post we’ll do a deep-dive into the technical details on how we implemented support. What is gRPC?gRPC is an open source RPC framework running over HTTP/2. RPC (remote procedure call) is a way for on
※ この記事は2019年11月7日に作成した GoとDockerでLet's try gRPC - LiBz Tech Blog と同じ内容です はじめに こんにちは!エンジニアの渡邊です。早いもので、11月でLiBに入社して丸1年がたちました。 このブログへの投稿も4回目になります。 前回の「とってもRailsライクなサーバーレスフレームワーク「Ruby on Jets」を本番環境に導入した話」では、jetsの開発者であるtongueroo氏や、Rubyの生みの親まつもとゆきひろ氏をはじめ、多くの方にシェアをしていただき大変励みになりました! みなさんありがとうございました。 今回はGoogleが開発したRPCフレームワークgRPCについて書こうと思います。 gRPCとは Google社内で使用されているstubbyというRPC(Remote Procedure Call)フレームワーク
本記事 本記事では、gRPCについて体系的に取り上げ、開発方法や運用方法を書いていこうと思います。 私はgRPCは使ったことも、運用したこともあります。同じRPCにを実現する方法としてJSONRPCというプロトコルがあります。 一年くらい前に取り上げた記事です。よかったら見てみてください。 www.1915keke.com また、今回の使用言語はGolangです。 コンテンツ 本記事 コンテンツ gRPCについて gRPCとは RPCとは 公式サイト コンセプト 1. サービス定義 特徴 1. Protocol Buffersによってスキーマをあらかじめ定義する 2. いろんな言語とプラットフォームで使える 3. 簡単に始められて、高いスケール性 4. 双方向ストリームと統合的な認証 作って見る gRPCをインストール Protocol Buffers v3をインストール Server側
前回、JSONのことについて調べていたら、 qiita.com JSON-RPCなるものの存在を知り、そんじゃ、RPCって何なのさ?ということになりましたので、調べてみました。 2017年11月26日(日)現在、Eclipse(Eclipse NEON)ではgRPCのプロジェクトのインポートでエラーが解消できていません。Eclipseへのインポート部分は読み飛ばしてください。 コマンドでの起動は確認できています。 RPC(Remote Procedure Call)とは? RPC(Remote Procedure Call)って何ぞ~? 遠隔手続き呼出し(remote procedure call、リモートプロシージャコール、略してRPC)とは、プログラムから別のアドレス空間(通常、共有ネットワーク上の別のコンピュータ上)にあるサブルーチンや手続きを実行することを可能にする技術。 その際に
Modern applications often consist of many small(er) services, which talk with each other using APIs. To make a good use of such architectures, the different services need to be able to scale individually. The service, which is under load should run in multiple instances. However, other services might not need to scale. In such situation you need some mechanism how to load balance a traffic between
There are a lot of article how to create Go REST microservice using several great web frameworks and/or routers. I read most of them when I was looking for the best approach for my Company. Suddenly I have found another and very interesting way how to develop HTTP/REST microservice. It is protobuf/gRPC framework from Google. I am sure everyone knows about it. Someone are using gRPC already. But I
この記事について GRPC は HTTP/2 の上に構築されているため、クライアントからサーバーのサービス呼び出しや、サーバーからクライアントへ戻り値やエラーの送信、といったやり取りは HTTP/2 のリクエストとレスポンスで実装されています(もうちょっと厳密に言うと HTTP/2 フレームを使って実装されている)。 この記事ではGo言語のGRPC実装(grpc-go)を用いて、以下についてまとめてみました。 GRPC が用いる HTTP/2 のリクエスト、レスポンスの流れと構造 その中でエラーがどう伝播されるか GRPC の Unary RPC のエラーハンドリング 扱いにちょっと悩む Streaming RPC のエラーハンドリング 環境等の情報 記事の作成に用いた環境: Go言語 : v1.15.6 grpc-go : v1.34.0 この記事で用いたソースコード grpc-erro
gRPC vs REST: Understanding gRPC, OpenAPI and REST and when to use them in API design As most software developers no doubt know, there are two primary models for API design: RPC and REST. Regardless of model, most modern APIs are implemented by mapping them in one way or another to the same HTTP protocol. It has also become common for RPC API designs to adopt one or two ideas from HTTP while stayi
AppEngine Standard Environmentでgrpc-gatewayが使いたいので、なんとかしたGoogleAppEngineswaggergRPCGoogleCloud AppEngineでgRPCを使う場合 ClientはTCP Socketが使えるので問題ないんですが、Serverに関してはFlexible Enviromentを利用しなければ利用できないのでなんとかStandard Enviromentで とりあえず 使う方法のメモ gRPCを使いたい理由 そもそもなんでgRPCが使いたいかというと APIを作るときにサーバーを作ったらそれに合わせてクライアントを実装するというのがよくとられる開発スタイルだと思うのですが 開発が進むに連れてサーバーとクライアントにズレが出てきてしまうことがあるかもしれません それを防ぐのに一番いい方法はサーバー作る人がクライアント
March 3, 2017 · 10 min · 2128 words · Benjamin Bengfort | Suggest Changes One of the primary requirements for the systems we build is something we call the “minimum security requirement”. Although our systems are not designed specifically for high security applications, they must use minimum standards of encryption and authentication. For example, it seems obvious to me that a web application that
私たち Google はこの 2 年間、gRPC に多大な投資を行ってきました。投資の対象は、このオープンソース フレームワーク自体と、gRPC ベースの API です。私たちは gRPC をマイクロサービスの基本要素としてだけでなく、多くのパブリック API(特に、レイテンシ許容度が低い API、双方向ストリーミングが必要な API、モバイル利用が多い API)の基本要素としても位置づけています。 そしてこのたび、gRPC API を定義して実行し、gRPC および JSON-HTTP/1.1 インターフェースを Google Cloud Endpoints によってクライアントに提供できるようになりました。 私たちが最近リリースした API の大半は、gRPC と JSON-HTTP/1.1 の両方のインターフェースを提供します。私たちは 2016 年 3 月に Cloud Pub/S
はじめに この記事は Google Cloud Japan Advent Calendar 2022 の「通常版」の 21 日目の記事です。 こんにちは、Google Cloud でデータベース系のプロダクトを担当している佐藤です。 TL;DR - 最初にまとめ 本記事では以下の内容が書かれています。今回は Cloud Spanner 用のアプリケーションの話で例示していますが、gRPC を使う他のアプリにも応用ができる内容になっています。 本記事の内容 アプリケーションが Cloud Spanner へ投げる SQL および mutation とパラメータは、gRPC レイヤーでまとめて取得することができる gRPC には Interceptor という、各 RPC のリクエストごとに任意の処理を割り込ませる仕組みがある Interceptor で Cloud Spanner 用のアプリ
本記事はRettyマイクロサービス強化月間の四つ目の記事です. engineer.retty.me RettyのtoB開発チームでエンジニアをしています鈴木です. 社会人エンジニアも早いことに1年が経ってしまい, “ピチピチエンジニア” の称号と権利を失ってしまいました. 今年は “深みと勢いのエンジニア” として活動しています. ピチピチエンジニアとして投稿した以前の記事では, その時おすすめの焼き芋を紹介したので今回も最近おすすめのお店としてMEARIを載せます. retty.me 今まで実家の焼き鳥が一番美味しいと思っていた自分に衝撃を与えたお店です. 早速本題に入りますが, RettyのtoB開発チームではtoC開発チームと同様にPHPで作られた大きいモノリスからGoで書かれたマイクロサービスへの移行が進んでいます. 現在, Rettyにおけるとても重要なシステムである予約APIの
gRPC-Web: Moving past REST+JSON towards type-safe Web APIs04.26.17 Michal Witkowski is Improbable’s Principal Tech Lead on SpatialOS and Marcus Longmuir is the Tech Lead of Improbable’s Webtools Team. REST+JSON is the de-facto standard way of building interactions between Web Apps and API servers. However, once you get past the initial ease of the prototyping phase, it shows problems with maintain
By Varun Talwar (Google) | Originally written by Varun Talwar with additional content by Kailash Sethuraman and others at Google. Tuesday, August 23, 2016 Today, the gRPC project has reached a significant milestone with its 1.0 release. Languages moving to 1.0 include C++, Java, Go, Node, Ruby, Python and C# across Linux, Windows, and Mac. Objective-C and Android Java support on iOS and Android is
goのgRPCで便利ツールを使うで紹介されているGo gRPC MiddlewareとGolang ProtoBuf Validator CompilerでgRPCのvalidationをします。 今回の例では、Userの年齢は負数にならない、電話番号やメールアドレスを正規表現でvalidationするといったことを実装します。 インストール Go gRPC Middlewareのインストール ❯ go get github.com/grpc-ecosystem/go-grpc-middleware Golang ProtoBuf Validator Compilerのインストール ❯ go get github.com/mwitkow/go-proto-validators/protoc-gen-govalidators もとになるサーバとクライアント protobufでgRPCを呼び出
For the past few months, my team has been working on a gRPC service. A few weeks back a new requirement came in: we needed a web portal to display some information. Since we already had a gRPC backend, the server side was sorted. But for the front-end, we had a few important choices to make. 1. Vue or React (We choose react) 2. REST or gRPC from the web portal If you don’t know what gRPC is you ca
作成者: James Newton-King gRPC は、高パフォーマンス サービス向けに設計されています。 このドキュメントでは、gRPC から最大限のパフォーマンスを得る方法について説明します。 gRPC チャネルを再利用する gRPC の呼び出しを行う場合は、gRPC チャネルを再利用する必要があります。 チャネルを再利用すると、既存の HTTP/2 接続を介して、呼び出しを多重化できます。 gRPC 呼び出しごとに新しいチャネルが作成された場合、完了までにかかる時間が大幅に増加する可能性があります。 呼び出しのたびに新しい HTTP/2 接続が作成されるため、クライアントとサーバーの間に次のような複数のネットワーク ラウンドトリップが必要になります。 ソケットを開く TCP 接続を確立する TLS ネゴシエーションを行う HTTP/2 接続を開始する gRPC 呼び出しを行う チ
これは Aizu Advent Calendar 2018 の 2 日目の記事です。 1 日目は @Ruto009 さんで、3 日目は @ayanoaizu さんです。 adventar.org gRPC-Web is GA! 今年の 10 月末に、gRPC-Web がついに GA (Generally Available) となり、メジャーリリースが行われました 🎉 grpc-web is GA! https://t.co/fnjHwgEWpe Grab it from https://t.co/DVThxsRh3i. Huge thanks to everyone who participated in making this possible!— gRPC (@grpcio) 2018年10月24日 grpc.io gRPC は、HTTP/2 ベースの RPC フレームワークで、I
※3つの方式ともに、シリアライゼーションには他の仕様を選択することも可能ですが、一般的なものを記載しています いずれかの方式に統一することもできますが、大規模なシステムに於いては、マイクロサービス間通信にgRPC、フロントエンドとの通信にGraphQL、外部公開するAPIにOpenAPIといったように、ユースケースに応じて使い分けるのも良いと思います。 gRPCを利用してみた感想ですが、パフォーマンスもさることながら、OpenAPIと比べて仕様が単純な分、IDLを元に生成される雛形(スタブ)の品質が高く複数言語での利用をスムーズに行うことができそうだと感じました。 gRPCの呼び出しスタイル gRPCの呼び出しスタイルには、単項RPCと3つ(サーバ/クライアント/双方向)のストリーミングRPCがあります。 詳しくはRPC life cycleをご覧ください。 本記事ではServer str
TL;DR grpc-go v1.64.0からDial()やDialContext()がDeprecatedとなった 代わりに推奨されたNewClient()を使うとbufconnを使っているテストがUnavailable(name resolver error: produced zero addresses)で落ちる 初期化として resolver.SetDefaultScheme("passthrough") を突っ込むと動くよ 原因 gRPCクライアントを作成する際、従来のDial(), DialContext()ではデフォルトのネームリゾルバーは passthrough として作成されます。 これがNewClient()からは dns になったためです。 bufconnは passthrough であることが前提で作られているためエラーになります。 rpc error: code
ども、大瀧です。 前回の記事(gRPCアプリをAWS ELBで負荷分散してみた)では、ELBのL4転送による負荷分散をご紹介しました。 この構成では手軽に負荷分散ができる一方で、ELBを介すためにサーバ側でクライアントのリモートIPを取得することができません。そこで今回は、ELBが サポートするPROXY ProtocolによってリクエストにリモートIPを付与し、それをgRPCサーバーで取得するサンプルコードをご紹介します。 PROXY Protocolの有効化 ELBのClassic Load BalancerはHAProxyのPROXY Protocol version 1をサポートしますが、既定では無効になっているため有効化します。aws elb create-load-balancer-policyコマンドでPROXY Protocolサポートが有効なポリシーを作成、aws elb
今年の4月頃にgRPCの独自認証周りを調べて、勉強がてらそれを使ってツールを作っていた。ものとしては、サーバー側でタスクを定義しておくとgRPC経由で実行させられるというもの。リポジトリは takaishi/alpette。 挙動としては、まずサーバー側で以下のようにタスクを定義する。 [[tasks]] name = "foo" command = "echo this is foo" [[tasks]] name = "bar" command = "echo this is bar" そして、クライアント側からタスクを指定するとgRPCでサーバーと通信、サーバーはタスクを実行、実行結果を返すというもの。 $ alpette run --task foo サーバーで何かするときにSSHすることが多いと思う。しかし、SSHだと実行者が持つ権限が結構大きい。適切に権限を設定すればよいのだけ
So you’ve bought into this whole RPC thing and want to try it out, but aren’t quite sure about Protocol Buffers. Your existing code encodes your own objects, or perhaps you have code that needs a particular encoding. What to do? Fortunately, gRPC is encoding agnostic! You can still get a lot of the benefits of gRPC without using Protobuf. In this post we’ll go through how to make gRPC work with ot
About iOSアプリからgRPCのServiceを呼び出す実験をしてみようと思ったのですが、CocoaPodsを利用した導入についての情報が意外とまとまっていなかったので、その流れをまとめておきます。 Protocol Buffersの定義から、Clientライブラリが自動的に生成される様子をお楽しみ下さい。 前提 gRPC自体の説明は割愛します。gRPC公式サイトなどを参照して下さい。 Xcode 7.3.1 CocoaPods 1.0.1 gRPC 1.0.0 サンプルコード iOSアプリ: https://github.com/hosopy/grpc-mobile-demo-ios gRPCサーバ: https://github.com/hosopy/grpc-mobile-demo-server プロジェクト名をGrpcMobileDemoとし、以下のような構成からスタートする
The document discusses Assembly Definition (asmdef) files in Unity. It begins by explaining that asmdef files are used to define Assembly configurations in a project. It notes some key points about asmdef files, including that they allow defining assemblies that can be referenced from other parts of a project. It also discusses different ways asmdef files can be structured, such as having one per
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く