gRPC, which stands for Remote Procedure Call, is an open-source framework developed by Google. It is designed for building efficient and scalable distributed systems. gRPC enables communication between client and server applications by defining a set of services and message types using Protocol Buff...
gRPC, which stands for Remote Procedure Call, is an open-source framework developed by Google. It is designed for building efficient and scalable distributed systems. gRPC enables communication between client and server applications by defining a set of services and message types using Protocol Buffers (protobuf) as the interface definition language. gRPC provides a way for applications to call methods on a remote server as if they were local procedures, making it a powerful tool for building distributed and microservices-based architectures.
Size: 4.05 MB
Language: en
Added: Jun 06, 2024
Slides: 24 pages
Slide Content
Introduction To gRPC Presented by – Akshit Kumar
Lack of etiquette and manners is a huge turn off. KnolX Etiquettes Punctuality Join the session 5 minutes prior to the session start time. We start on time and conclude on time! Feedback Make sure to submit a constructive feedback for all sessions as it is very helpful for the presenter. Silent Mode Keep your mobile devices in silent mode, feel free to move out of session in case you need to attend an urgent call. Avoid Disturbance Avoid unwanted chit chat during the session.
What is gRPC ? Protocol Buffers? Flow of Protocol Buffer Why gRPC uses protocol buffer and not JSON? Why gRPC uses HTTP/2 and not HTTP/1 Types of gRPC API GRPC vs REST Demo and Q&A
What is gRPC ? 01
What is gRPC ? Remote Procedure Call (RPC) framework. In gRPC , a client application can directly call a method on a server application on a different machine as if it were a local object. Client and Server can be developed using different languages.
Protocol Buffers 02
Protocol Buffers gRPC uses Protocol Buffers, Googles's mature open-source mechanism for serializing structured data (Service, Request, Response). gRPC can use protocol buffers as both Interface Definition Language (IDL) and as its underlying message interchange format. It is stored in a file named as .proto
Flow of Protocol Buffers 03
Flow of Protocol Buffer Proto Request Proto Response
Why gRPC uses Protocol Buffer instead of JSON? 04
Why gRPC uses Protocol Buffer instead of JSON? Protocol buffer is smaller in size as compared to JSON. Parsing JSON is usually CPU intensive, as it is plain text. Parsing Protocol Buffer is less CPU intensive, as it is binary and thus closer to how machine represents data. Faster and efficient communication.
Why gRPC uses HTTP/2 instead of HTTP/1? 05
Why gRPC uses HTTP/2 instead of HTTP/1? Let's see how HTTP/1 works so that we can understand the advantages more clearly.
Why gRPC uses HTTP/2 instead of HTTP/1?
Why gRPC uses HTTP/2 instead of HTTP/1? HTTP/1 loads resources one after the other, so if one resource is not loaded, it blocks all other resources behind it. This causes Head-of-Line blocking. In HTTP/1, headers are not compressed and are sent / received with every request.
Let's look at HTTP/2
All about HTTP/2 Multiplexing: HTTP/2 can use a single TCP connection to send multiple streams (each stream has an identifier) of data at once so that no resource blocks any other resource. HTTP/2 can compress the headers along with the messages; It also uses a more advanced compression method called HPACK that eliminates redundant information in HTTP header packets. Server Push: Generally, a server only serves content ti a client if the client asks for it, but modern webpages involve several dozen separate resources that the client must request. HTTP/2 solves this problem by allowing server to "push" content to a client before the client asks for it. Let's see a difference between HTTP/2 and HTTP/1. https://imagekit.io/demo/http2-vs-http1