Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to analyze RPC Framework GRPC based on HTTP/2 and protobuf

2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/01 Report--

How to analyze the RPC framework GRPC based on HTTP/2 and protobuf, I believe that many inexperienced people do not know what to do about it. Therefore, this paper summarizes the causes and solutions of the problem. Through this article, I hope you can solve this problem.

Google has just opened up grpc (http://www.grpc.io/), a high-performance, open source, general-purpose RPC framework based on HTTP2 and Protobuf. Although Protobuf itself provides the definition syntax of RPC, but all the time, Google has only open source Protobuf serialization and deserialization code, but no open source RPC implementation, so there are many good and bad third-party RPC implementations, but I use WCF with Protobuf in the project is a very good RPC implementation, Google this framework is based on HTTP2, this is his characteristic Bring features such as bidirectional flow, flow control, header compression, multiplex requests over a single TCP connection, etc. These features make it perform better on mobile devices, save power and space.

From the point of view of implementation and features, GRPC is more concerned with the communication between client and server in mobile scenarios, as it calls itself "generalRPC framework that puts mobile and HTTP/2 first". HTTP2 itself provides mechanisms such as connection multiplexing, Body and Header compression, based on which grpc can provide a more efficient implementation. Currently, Firefox, Chrome, Safari, Opera, Safari for iOS, Chrome for Android, and IE 11 on Windows 8 all support HTTP/2,Windows 10 pre-release browsers as well. IIS and Nginx on Apache, Windows 10 have all implemented SPDY 3.1 or 4 (that's HTTP/2), and all that's left is for webmasters to upgrade the server software.

The dependencies used by GRPC are relatively new. For example, protbuf requires version 3.0, C++ uses cantilever 11, netty in the Java implementation needs version 5.0, and HTTP2 has just been finalized. At this stage, officials support C++, JAVA, Python and other three programming languages, and support Node.js, Python, Ruby,Objective-C, PHP and C # languages in the way of c-shared libraries (from this point of view, cymbals, Java and golang have a first-class citizen status in Google). The implementation of Java language can also be used for Android client, and the implementation of Objective-C is mainly for IOS client.

Focus on the implementation of C# (https://github.com/grpc/grpc/tree/master/src/csharp). At present, the code can only run under Mono, mainly because the P/Invoke packaging of the GRPC C core library under windows has not been completed. Here, we can also see that the main development environment of Google is Linux/ubuntu, and the support for Mono is not bad, which is also of great reference to the domestic counterparts of Internet companies.

After reading the above, have you mastered how to analyze the RPC framework GRPC based on HTTP/2 and protobuf? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report