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
5 years on air - Andrii Bereza
Search
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
89
MQTT.pdf
gdgcherkasy
1
59
Инструменты Lean Product Management как точки пересечения проектов с "реальностью": хватит клонировать плохие решения!
gdgcherkasy
1
94
Насколько силен Иммунитет вашей организации?
gdgcherkasy
1
120
Featured
See All Featured
Git: the NoSQL Database
bkeepers
PRO
432
67k
SEO for Brand Visibility & Recognition
aleyda
0
4.7k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.9k
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
0
520
Accessibility Awareness
sabderemane
1
210
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
520
How to train your dragon (web standard)
notwaldorf
97
6.8k
Abbi's Birthday
coloredviolet
3
9.9k
Context Engineering - Making Every Token Count
addyosmani
9
1.1k
Ruling the World: When Life Gets Gamed
codingconduct
0
330
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
1
510
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.6k
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
• • • • • •