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
5 years on air - Andrii Bereza
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
GDG Cherkasy
December 16, 2017
74
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
5 years on air - Andrii Bereza
Grpc Introduction
GDG Cherkasy
December 16, 2017
More Decks by GDG Cherkasy
See All by GDG Cherkasy
Трансформація від розробника до ліда: байки та поради.
gdgcherkasy
0
150
Емоції: усвідомлення, прийняття, комунікація
gdgcherkasy
0
150
Kibana Plugin Development - Vlad Bolibruk
gdgcherkasy
0
93
“Why JS is way to go for backend”
gdgcherkasy
0
96
CoreData, custom merge policy
gdgcherkasy
2
1.6k
macOS_for_iOS_devs2.pdf
gdgcherkasy
0
88
MQTT.pdf
gdgcherkasy
1
59
Инструменты Lean Product Management как точки пересечения проектов с "реальностью": хватит клонировать плохие решения!
gdgcherkasy
1
94
Насколько силен Иммунитет вашей организации?
gdgcherkasy
1
120
Featured
See All Featured
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
1.1k
Site-Speed That Sticks
csswizardry
13
1.5k
Become a Pro
speakerdeck
PRO
31
6.2k
jQuery: Nuts, Bolts and Bling
dougneiner
66
8.6k
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
460
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
2.1k
Practical Orchestrator
shlominoach
191
12k
The Pragmatic Product Professional
lauravandoore
37
7.4k
Rails Girls Zürich Keynote
gr2m
96
14k
Reality Check: Gamification 10 Years Later
codingconduct
0
2.3k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
3k
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
680
Transcript
None
gRPC
1. 2. 3.
★ ★ ★ ★ { "id": 1, "name": "Solaire of
Astora", "description": "Praise The gRPC!", "hollow": null }
gRPC
gRPC
gRPC
➢ ➢ ➢ ➢ gRPC
UI Logging Data Service Data Source 1 Data Source 2
gRPC
None
★ ★ ★ ★
gRPC
None
Describe (.proto) Implement (Server) Invoke (Client) Generate Code
message User { int32 id = 1; string name =
2; bool administrator = 3; } message name property type property name property index gRPC
service HelloService { rpc Hello(HelloRequest) returns (HelloResponse); } message HelloRequest
{ string name = 1; } message HelloResponse { string response = 1; } service name service method request type response type gRPC
None
class HelloService: HelloServiceImplBase() { } override fun hello(request: HelloRequest, responseObserver:
StreamObserver<HelloResponse>) { } responseObserver.onNext( HelloResponse.newBuilder() .setResponse("Hello, " + request.name) .build() ) responseObserver.onCompleted()
NettyServerBuilder.forPort(4444) .addService(HelloService()) .build() .start()
val channel = ManagedChannelBuilder.forAddress("localhost", 4444) .build(); val request = HelloRequest.newBuilder()
.setName("WALL-E") .build() val response = HelloServiceGrpc.newBlockingStub(channel) .hello(request) HelloServiceGrpc.newStub(channel) .hello(request, object: StreamObserver<HelloResponse> { override fun onNext(value: HelloResponse?) { println("I'm not alone!") } override fun onError(t: Throwable?) {} override fun onCompleted() {} })
None
➢ ➢ ➢
• • •
gRPC
• • • • • •