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.
2. 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.
3. 1. What is gRPC?
2. Protocol Buffers?
3. Flow of Protocol Buffer
4. Why gRPC uses protocol buffer and not JSON?
5. Why gRPC uses HTTP/2 and not HTTP/1
6. Types of gRPC API
7. GRPC vs REST
8. Demo and Q&A
5. 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.
7. 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
11. 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.
15. 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.
17. 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