Tencent open source tRPC, a multi-language plug-in high-performance RPC development framework

Tencent announced the open source of tRPC, a multi-language, high-performance RPC development framework designed based on the plug-in concept. The first batch of open source supports Go/Cpp programming languages, and it is expected that more programming languages ​​will be open sourced in the future.

According to the introduction, tRPC provides RPC calling methods by encapsulating the underlying communication, which can easily carry out distributed application development; the plug-in-based architecture can support a variety of business communication protocols, flexibly connect to various microservice governance platforms, and help business Quickly build the required microservice system.

Architecture design

tRPC adopts the plug-in design concept in its architecture design. The overall architecture is composed of two parts: "framework" and "plug-in". The dotted line box is tRPC, the red solid line box in the middle is the framework, and the blue solid line box is the plug-in part. tRPC abstractly encapsulates the core functions into independent plug-ins, and then the framework is responsible for the concatenation and assembly of these independent plug-ins, thereby realizing the functional features to be supported by the framework. This design makes tRPC highly open and extensible. sex. In addition, the framework also designs an admin management interface, so that users or the operation platform can manage services by calling the admin interface.

main feature

  • Cross-language: Implement cross-language service communication based on Protocol Buffers.
  • Multiple communication protocols: Supports multiple communication protocols to facilitate interoperability with different frameworks (such as gRPC).
  • Support streaming RPC: better suited for large file upload/download, message push, AI speech recognition/video understanding and other application scenarios.
  • Enriching the plug-in ecosystem: Provides a large number of plug-ins that connect to industry microservice components (such as Consul/Promethues/Opentelemetry, etc.) to facilitate users to build a service governance system that suits them.
  • Extensible: Based on the plug-in design of the framework, users can carry out secondary development to expand the framework capabilities, such as: RPC request parameter verification, authentication, request recording, etc.
  • Flow control and overload protection: Provides flow control and overload protection plug-ins in a variety of application scenarios to prevent services from being overloaded and unavailable due to sudden access surges.

project planning

  • Open source more programming languages: Java, Python, Node
  • Enrich the ecosystem and open source more cloud-native related plug-ins and components

Guess you like

Origin www.oschina.net/news/262264/trpc-open-source