Giter Site home page Giter Site logo

chhy2009 / trpc-cpp Goto Github PK

View Code? Open in Web Editor NEW

This project forked from trpc-group/trpc-cpp

0.0 1.0 0.0 11.1 MB

A pluggable, high-performance RPC framework written in cpp

License: Other

Shell 0.17% C++ 93.86% C 0.21% Assembly 0.26% Smarty 0.26% CMake 0.54% Starlark 4.70%

trpc-cpp's Introduction

English | 中文

tRPC-Cpp

API Docs LICENSE Releases Build Status Coverage

tRPC-Cpp is the cpp version of tRPC, it follows the overall design principles of tRPC.

Overall Architecture

architecture design

The overall architecture consists of two parts: "framework core" and "plugins". As shown in the figure above, the dotted box is tRPC. The red solid line box in the middle is the framework core, and the blue box is the plugin part.

The framework core can be divided into three layers:

  • Runtime: It consists of thread model and io model, responsible for scheduling of framework cpu tasks and io operations. thread model currently supports: ordinary thread model (io/handle separated or merged thread model), M:N coroutine model (fiber thread model). io model currently supports: reactor model for network IO and asyncIO model for disk io(based on io-uring, currently only supported in the merged thread model);

  • Transport: Responsible for data transmission and protocol encoding and decoding. The framework currently supports tcp/udp/unix-socket and uses the tRPC protocol to carry RPC messages, and also supports other protocol through codec plugin;

  • RPC: Encapsulates services and service proxy entities, provides RPC interfaces and support synchronous, asynchronous, one-way, and streaming calls;

In addition, the framework also provides an admin management interface, which is convenient for users or operating platforms to manage services. The management interface includes functions such as updating configuration, viewing version, modifying log level, viewing framework runtime information, and the framework also supports user interface to meet the customized needs.

more details:architecture design

Features

  • Runtime
    • thread-model: supportfiber(m:n coroutine) and thread(io/handle merge or separate)
    • io-model: support reactor(for network) and async-io(for disk)
  • Server
    • network: support tcp/udp/ssl/unix domain socket
    • rpc-impl: support rpc/streaming-rpc/non-rpc
  • Client
    • network: support tcp/udp/ssl
    • connection-way: support conn-complex/conn-pool/conn-pipeline
    • rpc-call: support rpc/streaming-rpc/non-rpc/one-way
  • Plugin
  • Tools
  • Components

To start using tRPC

Docs

Examples

How to contribute

If you're interested in contributing, please take a look at the CONTRIBUTING and check the unassigned issues in the repository. Claim a task and let's contribute together to tRPC-Cpp.

Feedback

Report bugs, ask questions or give suggestions by Issues

trpc-cpp's People

Contributors

helloopenworld avatar chhy2009 avatar bochencwx avatar raychen911 avatar weimch avatar yujun411522 avatar lioncfliu avatar peggiezhu avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.