In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
This article is to share with you about the usefulness of Protobuf API. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
Protocol Buffer (Protobuf for short) is an excellent performance, cross-language, cross-platform serialization library produced by Google. You can think of it as XML or JSON format, but smaller, faster, and more concise.
Protobuf history at the beginning of 2001, Protobuf was first created in Google, called proto1, has been used in the internal Google, which is also constantly evolving, according to the needs of users also add a lot of new functions, some internal libraries rely on it. Almost every developer of Google will use it.
When Google started opening up its internal projects, they decided to open source Protobuf first because of their dependencies. There was some confusion in the evolution of proto1, so the developers of Protobuf rewrote the implementation of Protobuf, retaining most of the design of proto1, as well as a lot of ideas from proto1. But open source proto2 does not rely on any Google libraries, and the code is fairly clear. On July 7, 2008, Protobuf began to be announced.
The announcement of Protobuf has also been widely concerned and gradually recognized by everyone. Many projects also use Protobuf for message communication, as well as GRPC, a micro-service framework based on Protobuf. In the process of using it, people have put forward a lot of opinions and suggestions, and Protobuf is also evolving, launching Proto3 in 2016. Proto3 simplifies proto2 development and improves the efficiency of development, but it also brings the problem of version incompatibility.
The current stable version of Protobuf is 3.9.2, which will be released on September 23, 2019. Because many companies adopted Protobuf a long time ago, many projects are still using the proto2 protocol, and proto2 and proto3 are currently in use at the same time.
On New API3 2, Golang officially announced the latest version of API for Protocol Buffer, which is a major upgrade (incompatible with the previous version, which means that the API version is not proto2/proto3, but the old version will be maintained indefinitely).
What's new:
Google.golang.org/protobuf/encoding/protojson uses canonical JSON mapping to convert protocol buffer messages to and from JSON, and solves many problems that are difficult to solve in the old jsonpb package, and these problems do not cause problems for existing users.
Google.golang.org/protobuf/types/dynamicpb provides an implementation of proto.Message for messages that are derived from protocol buffer types at run time.
Google.golang.org/protobuf/testing/protocmp provides the ability to compare protocol buffer messages to github.com/google/cmp.
Google.golang.org/protobuf/compiler/protogen provides support for writing protocol compiler plug-ins.
Thank you for reading! This is the end of this article on "what's the use of Protobuf API?". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it for more people to see!
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.