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 do gRPC Analysis

2025-01-20 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

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

How to carry out gRPC analysis, many novices are not very clear about this, in order to help you solve this problem, the following editor will explain for you in detail, people with this need can come to learn, I hope you can gain something.

GRPC development background

Most complete nodes, such as Bitcoin core, BCH ABC or BU, have very little data calculated and stored by their full-node clients, which has no impact on node operators, but is not very friendly to some ecological infrastructure such as wallets and block browsers, because the client does not have enough reserved data space to serve these infrastructure.

In the case of insufficient space reserved for the full node, infrastructure developers usually seek the help of third-party index servers, such as Bitpay's Insight servers, which are usually additional software and need to be installed on the entire node, and the indexes it needs to calculate need to be obtained through the public API.

Index servers are mostly difficult to install and run in a production environment. For example, Insight servers need to reset API processing for certain types of data, followed by WebSockets and socket.io. In addition, the stratum API used by Electrum servers is too cumbersome and cumbersome.

Based on the above phenomenon, Bchd developers provide a "out-of-the-box" solution that requires users to download binaries and run them.

What is gRPC, and what are its uses and advantages?

GRPC API is a new server written in the go language that can replace BCH full nodes (such as ABC and BU) to help infrastructure developers solve the problem of insufficient data on all nodes.

It has many advantages over the legacy JSON-RPC of the original system and various REST / WebSocket API. It provides users with a high-performance and reliable server with functions such as fast synchronization mode, allowing the client's initial chain to download synchronously within recording time. The node also includes attributes such as BIP113157158 and an upper limit of adjustable block size. With gRPC, it is very easy to build a well-defined and easy-to-reason API.

The specific performance of front-end development:

You no longer need to look up API documents-proto is the canonical format for API contracts.

You no longer need to write JSON invocation objects manually-- all requests and responses are strongly typed and code-generated, and tips are provided in IDE.

No more methods, headings, text, and low-level networks-everything is handled by gRPC.

Stop guessing the meaning of the error code-the gRPC status code is the canonical format that represents the problem in API.

You no longer need to request handlers from the server at once to avoid concurrent connections-gRPC is based on HTTP2 and multiplexes multiple data streams on the same connection.

Transferring data from the server is no longer a problem-gRPC-Web supports 1:1RPC and 1: multiple data flow requests.

When new binaries are rolled out, there are no more data parsing errors-backward and forward compatibility of requests and responses.

Another benefit for BCH infrastructure developers

Compared with the traditional Internet application development, the development based on the underlying protocol of the block chain is more difficult at the present stage, and the technical employees in the block chain industry are very limited, in this case, if you want to speed up the development of a common chain application, then it is very important to improve its development facilities.

GRPC API is undoubtedly a very excellent basic service, it can effectively reduce the difficulty of the development of BCH-related applications, speed up the landing speed of applications, and then improve the whole BCH ecosystem.

There are other assistive tools like gRPC in the BCH community, such as the developer platform launched by Bitcoin.com. On April 11th, the REST service layer of the platform even received more than 5 million requests a day, indicating that BCH developers are using these assistive tools to build new applications.

Is it helpful for you to read the above content? If you want to know more about the relevant knowledge or read more related articles, please follow the industry information channel, thank you for your support.

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