Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
gRPC for Android
Search
Daichi Furiya (Wasabeef)
August 08, 2015
Programming
6
7.2k
gRPC for Android
introduction to gRPC for Android
Daichi Furiya (Wasabeef)
August 08, 2015
Tweet
Share
More Decks by Daichi Furiya (Wasabeef)
See All by Daichi Furiya (Wasabeef)
DevFest Tokyo 2025 - Flutter のアプリアーキテクチャ現在地点
wasabeef
6
2.6k
About Flutter Architecture
wasabeef
1
310
2023 Flutter/Dart Summary
wasabeef
0
120
I/O Extended 2023 - Dart と Flutter の新機能
wasabeef
0
220
I/O Extended 2023 - Flutter 活用事例
wasabeef
10
3.1k
What it Takes to be a Flutter Developer
wasabeef
0
230
FlutterKaigi 2022 Keynote
wasabeef
1
680
Flutter Hooks を使ったアプリ開発 / App Development with the Flutter Hooks
wasabeef
2
1.5k
Flutter 2021 の振り返りと今後のアプリ開発に向けて / Looking back on Flutter 2021 and for future app development.
wasabeef
4
2.2k
Other Decks in Programming
See All in Programming
Codex の「自走力」を高める
yorifuji
0
1.3k
存在論的プログラミング: 時間と存在を記述する
koriym
5
580
Claude Codeログ基盤の構築
giginet
PRO
7
3.8k
AI活用のコスパを最大化する方法
ochtum
0
350
最初からAWS CDKで技術検証してもいいんじゃない?
akihisaikeda
4
180
今からFlash開発できるわけないじゃん、ムリムリ! (※ムリじゃなかった!?)
arkw
0
170
Laravel Nightwatchの裏側 - Laravel公式Observabilityツールを支える設計と実装
avosalmon
1
270
ファインチューニングせずメインコンペを解く方法
pokutuna
0
220
野球解説AI Agentを開発してみた - 2026/02/27 LayerX社内LT会資料
shinyorke
PRO
0
370
Ruby and LLM Ecosystem 2nd
koic
1
1.4k
Linux Kernelの1文字のミスで 権限昇格ができた話
rqda
0
2.2k
AI 開発合宿を通して得た学び
niftycorp
PRO
0
180
Featured
See All Featured
Joys of Absence: A Defence of Solitary Play
codingconduct
1
330
What's in a price? How to price your products and services
michaelherold
247
13k
Building AI with AI
inesmontani
PRO
1
830
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
360
エンジニアに許された特別な時間の終わり
watany
106
240k
Accessibility Awareness
sabderemane
0
87
KATA
mclloyd
PRO
35
15k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
Fireside Chat
paigeccino
42
3.9k
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
500
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
95
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
1.9k
Transcript
H31$GPS"OESPJE !XBTBCFFG@KQ
"CPVU.F @wasabeef_jp CyberAgent, Inc.
8IBUJTH31$
)551
)551 • Binary • Multiplexed • Server Push • Header
compression
-BOHVBHFT
-BOHVBHFT • C/C++ • C# • Java • Go •
Objective-c • Node.js • PHP • Python • Ruby
8IBUJT 1SPUPDPM#VFST
1SPUPDPM#VFST • IDL • Binary • Support code generation (protoc)
VTFSKTPO { id: 1, name: “wasabeef”, createdAt: “20150808” }
VTFSQSPUP syntax = "proto3"; package user; message Profile { string
id = 1; string name = 2; int64 createdAt = 3; }
QSPUPCVG
*OTUBMM # git clone
[email protected]
:google/protobuf.git # cd protobuf # git
checkout v3.0.0-alpha-3.1 # ./autogen.sh # ./configure # make # make check # sudo make install
*OTUBMM # protoc --version libprotoc 3.0.0
3FUSPU
$POWFSUFS
$POWFSUFST • GSON • Jackson • Moshi • Protobuf •
Simplexml • Wire
1SPUP$POWFSUFS Retrofit retrofit = new Retrofit.Builder() .baseUrl("https://api.example.com") .converter(new ProtoConverter()) .build();
0UIFST • Wire (Square) • FlatBuffers (Google) • Message Pack
(Sadayuki Furuhashi)
6TFH31$
FDIPQSPUP syntax = "proto3"; option java_package = “jp.wasabeef.proto.echo”; option go_package
= "echo"; package echo; message EchoRequest { string message = 1; } message EchoReply { string message = 1; } service Echo { rpc Echo (EchoRequest) returns (EchoReply) {} }
$PEFHFOFSBUJPO • protobuf-gradle-plugin • (protoc) • (protoc-gen-grpc-java)
HSQDKBWB
%FQFOEFODJFT compile 'io.grpc:grpc-all:x.y.z'
TBNQMF AsyncSubject<String> subject = AsyncSubject.create(); new Thread(() -> { Channel
channel = OkHttpChannelBuilder.forAddress(“grpc.wasabeef.jp”, 8443) .setConnectionSpec(ConnectionSpec.MODERN_TLS) .sslSocketFactory((SSLSocketFactory)SSLSocketFactory.getDefault()) .build(); EchoGrpc.EchoBlockingStub stub = EchoGrpc.newBlockingStub(channel); Echo.EchoRequest req = new Echo.EchoRequest(); req.setMessage(“YES YES YES!"); Echo.EchoReply reply = stub.echo(req); subject.onNext(reply.getMessage()); subject.onCompleted(); }).start(); subject.observeOn(AndroidSchedulers.mainThread()).subscribe(msg -> { Log.d(“ECHO LOG” ,msg); });
HSQDDPNNPO
%PDVNFOUT https://github.com/grpc/grpc-common
UIBOLT