SlideShare une entreprise Scribd logo
1  sur  59
Télécharger pour lire hors ligne
WHAT THESE COMPANIES HAVE
IN COMMON?
POWER UP SERVICES WITH GRPC
BUILD YOUR MICROSERVICES THE RIGHT WAY
POWER UP SERVICES WITH GRPC
AGENDA
▸ How can we communicate our services currently?
▸ Protocol buffers
▸ Power up! GRPC explained
▸ Problems that might appear
▸ The summary - use cases, alternatives
POWER UP SERVICES WITH GRPC
WHOAMI?
Przemek Nowakowski @ TSH





fb.com/abuse.abuse





przemyslaw.nowakowski@thesoftwarehouse.pl





github.com/lapisangularis





keybase.io/lapisangularis
HOW OUR SERVICES
COMMUNICATE?
HOW DO WE MAKE WEB APIS?
SOAP
SOAP
HTTP + JSON
(REST)
HOW WE CAN COMMUNICATE OUR SERVICES CURRENTLY?
REST IS GREAT!
▸ Easy to understand
▸ Built on top of HTTP
▸ Easy debugging, with many tools to inspection and modification
▸ Server and Client are not much dependent on each other
▸ Popular amongst community
HOW WE CAN COMMUNICATE OUR SERVICES CURRENTLY?
BUT NOT ALWAYS…
▸ Streaming is difficult
▸ Bi-directional streaming is impossible
▸ Operations are difficult to model
▸ Hard to get many resources in one request
▸ Inefficient
THE SOLUTION IS GRPC…
WITH PROTOBUF
PROTOCOL BUFFERS
PROTOBUF
▸ Binary data serialization interface
▸ Developed by Google
▸ Definition language (IDL)
▸ Multi-platform support (JavaScript, Go, Python, Java, C++, etc.)
PROTOCOL BUFFERS
PROTOBUF WORKFLOW
Define Compile
Consume
1 2
3messages protoc nodejs
go
???
PROTOCOL BUFFERS
THE BASICS OF PROTOBUF - STATIC CODE GENERATION
▸ Install the protocol buffers compiler



$ brew install protobuf —devel

▸ Install protobuf runtime library for node



$ npm install google-protobuf
PROTOCOL BUFFERS
THE BASICS OF PROTOBUF - DYNAMIC AND STATIC CODE GENERATION
▸ Install the JS implementation of protobuf with typescript support



$ npm install protobufjs
PROTOCOL BUFFERS
DEFINING MESSAGES
▸ Messages are defined
in .proto files
▸ There are defined separate
messages for each data
structure you want to serialize.
▸ Every field has a name and type
▸ user.proto
PROTOCOL BUFFERS
DEFINING MESSAGES - ADVANCED EXAMPLE
▸ person.proto
PROTOCOL BUFFERS
DEFINING MESSAGES - AS A REFLECTION
▸ example.js
PROTOCOL BUFFERS
USAGE IN CODE
▸ example.js
PROTOCOL BUFFERS
CREATING MESSAGES FROM PROTO
▸ example.js
PROTOCOL BUFFERS
STATIC CODE GENERATION - COMMANDLINE TOOL
▸ Can be used to translate between file formats to generate static code as
well as TypeScript definitions.



$ pbjs -t static-module -w commonjs -o compiled.js file1.proto file2.proto
▸ Will generate static code with definitions of both proto files to a
CommonJS module
PROTOCOL BUFFERS
DYNAMIC OR STATIC?
▸ Dynamic is easy editable, no compile step, interoperable between
libraries, however there’s some parsing
▸ Static is hard to edit, no reflections, and there’s a compile step
▸ Not much difference in performance, with very small advantage for
static
PROTOCOL BUFFERS
SUMMARY
▸ Protobuf is just a serialization tool…
▸ … but with binary format it’s striking fast and lightweight
▸ It is great for using inside application, if strong-typed, fast and reliable
data exchange protocol is needed.
BUT WHERE IS MY WEB API IN IT?
IT’S GRPC TIME!
POWER UP! GRPC EXPLAINED
GRPC
▸ Remote procedure call system
▸ Developed by Google
▸ Uses HTTP/2 for transport, Protobuf as IDL
▸ You can call it a layer on top of Protobuf
▸ Manages a way client/server interacts
▸ Has support for authentication, streaming, flow control, etc.
▸ Multi-platform support (JavaScript, Go, Ruby, many others)
POWER UP! GRPC EXPLAINED
GRPC WORKFLOW
Define Compile1 2
messages protoc nodejs
go
???
Implement3
server
client
POWER UP! GRPC EXPLAINED
GRPC ARCHITECTURE
POWER UP! GRPC EXPLAINED
GRPC IMPLEMENTATIONS
▸ Three high performance implementations
▸ C
▸ Node.js, Ruby, Python, PHP, C family are bindings to C core
▸ PHP via PECL extension (nginx/php-fpm or apache)
▸ Java
▸ Go - pure implementation using Go stdlib crypto/tls package
POWER UP! GRPC EXPLAINED
A LITTLE BIT OF HISTORY
▸ Developed internally in Google in the beginning
▸ A successor of another internal Google project called „Stubby”
▸ Currently an open source project with many contributors, however still
mainly executed by Google
BACK TO THE CODE
POWER UP! GRPC EXPLAINED
THE BASICS OF GRPC
▸ Installation with Node.js



$ npm install grpc
POWER UP! GRPC EXPLAINED
BASICS OF GRPC - DEFINING PROTO
▸ example.proto
POWER UP! GRPC EXPLAINED
BASICS OF GRPC - CREATING SERVER
▸ server.js
POWER UP! GRPC EXPLAINED
BASICS OF GRPC - CREATING CLIENT
▸ client.js
POWER UP! GRPC EXPLAINED
STREAMING
▸ Server-side
▸ Client-side
▸ Bidirectional
POWER UP! GRPC EXPLAINED
SERVER SIDE STREAMING
▸ server.js
POWER UP! GRPC EXPLAINED
SERVER SIDE STREAMING
▸ client.js
POWER UP! GRPC EXPLAINED
CLIENT SIDE STREAMING
▸ server.js
POWER UP! GRPC EXPLAINED
CLIENT SIDE STREAMING
▸ client.js
POWER UP! GRPC EXPLAINED
BIDIRECTIONAL STREAMING
▸ server.js & client.js
THE PROBLEMS…
THE PROBLEMS…
THE PROBLEMS
▸ Load balancing
▸ Error handling is quite bad
▸ Breaking API changes
▸ Poor documentation for some languages
▸ No standardization across languages
▸ It’s not good for handling files
THE PROBLEMS…
HOW TO DEBUG GRPC?
▸ protoc-gen-lint - enforcing coding standards and catching basic errors
▸ grpcc - interact by CLI with gRPC server via its protobuf file. Good for
quick endpoint testing
▸ omgrpc - Postman for gRPC endpoints, with GUI
BUT WE TRIED IT BEFORE…
SUMMARY
WHAT ABOUT SOAP/WSDL?
▸ It’s completely attached to XML
▸ It lacks lightweight, pretty bad definition format
▸ Inflexible, with no forward compatibility
▸ Performance is bad and lacks of streaming…
▸ Clients were responsible for generating libraries
SUMMARY
WHAT ABOUT APACHE THRIFT?
▸ Similar project to gRPC
▸ Never achieved the same ease of use
SUMMARY
OK, SO WHERE IS THE PRODUCTION USE?
▸ Square - one of the first contributors to grpc. Replacement for all their
internal RPC
▸ CoreOS - production API for etc v3 is grpc
▸ Google - production APIs for Google Cloud Services
▸ Netflix, YikYak, VSCO, Cockroach and many more
SUMMARY
AND THAT’S GRPC
▸ Possibly the best framework for microservices communication
▸ Bright future, community active
▸ Many companies start using gRPC in their projects
QUESTIONS?
THIS IS THE END

Contenu connexe

Tendances

Inter-Process Communication in Microservices using gRPC
Inter-Process Communication in Microservices using gRPCInter-Process Communication in Microservices using gRPC
Inter-Process Communication in Microservices using gRPCShiju Varghese
 
Introduction to gRPC
Introduction to gRPCIntroduction to gRPC
Introduction to gRPCPrakash Divy
 
Introduction to gRPC: A general RPC framework that puts mobile and HTTP/2 fir...
Introduction to gRPC: A general RPC framework that puts mobile and HTTP/2 fir...Introduction to gRPC: A general RPC framework that puts mobile and HTTP/2 fir...
Introduction to gRPC: A general RPC framework that puts mobile and HTTP/2 fir...Codemotion
 
OpenAPI and gRPC Side by-Side
OpenAPI and gRPC Side by-SideOpenAPI and gRPC Side by-Side
OpenAPI and gRPC Side by-SideTim Burks
 
Robert Kubis - gRPC - boilerplate to high-performance scalable APIs - code.t...
 Robert Kubis - gRPC - boilerplate to high-performance scalable APIs - code.t... Robert Kubis - gRPC - boilerplate to high-performance scalable APIs - code.t...
Robert Kubis - gRPC - boilerplate to high-performance scalable APIs - code.t...AboutYouGmbH
 
The Patterns of Distributed Logging and Containers
The Patterns of Distributed Logging and ContainersThe Patterns of Distributed Logging and Containers
The Patterns of Distributed Logging and ContainersSATOSHI TAGOMORI
 
NGINX: Basics and Best Practices
NGINX: Basics and Best PracticesNGINX: Basics and Best Practices
NGINX: Basics and Best PracticesNGINX, Inc.
 
Deep dive into Kubernetes Networking
Deep dive into Kubernetes NetworkingDeep dive into Kubernetes Networking
Deep dive into Kubernetes NetworkingSreenivas Makam
 
What is gRPC introduction gRPC Explained
What is gRPC introduction gRPC ExplainedWhat is gRPC introduction gRPC Explained
What is gRPC introduction gRPC Explainedjeetendra mandal
 
Nginx A High Performance Load Balancer, Web Server & Reverse Proxy
Nginx A High Performance Load Balancer, Web Server & Reverse ProxyNginx A High Performance Load Balancer, Web Server & Reverse Proxy
Nginx A High Performance Load Balancer, Web Server & Reverse ProxyAmit Aggarwal
 
Load Balancing and Scaling with NGINX
Load Balancing and Scaling with NGINXLoad Balancing and Scaling with NGINX
Load Balancing and Scaling with NGINXNGINX, Inc.
 
NGINX Installation and Tuning
NGINX Installation and TuningNGINX Installation and Tuning
NGINX Installation and TuningNGINX, Inc.
 
Distributed Tracing in Practice
Distributed Tracing in PracticeDistributed Tracing in Practice
Distributed Tracing in PracticeDevOps.com
 

Tendances (20)

GRPC.pptx
GRPC.pptxGRPC.pptx
GRPC.pptx
 
gRPC
gRPCgRPC
gRPC
 
Inter-Process Communication in Microservices using gRPC
Inter-Process Communication in Microservices using gRPCInter-Process Communication in Microservices using gRPC
Inter-Process Communication in Microservices using gRPC
 
Introduction to gRPC
Introduction to gRPCIntroduction to gRPC
Introduction to gRPC
 
Introduction to gRPC: A general RPC framework that puts mobile and HTTP/2 fir...
Introduction to gRPC: A general RPC framework that puts mobile and HTTP/2 fir...Introduction to gRPC: A general RPC framework that puts mobile and HTTP/2 fir...
Introduction to gRPC: A general RPC framework that puts mobile and HTTP/2 fir...
 
gRPC with java
gRPC with javagRPC with java
gRPC with java
 
OpenAPI and gRPC Side by-Side
OpenAPI and gRPC Side by-SideOpenAPI and gRPC Side by-Side
OpenAPI and gRPC Side by-Side
 
gRPC
gRPC gRPC
gRPC
 
Robert Kubis - gRPC - boilerplate to high-performance scalable APIs - code.t...
 Robert Kubis - gRPC - boilerplate to high-performance scalable APIs - code.t... Robert Kubis - gRPC - boilerplate to high-performance scalable APIs - code.t...
Robert Kubis - gRPC - boilerplate to high-performance scalable APIs - code.t...
 
The Patterns of Distributed Logging and Containers
The Patterns of Distributed Logging and ContainersThe Patterns of Distributed Logging and Containers
The Patterns of Distributed Logging and Containers
 
Protocol Buffers
Protocol BuffersProtocol Buffers
Protocol Buffers
 
NGINX: Basics and Best Practices
NGINX: Basics and Best PracticesNGINX: Basics and Best Practices
NGINX: Basics and Best Practices
 
Protocol Buffers
Protocol BuffersProtocol Buffers
Protocol Buffers
 
Deep dive into Kubernetes Networking
Deep dive into Kubernetes NetworkingDeep dive into Kubernetes Networking
Deep dive into Kubernetes Networking
 
What is gRPC introduction gRPC Explained
What is gRPC introduction gRPC ExplainedWhat is gRPC introduction gRPC Explained
What is gRPC introduction gRPC Explained
 
Nginx A High Performance Load Balancer, Web Server & Reverse Proxy
Nginx A High Performance Load Balancer, Web Server & Reverse ProxyNginx A High Performance Load Balancer, Web Server & Reverse Proxy
Nginx A High Performance Load Balancer, Web Server & Reverse Proxy
 
Load Balancing and Scaling with NGINX
Load Balancing and Scaling with NGINXLoad Balancing and Scaling with NGINX
Load Balancing and Scaling with NGINX
 
NGINX Installation and Tuning
NGINX Installation and TuningNGINX Installation and Tuning
NGINX Installation and Tuning
 
Nginx
NginxNginx
Nginx
 
Distributed Tracing in Practice
Distributed Tracing in PracticeDistributed Tracing in Practice
Distributed Tracing in Practice
 

Similaire à Power-up services with gRPC

Building and Scaling a WebSockets Pubsub System
Building and Scaling a WebSockets Pubsub SystemBuilding and Scaling a WebSockets Pubsub System
Building and Scaling a WebSockets Pubsub SystemKapil Reddy
 
Page Performance
Page PerformancePage Performance
Page Performancestk_jj
 
Grunt, Gulp & fabs: Build Systems and Development-Workflow for Modern Web-App...
Grunt, Gulp & fabs: Build Systems and Development-Workflow for Modern Web-App...Grunt, Gulp & fabs: Build Systems and Development-Workflow for Modern Web-App...
Grunt, Gulp & fabs: Build Systems and Development-Workflow for Modern Web-App...Philipp Burgmer
 
Node.JS Expreee.JS scale webapp on Google cloud
Node.JS Expreee.JS scale webapp on Google cloudNode.JS Expreee.JS scale webapp on Google cloud
Node.JS Expreee.JS scale webapp on Google cloudJimish Parekh
 
Intro React Server-Side Rendering
Intro React Server-Side Rendering Intro React Server-Side Rendering
Intro React Server-Side Rendering Erwin van der Koogh
 
Serverless Chicago - Datomic Cloud and AWS AppSync - April 26 2018
Serverless Chicago - Datomic Cloud and AWS AppSync - April 26 2018Serverless Chicago - Datomic Cloud and AWS AppSync - April 26 2018
Serverless Chicago - Datomic Cloud and AWS AppSync - April 26 2018ChrisJohnsonBidler
 
stackconf 2020 | The path to a Serverless-native era with Kubernetes by Paolo...
stackconf 2020 | The path to a Serverless-native era with Kubernetes by Paolo...stackconf 2020 | The path to a Serverless-native era with Kubernetes by Paolo...
stackconf 2020 | The path to a Serverless-native era with Kubernetes by Paolo...NETWAYS
 
Lambda Architectures in Practice
Lambda Architectures in PracticeLambda Architectures in Practice
Lambda Architectures in PracticeC4Media
 
Brujug Jenkins pipeline scalability
Brujug Jenkins pipeline scalabilityBrujug Jenkins pipeline scalability
Brujug Jenkins pipeline scalabilityDamien Coraboeuf
 
JavaScript for Enterprise Applications
JavaScript for Enterprise ApplicationsJavaScript for Enterprise Applications
JavaScript for Enterprise ApplicationsPiyush Katariya
 
Micro Service Architecture
Micro Service ArchitectureMicro Service Architecture
Micro Service ArchitectureEduards Sizovs
 
Better and Faster: A Journey Toward Clean Code and Enjoyment
Better and Faster: A Journey Toward Clean Code and EnjoymentBetter and Faster: A Journey Toward Clean Code and Enjoyment
Better and Faster: A Journey Toward Clean Code and EnjoymentChris Holland
 
Driving containerd operations with gRPC
Driving containerd operations with gRPCDriving containerd operations with gRPC
Driving containerd operations with gRPCDocker, Inc.
 
Mongo Seattle - The Business of MongoDB
Mongo Seattle - The Business of MongoDBMongo Seattle - The Business of MongoDB
Mongo Seattle - The Business of MongoDBJustin Smestad
 
Document-Driven transactions
Document-Driven transactionsDocument-Driven transactions
Document-Driven transactionsPedro Teixeira
 
REST in Peace. Long live gRPC! @ Codineers
REST in Peace. Long live gRPC! @ CodineersREST in Peace. Long live gRPC! @ Codineers
REST in Peace. Long live gRPC! @ CodineersQAware GmbH
 
gRPC or Rest, why not both?
gRPC or Rest, why not both?gRPC or Rest, why not both?
gRPC or Rest, why not both?Mohammad Murad
 
Grunt.js and Yeoman, Continous Integration
Grunt.js and Yeoman, Continous IntegrationGrunt.js and Yeoman, Continous Integration
Grunt.js and Yeoman, Continous IntegrationDavid Amend
 

Similaire à Power-up services with gRPC (20)

Universal react
Universal reactUniversal react
Universal react
 
Building and Scaling a WebSockets Pubsub System
Building and Scaling a WebSockets Pubsub SystemBuilding and Scaling a WebSockets Pubsub System
Building and Scaling a WebSockets Pubsub System
 
Page Performance
Page PerformancePage Performance
Page Performance
 
Grunt, Gulp & fabs: Build Systems and Development-Workflow for Modern Web-App...
Grunt, Gulp & fabs: Build Systems and Development-Workflow for Modern Web-App...Grunt, Gulp & fabs: Build Systems and Development-Workflow for Modern Web-App...
Grunt, Gulp & fabs: Build Systems and Development-Workflow for Modern Web-App...
 
Node.JS Expreee.JS scale webapp on Google cloud
Node.JS Expreee.JS scale webapp on Google cloudNode.JS Expreee.JS scale webapp on Google cloud
Node.JS Expreee.JS scale webapp on Google cloud
 
Intro React Server-Side Rendering
Intro React Server-Side Rendering Intro React Server-Side Rendering
Intro React Server-Side Rendering
 
Serverless Chicago - Datomic Cloud and AWS AppSync - April 26 2018
Serverless Chicago - Datomic Cloud and AWS AppSync - April 26 2018Serverless Chicago - Datomic Cloud and AWS AppSync - April 26 2018
Serverless Chicago - Datomic Cloud and AWS AppSync - April 26 2018
 
stackconf 2020 | The path to a Serverless-native era with Kubernetes by Paolo...
stackconf 2020 | The path to a Serverless-native era with Kubernetes by Paolo...stackconf 2020 | The path to a Serverless-native era with Kubernetes by Paolo...
stackconf 2020 | The path to a Serverless-native era with Kubernetes by Paolo...
 
Lambda Architectures in Practice
Lambda Architectures in PracticeLambda Architectures in Practice
Lambda Architectures in Practice
 
Brujug Jenkins pipeline scalability
Brujug Jenkins pipeline scalabilityBrujug Jenkins pipeline scalability
Brujug Jenkins pipeline scalability
 
JavaScript for Enterprise Applications
JavaScript for Enterprise ApplicationsJavaScript for Enterprise Applications
JavaScript for Enterprise Applications
 
Micro Service Architecture
Micro Service ArchitectureMicro Service Architecture
Micro Service Architecture
 
Better and Faster: A Journey Toward Clean Code and Enjoyment
Better and Faster: A Journey Toward Clean Code and EnjoymentBetter and Faster: A Journey Toward Clean Code and Enjoyment
Better and Faster: A Journey Toward Clean Code and Enjoyment
 
Driving containerd operations with gRPC
Driving containerd operations with gRPCDriving containerd operations with gRPC
Driving containerd operations with gRPC
 
Mongo Seattle - The Business of MongoDB
Mongo Seattle - The Business of MongoDBMongo Seattle - The Business of MongoDB
Mongo Seattle - The Business of MongoDB
 
Document-Driven transactions
Document-Driven transactionsDocument-Driven transactions
Document-Driven transactions
 
REST in Peace. Long live gRPC! @ Codineers
REST in Peace. Long live gRPC! @ CodineersREST in Peace. Long live gRPC! @ Codineers
REST in Peace. Long live gRPC! @ Codineers
 
gRPC or Rest, why not both?
gRPC or Rest, why not both?gRPC or Rest, why not both?
gRPC or Rest, why not both?
 
Gatling
GatlingGatling
Gatling
 
Grunt.js and Yeoman, Continous Integration
Grunt.js and Yeoman, Continous IntegrationGrunt.js and Yeoman, Continous Integration
Grunt.js and Yeoman, Continous Integration
 

Plus de The Software House

Jak kraść miliony, czyli o błędach bezpieczeństwa, które mogą spotkać również...
Jak kraść miliony, czyli o błędach bezpieczeństwa, które mogą spotkać również...Jak kraść miliony, czyli o błędach bezpieczeństwa, które mogą spotkać również...
Jak kraść miliony, czyli o błędach bezpieczeństwa, które mogą spotkać również...The Software House
 
Jak efektywnie podejść do certyfikacji w AWS?
Jak efektywnie podejść do certyfikacji w AWS?Jak efektywnie podejść do certyfikacji w AWS?
Jak efektywnie podejść do certyfikacji w AWS?The Software House
 
O co chodzi z tą dostępnością cyfrową?
O co chodzi z tą dostępnością cyfrową?O co chodzi z tą dostępnością cyfrową?
O co chodzi z tą dostępnością cyfrową?The Software House
 
Chat tekstowy z użyciem Amazon Chime
Chat tekstowy z użyciem Amazon ChimeChat tekstowy z użyciem Amazon Chime
Chat tekstowy z użyciem Amazon ChimeThe Software House
 
Jak nie zwariować z architekturą Serverless?
Jak nie zwariować z architekturą Serverless?Jak nie zwariować z architekturą Serverless?
Jak nie zwariować z architekturą Serverless?The Software House
 
Analiza semantyczna artykułów prasowych w 5 sprintów z użyciem AWS
Analiza semantyczna artykułów prasowych w 5 sprintów z użyciem AWSAnaliza semantyczna artykułów prasowych w 5 sprintów z użyciem AWS
Analiza semantyczna artykułów prasowych w 5 sprintów z użyciem AWSThe Software House
 
Feature flags na ratunek projektu w JavaScript
Feature flags na ratunek projektu w JavaScriptFeature flags na ratunek projektu w JavaScript
Feature flags na ratunek projektu w JavaScriptThe Software House
 
Typowanie nominalne w TypeScript
Typowanie nominalne w TypeScriptTypowanie nominalne w TypeScript
Typowanie nominalne w TypeScriptThe Software House
 
Automatyzacja tworzenia frontendu z wykorzystaniem GraphQL
Automatyzacja tworzenia frontendu z wykorzystaniem GraphQLAutomatyzacja tworzenia frontendu z wykorzystaniem GraphQL
Automatyzacja tworzenia frontendu z wykorzystaniem GraphQLThe Software House
 
Serverless Compose vs hurtownia danych
Serverless Compose vs hurtownia danychServerless Compose vs hurtownia danych
Serverless Compose vs hurtownia danychThe Software House
 
Testy API: połączenie z bazą danych czy implementacja w pamięci
Testy API: połączenie z bazą danych czy implementacja w pamięciTesty API: połączenie z bazą danych czy implementacja w pamięci
Testy API: połączenie z bazą danych czy implementacja w pamięciThe Software House
 
Jak skutecznie read model. Case study
Jak skutecznie read model. Case studyJak skutecznie read model. Case study
Jak skutecznie read model. Case studyThe Software House
 
Firestore czyli ognista baza od giganta z Doliny Krzemowej
Firestore czyli ognista baza od giganta z Doliny KrzemowejFirestore czyli ognista baza od giganta z Doliny Krzemowej
Firestore czyli ognista baza od giganta z Doliny KrzemowejThe Software House
 
Jak utrzymać stado Lambd w ryzach
Jak utrzymać stado Lambd w ryzachJak utrzymać stado Lambd w ryzach
Jak utrzymać stado Lambd w ryzachThe Software House
 
O łączeniu Storyblok i Next.js
O łączeniu Storyblok i Next.jsO łączeniu Storyblok i Next.js
O łączeniu Storyblok i Next.jsThe Software House
 
Amazon Step Functions. Sposób na implementację procesów w chmurze
Amazon Step Functions. Sposób na implementację procesów w chmurzeAmazon Step Functions. Sposób na implementację procesów w chmurze
Amazon Step Functions. Sposób na implementację procesów w chmurzeThe Software House
 
Od Figmy do gotowej aplikacji bez linijki kodu
Od Figmy do gotowej aplikacji bez linijki koduOd Figmy do gotowej aplikacji bez linijki kodu
Od Figmy do gotowej aplikacji bez linijki koduThe Software House
 

Plus de The Software House (20)

Jak kraść miliony, czyli o błędach bezpieczeństwa, które mogą spotkać również...
Jak kraść miliony, czyli o błędach bezpieczeństwa, które mogą spotkać również...Jak kraść miliony, czyli o błędach bezpieczeństwa, które mogą spotkać również...
Jak kraść miliony, czyli o błędach bezpieczeństwa, które mogą spotkać również...
 
Uszanowanko Podsumowanko
Uszanowanko PodsumowankoUszanowanko Podsumowanko
Uszanowanko Podsumowanko
 
Jak efektywnie podejść do certyfikacji w AWS?
Jak efektywnie podejść do certyfikacji w AWS?Jak efektywnie podejść do certyfikacji w AWS?
Jak efektywnie podejść do certyfikacji w AWS?
 
O co chodzi z tą dostępnością cyfrową?
O co chodzi z tą dostępnością cyfrową?O co chodzi z tą dostępnością cyfrową?
O co chodzi z tą dostępnością cyfrową?
 
Chat tekstowy z użyciem Amazon Chime
Chat tekstowy z użyciem Amazon ChimeChat tekstowy z użyciem Amazon Chime
Chat tekstowy z użyciem Amazon Chime
 
Migracje danych serverless
Migracje danych serverlessMigracje danych serverless
Migracje danych serverless
 
Jak nie zwariować z architekturą Serverless?
Jak nie zwariować z architekturą Serverless?Jak nie zwariować z architekturą Serverless?
Jak nie zwariować z architekturą Serverless?
 
Analiza semantyczna artykułów prasowych w 5 sprintów z użyciem AWS
Analiza semantyczna artykułów prasowych w 5 sprintów z użyciem AWSAnaliza semantyczna artykułów prasowych w 5 sprintów z użyciem AWS
Analiza semantyczna artykułów prasowych w 5 sprintów z użyciem AWS
 
Feature flags na ratunek projektu w JavaScript
Feature flags na ratunek projektu w JavaScriptFeature flags na ratunek projektu w JavaScript
Feature flags na ratunek projektu w JavaScript
 
Typowanie nominalne w TypeScript
Typowanie nominalne w TypeScriptTypowanie nominalne w TypeScript
Typowanie nominalne w TypeScript
 
Automatyzacja tworzenia frontendu z wykorzystaniem GraphQL
Automatyzacja tworzenia frontendu z wykorzystaniem GraphQLAutomatyzacja tworzenia frontendu z wykorzystaniem GraphQL
Automatyzacja tworzenia frontendu z wykorzystaniem GraphQL
 
Serverless Compose vs hurtownia danych
Serverless Compose vs hurtownia danychServerless Compose vs hurtownia danych
Serverless Compose vs hurtownia danych
 
Testy API: połączenie z bazą danych czy implementacja w pamięci
Testy API: połączenie z bazą danych czy implementacja w pamięciTesty API: połączenie z bazą danych czy implementacja w pamięci
Testy API: połączenie z bazą danych czy implementacja w pamięci
 
Jak skutecznie read model. Case study
Jak skutecznie read model. Case studyJak skutecznie read model. Case study
Jak skutecznie read model. Case study
 
Firestore czyli ognista baza od giganta z Doliny Krzemowej
Firestore czyli ognista baza od giganta z Doliny KrzemowejFirestore czyli ognista baza od giganta z Doliny Krzemowej
Firestore czyli ognista baza od giganta z Doliny Krzemowej
 
Jak utrzymać stado Lambd w ryzach
Jak utrzymać stado Lambd w ryzachJak utrzymać stado Lambd w ryzach
Jak utrzymać stado Lambd w ryzach
 
Jak poskromić AWS?
Jak poskromić AWS?Jak poskromić AWS?
Jak poskromić AWS?
 
O łączeniu Storyblok i Next.js
O łączeniu Storyblok i Next.jsO łączeniu Storyblok i Next.js
O łączeniu Storyblok i Next.js
 
Amazon Step Functions. Sposób na implementację procesów w chmurze
Amazon Step Functions. Sposób na implementację procesów w chmurzeAmazon Step Functions. Sposób na implementację procesów w chmurze
Amazon Step Functions. Sposób na implementację procesów w chmurze
 
Od Figmy do gotowej aplikacji bez linijki kodu
Od Figmy do gotowej aplikacji bez linijki koduOd Figmy do gotowej aplikacji bez linijki kodu
Od Figmy do gotowej aplikacji bez linijki kodu
 

Dernier

best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...
best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...
best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...kajalverma014
 
Wagholi & High Class Call Girls Pune Neha 8005736733 | 100% Gennuine High Cla...
Wagholi & High Class Call Girls Pune Neha 8005736733 | 100% Gennuine High Cla...Wagholi & High Class Call Girls Pune Neha 8005736733 | 100% Gennuine High Cla...
Wagholi & High Class Call Girls Pune Neha 8005736733 | 100% Gennuine High Cla...SUHANI PANDEY
 
Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...
Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...
Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...SUHANI PANDEY
 
Nanded City ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready ...
Nanded City ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready ...Nanded City ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready ...
Nanded City ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready ...tanu pandey
 
Call Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service Available
Call Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service AvailableCall Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service Available
Call Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service AvailableSeo
 
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...APNIC
 
Lucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRL
Lucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRLLucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRL
Lucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRLimonikaupta
 
Russian Call Girls Pune (Adult Only) 8005736733 Escort Service 24x7 Cash Pay...
Russian Call Girls Pune  (Adult Only) 8005736733 Escort Service 24x7 Cash Pay...Russian Call Girls Pune  (Adult Only) 8005736733 Escort Service 24x7 Cash Pay...
Russian Call Girls Pune (Adult Only) 8005736733 Escort Service 24x7 Cash Pay...SUHANI PANDEY
 
➥🔝 7737669865 🔝▻ mehsana Call-girls in Women Seeking Men 🔝mehsana🔝 Escorts...
➥🔝 7737669865 🔝▻ mehsana Call-girls in Women Seeking Men  🔝mehsana🔝   Escorts...➥🔝 7737669865 🔝▻ mehsana Call-girls in Women Seeking Men  🔝mehsana🔝   Escorts...
➥🔝 7737669865 🔝▻ mehsana Call-girls in Women Seeking Men 🔝mehsana🔝 Escorts...nirzagarg
 
"Boost Your Digital Presence: Partner with a Leading SEO Agency"
"Boost Your Digital Presence: Partner with a Leading SEO Agency""Boost Your Digital Presence: Partner with a Leading SEO Agency"
"Boost Your Digital Presence: Partner with a Leading SEO Agency"growthgrids
 
Pirangut | Call Girls Pune Phone No 8005736733 Elite Escort Service Available...
Pirangut | Call Girls Pune Phone No 8005736733 Elite Escort Service Available...Pirangut | Call Girls Pune Phone No 8005736733 Elite Escort Service Available...
Pirangut | Call Girls Pune Phone No 8005736733 Elite Escort Service Available...SUHANI PANDEY
 
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
2nd Solid Symposium: Solid Pods vs Personal Knowledge GraphsEleniIlkou
 
Shikrapur - Call Girls in Pune Neha 8005736733 | 100% Gennuine High Class Ind...
Shikrapur - Call Girls in Pune Neha 8005736733 | 100% Gennuine High Class Ind...Shikrapur - Call Girls in Pune Neha 8005736733 | 100% Gennuine High Class Ind...
Shikrapur - Call Girls in Pune Neha 8005736733 | 100% Gennuine High Class Ind...SUHANI PANDEY
 
Call Girls Sangvi Call Me 7737669865 Budget Friendly No Advance BookingCall G...
Call Girls Sangvi Call Me 7737669865 Budget Friendly No Advance BookingCall G...Call Girls Sangvi Call Me 7737669865 Budget Friendly No Advance BookingCall G...
Call Girls Sangvi Call Me 7737669865 Budget Friendly No Advance BookingCall G...roncy bisnoi
 
20240510 QFM016 Irresponsible AI Reading List April 2024.pdf
20240510 QFM016 Irresponsible AI Reading List April 2024.pdf20240510 QFM016 Irresponsible AI Reading List April 2024.pdf
20240510 QFM016 Irresponsible AI Reading List April 2024.pdfMatthew Sinclair
 
💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋
💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋
💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋nirzagarg
 
VIP Model Call Girls NIBM ( Pune ) Call ON 8005736733 Starting From 5K to 25K...
VIP Model Call Girls NIBM ( Pune ) Call ON 8005736733 Starting From 5K to 25K...VIP Model Call Girls NIBM ( Pune ) Call ON 8005736733 Starting From 5K to 25K...
VIP Model Call Girls NIBM ( Pune ) Call ON 8005736733 Starting From 5K to 25K...SUHANI PANDEY
 

Dernier (20)

best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...
best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...
best call girls in Hyderabad Finest Escorts Service 📞 9352988975 📞 Available ...
 
Wagholi & High Class Call Girls Pune Neha 8005736733 | 100% Gennuine High Cla...
Wagholi & High Class Call Girls Pune Neha 8005736733 | 100% Gennuine High Cla...Wagholi & High Class Call Girls Pune Neha 8005736733 | 100% Gennuine High Cla...
Wagholi & High Class Call Girls Pune Neha 8005736733 | 100% Gennuine High Cla...
 
6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...
6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...
6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...
 
📱Dehradun Call Girls Service 📱☎️ +91'905,3900,678 ☎️📱 Call Girls In Dehradun 📱
📱Dehradun Call Girls Service 📱☎️ +91'905,3900,678 ☎️📱 Call Girls In Dehradun 📱📱Dehradun Call Girls Service 📱☎️ +91'905,3900,678 ☎️📱 Call Girls In Dehradun 📱
📱Dehradun Call Girls Service 📱☎️ +91'905,3900,678 ☎️📱 Call Girls In Dehradun 📱
 
Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...
Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...
Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...
 
valsad Escorts Service ☎️ 6378878445 ( Sakshi Sinha ) High Profile Call Girls...
valsad Escorts Service ☎️ 6378878445 ( Sakshi Sinha ) High Profile Call Girls...valsad Escorts Service ☎️ 6378878445 ( Sakshi Sinha ) High Profile Call Girls...
valsad Escorts Service ☎️ 6378878445 ( Sakshi Sinha ) High Profile Call Girls...
 
Nanded City ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready ...
Nanded City ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready ...Nanded City ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready ...
Nanded City ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready ...
 
Call Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service Available
Call Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service AvailableCall Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service Available
Call Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service Available
 
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...
APNIC Policy Roundup, presented by Sunny Chendi at the 5th ICANN APAC-TWNIC E...
 
Lucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRL
Lucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRLLucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRL
Lucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRL
 
Russian Call Girls Pune (Adult Only) 8005736733 Escort Service 24x7 Cash Pay...
Russian Call Girls Pune  (Adult Only) 8005736733 Escort Service 24x7 Cash Pay...Russian Call Girls Pune  (Adult Only) 8005736733 Escort Service 24x7 Cash Pay...
Russian Call Girls Pune (Adult Only) 8005736733 Escort Service 24x7 Cash Pay...
 
➥🔝 7737669865 🔝▻ mehsana Call-girls in Women Seeking Men 🔝mehsana🔝 Escorts...
➥🔝 7737669865 🔝▻ mehsana Call-girls in Women Seeking Men  🔝mehsana🔝   Escorts...➥🔝 7737669865 🔝▻ mehsana Call-girls in Women Seeking Men  🔝mehsana🔝   Escorts...
➥🔝 7737669865 🔝▻ mehsana Call-girls in Women Seeking Men 🔝mehsana🔝 Escorts...
 
"Boost Your Digital Presence: Partner with a Leading SEO Agency"
"Boost Your Digital Presence: Partner with a Leading SEO Agency""Boost Your Digital Presence: Partner with a Leading SEO Agency"
"Boost Your Digital Presence: Partner with a Leading SEO Agency"
 
Pirangut | Call Girls Pune Phone No 8005736733 Elite Escort Service Available...
Pirangut | Call Girls Pune Phone No 8005736733 Elite Escort Service Available...Pirangut | Call Girls Pune Phone No 8005736733 Elite Escort Service Available...
Pirangut | Call Girls Pune Phone No 8005736733 Elite Escort Service Available...
 
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
 
Shikrapur - Call Girls in Pune Neha 8005736733 | 100% Gennuine High Class Ind...
Shikrapur - Call Girls in Pune Neha 8005736733 | 100% Gennuine High Class Ind...Shikrapur - Call Girls in Pune Neha 8005736733 | 100% Gennuine High Class Ind...
Shikrapur - Call Girls in Pune Neha 8005736733 | 100% Gennuine High Class Ind...
 
Call Girls Sangvi Call Me 7737669865 Budget Friendly No Advance BookingCall G...
Call Girls Sangvi Call Me 7737669865 Budget Friendly No Advance BookingCall G...Call Girls Sangvi Call Me 7737669865 Budget Friendly No Advance BookingCall G...
Call Girls Sangvi Call Me 7737669865 Budget Friendly No Advance BookingCall G...
 
20240510 QFM016 Irresponsible AI Reading List April 2024.pdf
20240510 QFM016 Irresponsible AI Reading List April 2024.pdf20240510 QFM016 Irresponsible AI Reading List April 2024.pdf
20240510 QFM016 Irresponsible AI Reading List April 2024.pdf
 
💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋
💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋
💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋
 
VIP Model Call Girls NIBM ( Pune ) Call ON 8005736733 Starting From 5K to 25K...
VIP Model Call Girls NIBM ( Pune ) Call ON 8005736733 Starting From 5K to 25K...VIP Model Call Girls NIBM ( Pune ) Call ON 8005736733 Starting From 5K to 25K...
VIP Model Call Girls NIBM ( Pune ) Call ON 8005736733 Starting From 5K to 25K...
 

Power-up services with gRPC

  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7. WHAT THESE COMPANIES HAVE IN COMMON?
  • 8.
  • 9. POWER UP SERVICES WITH GRPC BUILD YOUR MICROSERVICES THE RIGHT WAY
  • 10. POWER UP SERVICES WITH GRPC AGENDA ▸ How can we communicate our services currently? ▸ Protocol buffers ▸ Power up! GRPC explained ▸ Problems that might appear ▸ The summary - use cases, alternatives
  • 11. POWER UP SERVICES WITH GRPC WHOAMI? Przemek Nowakowski @ TSH
 
 
 fb.com/abuse.abuse
 
 
 przemyslaw.nowakowski@thesoftwarehouse.pl
 
 
 github.com/lapisangularis
 
 
 keybase.io/lapisangularis
  • 13. HOW DO WE MAKE WEB APIS?
  • 14. SOAP
  • 15. SOAP
  • 16.
  • 18. HOW WE CAN COMMUNICATE OUR SERVICES CURRENTLY? REST IS GREAT! ▸ Easy to understand ▸ Built on top of HTTP ▸ Easy debugging, with many tools to inspection and modification ▸ Server and Client are not much dependent on each other ▸ Popular amongst community
  • 19. HOW WE CAN COMMUNICATE OUR SERVICES CURRENTLY? BUT NOT ALWAYS… ▸ Streaming is difficult ▸ Bi-directional streaming is impossible ▸ Operations are difficult to model ▸ Hard to get many resources in one request ▸ Inefficient
  • 20. THE SOLUTION IS GRPC… WITH PROTOBUF
  • 21. PROTOCOL BUFFERS PROTOBUF ▸ Binary data serialization interface ▸ Developed by Google ▸ Definition language (IDL) ▸ Multi-platform support (JavaScript, Go, Python, Java, C++, etc.)
  • 22. PROTOCOL BUFFERS PROTOBUF WORKFLOW Define Compile Consume 1 2 3messages protoc nodejs go ???
  • 23. PROTOCOL BUFFERS THE BASICS OF PROTOBUF - STATIC CODE GENERATION ▸ Install the protocol buffers compiler
 
 $ brew install protobuf —devel
 ▸ Install protobuf runtime library for node
 
 $ npm install google-protobuf
  • 24. PROTOCOL BUFFERS THE BASICS OF PROTOBUF - DYNAMIC AND STATIC CODE GENERATION ▸ Install the JS implementation of protobuf with typescript support
 
 $ npm install protobufjs
  • 25. PROTOCOL BUFFERS DEFINING MESSAGES ▸ Messages are defined in .proto files ▸ There are defined separate messages for each data structure you want to serialize. ▸ Every field has a name and type ▸ user.proto
  • 26. PROTOCOL BUFFERS DEFINING MESSAGES - ADVANCED EXAMPLE ▸ person.proto
  • 27. PROTOCOL BUFFERS DEFINING MESSAGES - AS A REFLECTION ▸ example.js
  • 28. PROTOCOL BUFFERS USAGE IN CODE ▸ example.js
  • 29. PROTOCOL BUFFERS CREATING MESSAGES FROM PROTO ▸ example.js
  • 30. PROTOCOL BUFFERS STATIC CODE GENERATION - COMMANDLINE TOOL ▸ Can be used to translate between file formats to generate static code as well as TypeScript definitions.
 
 $ pbjs -t static-module -w commonjs -o compiled.js file1.proto file2.proto ▸ Will generate static code with definitions of both proto files to a CommonJS module
  • 31. PROTOCOL BUFFERS DYNAMIC OR STATIC? ▸ Dynamic is easy editable, no compile step, interoperable between libraries, however there’s some parsing ▸ Static is hard to edit, no reflections, and there’s a compile step ▸ Not much difference in performance, with very small advantage for static
  • 32. PROTOCOL BUFFERS SUMMARY ▸ Protobuf is just a serialization tool… ▸ … but with binary format it’s striking fast and lightweight ▸ It is great for using inside application, if strong-typed, fast and reliable data exchange protocol is needed.
  • 33. BUT WHERE IS MY WEB API IN IT?
  • 35. POWER UP! GRPC EXPLAINED GRPC ▸ Remote procedure call system ▸ Developed by Google ▸ Uses HTTP/2 for transport, Protobuf as IDL ▸ You can call it a layer on top of Protobuf ▸ Manages a way client/server interacts ▸ Has support for authentication, streaming, flow control, etc. ▸ Multi-platform support (JavaScript, Go, Ruby, many others)
  • 36. POWER UP! GRPC EXPLAINED GRPC WORKFLOW Define Compile1 2 messages protoc nodejs go ??? Implement3 server client
  • 37. POWER UP! GRPC EXPLAINED GRPC ARCHITECTURE
  • 38. POWER UP! GRPC EXPLAINED GRPC IMPLEMENTATIONS ▸ Three high performance implementations ▸ C ▸ Node.js, Ruby, Python, PHP, C family are bindings to C core ▸ PHP via PECL extension (nginx/php-fpm or apache) ▸ Java ▸ Go - pure implementation using Go stdlib crypto/tls package
  • 39. POWER UP! GRPC EXPLAINED A LITTLE BIT OF HISTORY ▸ Developed internally in Google in the beginning ▸ A successor of another internal Google project called „Stubby” ▸ Currently an open source project with many contributors, however still mainly executed by Google
  • 40. BACK TO THE CODE
  • 41. POWER UP! GRPC EXPLAINED THE BASICS OF GRPC ▸ Installation with Node.js
 
 $ npm install grpc
  • 42. POWER UP! GRPC EXPLAINED BASICS OF GRPC - DEFINING PROTO ▸ example.proto
  • 43. POWER UP! GRPC EXPLAINED BASICS OF GRPC - CREATING SERVER ▸ server.js
  • 44. POWER UP! GRPC EXPLAINED BASICS OF GRPC - CREATING CLIENT ▸ client.js
  • 45. POWER UP! GRPC EXPLAINED STREAMING ▸ Server-side ▸ Client-side ▸ Bidirectional
  • 46. POWER UP! GRPC EXPLAINED SERVER SIDE STREAMING ▸ server.js
  • 47. POWER UP! GRPC EXPLAINED SERVER SIDE STREAMING ▸ client.js
  • 48. POWER UP! GRPC EXPLAINED CLIENT SIDE STREAMING ▸ server.js
  • 49. POWER UP! GRPC EXPLAINED CLIENT SIDE STREAMING ▸ client.js
  • 50. POWER UP! GRPC EXPLAINED BIDIRECTIONAL STREAMING ▸ server.js & client.js
  • 52. THE PROBLEMS… THE PROBLEMS ▸ Load balancing ▸ Error handling is quite bad ▸ Breaking API changes ▸ Poor documentation for some languages ▸ No standardization across languages ▸ It’s not good for handling files
  • 53. THE PROBLEMS… HOW TO DEBUG GRPC? ▸ protoc-gen-lint - enforcing coding standards and catching basic errors ▸ grpcc - interact by CLI with gRPC server via its protobuf file. Good for quick endpoint testing ▸ omgrpc - Postman for gRPC endpoints, with GUI
  • 54. BUT WE TRIED IT BEFORE…
  • 55. SUMMARY WHAT ABOUT SOAP/WSDL? ▸ It’s completely attached to XML ▸ It lacks lightweight, pretty bad definition format ▸ Inflexible, with no forward compatibility ▸ Performance is bad and lacks of streaming… ▸ Clients were responsible for generating libraries
  • 56. SUMMARY WHAT ABOUT APACHE THRIFT? ▸ Similar project to gRPC ▸ Never achieved the same ease of use
  • 57. SUMMARY OK, SO WHERE IS THE PRODUCTION USE? ▸ Square - one of the first contributors to grpc. Replacement for all their internal RPC ▸ CoreOS - production API for etc v3 is grpc ▸ Google - production APIs for Google Cloud Services ▸ Netflix, YikYak, VSCO, Cockroach and many more
  • 58. SUMMARY AND THAT’S GRPC ▸ Possibly the best framework for microservices communication ▸ Bright future, community active ▸ Many companies start using gRPC in their projects