Introduction to gRPC Presentation (Java)

knoldus 53 views 24 slides Jun 06, 2024
Slide 1
Slide 1 of 24
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24

About This Presentation

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...


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  

Types of gRPC APIs 06

Types of gRPC API There are 4 types of gRPC APIs

GRPC vs REST 07

gRPC  vs REST 

Demo

Q&A
Tags