This video is a part of gRPC Tutorial series. In this video we explains gRPC Basics, Protocol Buffers (gRPC Protobuf), Remote Procedure Call (RPC), gRPC Streaming, Types of gRPC APIs etc. Below is the playlist link for this series:
• gRPC Tutorial
What is gRPC?
gRPC is a modern open source high performance Remote Procedure Call (RPC) framework that can run in any environment. It can efficiently connect services in and across data centers with pluggable support for load balancing, tracing, health checking and authentication. It is also applicable in last mile of distributed computing to connect devices, mobile applications and browsers to backend services.
gRPC is free and open-source framework developed by Google
gRPC allows you to define REQUEST and RESPONSE for RPC (Remote Procedure Call) and handles the rest for you.
It is Modern, Fast, Efficient, Low Latency
Built on top of HTTP/2
Supports streaming data
Easy to implement authentication, load balancing, logging & monitoring
What is RPC?
RPC stands for Remote Procedure Call
In your CLIENT you can directly call the function on the SERVER.
Remote Procedure Call (RPC) is a powerful technique for constructing distributed, client-server based applications. It is based on extending the conventional local procedure calling so that the called procedure need not exist in the same address space as the calling procedure. The two processes may be on the same system, or they may be on different systems with a network connecting them.
What are Protocol Buffers in gRPC?
Protocol Buffer (also called as Protobuf) is an IDL (Interface Definition Language) for gRPC. It's where you basically store your data and function contracts in the form of a proto file (.proto). Protobuf will help gRPC to generate the code for us.
HTTP/2 will make our applications faster, simpler, and more robust. Even better, it also opens up a number of entirely new opportunities to optimize our applications and improve performance!
The primary goals for HTTP/2 are to reduce latency by enabling full request and response multiplexing, minimize protocol overhead via efficient compression of HTTP header fields, and add support for request prioritization and server push. To implement these requirements, there is a large supporting cast of other protocol enhancements, such as new flow control, error handling, and upgrade mechanisms, but these are the most important features that every web developer should understand and leverage in their applications.
HTTP/2 does not modify the application semantics of HTTP in any way. All the core concepts, such as HTTP methods, status codes, URIs, and header fields, remain in place. Instead, HTTP/2 modifies how the data is formatted (framed) and transported between the client and server, both of which manage the entire process, and hides all the complexity from our applications within the new framing layer. As a result, all existing applications can be delivered without modification.
Advantages of HTTP2 (H2 / HTTP/2):
gRPC use HTTP/2 for communication
HTTP/2 was released in 2015
HTTP/2 supports multiplexing – Client & Server can send messages parallelly using the same TCP connection.
Server can send multiple messages for a single request from Client. Hence we can stream data using HTTP/2
HTTP/2 supports header compression which was not there in HTTP/1
HTTP/2 supports binary. Protobuf is a binary protocol.
HTTP/2 is secure.
4 Types of gRPC APIs:
1. Unary [gRPC Unary]– Single Request / Single Response
2. Server Streaming – Single Request / Multiple Response
3. Client Streaming – Multiple Request / Single Response
4. Bi-Directional Streaming – Multiple Request / Multiple Response
Video Chapters:
0:00 - Intro
0:36 - Microservices Example
2:16 - What is gRPC?
3:40 - What is RPC (Remote Procedure Call)?
5:42 - gRPC Website
6:31 - Protocol Buffers in gRPC [Protobuf]
7:31 - Proto File
9:14 - HTTP/2
11:21 - Types of gRPC APIs
14:14 - Demo gRPC Project Setup
#grpc #protobuf #codingdroplets
Информация по комментариям в разработке