Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
gRPC for Android
Search
Daichi Furiya (Wasabeef)
August 08, 2015
Programming
7.4k
6
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
gRPC for Android
introduction to gRPC for Android
Daichi Furiya (Wasabeef)
August 08, 2015
More Decks by Daichi Furiya (Wasabeef)
See All by Daichi Furiya (Wasabeef)
DevFest Tokyo 2025 - Flutter のアプリアーキテクチャ現在地点
wasabeef
6
3k
About Flutter Architecture
wasabeef
1
340
2023 Flutter/Dart Summary
wasabeef
0
140
I/O Extended 2023 - Dart と Flutter の新機能
wasabeef
0
250
I/O Extended 2023 - Flutter 活用事例
wasabeef
10
3.1k
What it Takes to be a Flutter Developer
wasabeef
0
270
FlutterKaigi 2022 Keynote
wasabeef
1
760
Flutter Hooks を使ったアプリ開発 / App Development with the Flutter Hooks
wasabeef
2
1.6k
Flutter 2021 の振り返りと今後のアプリ開発に向けて / Looking back on Flutter 2021 and for future app development.
wasabeef
4
2.3k
Other Decks in Programming
See All in Programming
Java 27新機能 / Java 27 new features
kishida
2
190
半永久的に提供し続けられるプライベートクラウドを目指して ― 利用者の認知負荷を抑えるAPI抽象化とハードウェア世代交代の基盤設計
tomokon
0
380
UnityでSystem.Net.WebSocketsなWebSocketサーバが動かないのでUnity Monoのコードを覗いてみた / about implementing websocket server with unity mono
drumath2237
1
520
手動確認はもう限界 〜XCUITestでCustom URL Schemeの遷移を起動種別ごとに自動テストする〜 / Testing Custom URL Schemes with XCUITest
otouto
0
370
AI Agent時代のリアーキテクチャ戦略と実践
hokaccha
9
5.3k
re:Inventに行く前に知っておきたい現地参加のノウハウ
nokomoro3
0
300
Workers Cache を知る
syumai
0
320
C#の現在地 進化の歴史と、AI時代の.NET Everywhere
neuecc
5
4.8k
IBM Bob Dojo #1 仕様駆動開発入門
oniak3ibm
PRO
0
320
すこし踏み込む CancellationToken
htkym
2
1.5k
TiDB Cloudのカスタムコントローラーによるオートスケール対応
takaidohigasi
0
140
iOSDCのペンライトを自動制御したい!
akkeylab
0
340
Featured
See All Featured
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
610
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
470
Claude Code のすすめ
schroneko
67
230k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.4k
Building a Scalable Design System with Sketch
lauravandoore
464
34k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
62k
Odyssey Design
rkendrick25
PRO
2
850
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
1
620
The Cost Of JavaScript in 2023
addyosmani
55
10k
Docker and Python
trallard
47
4.2k
brightonSEO & MeasureFest 2025 - Winning Strategies for Black Friday CRO & PPC - Christian Goodrich
cargoodrich
3
860
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.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