GithubHelp home page GithubHelp logo

myicefrog / learn-tars Goto Github PK

View Code? Open in Web Editor NEW
108.0 5.0 46.0 3.69 MB

腾讯开源框架Tars源码学习笔记---从头搭建Tars rpc

C++ 94.85% Shell 0.74% Assembly 2.33% Makefile 2.09%
tars-rpc cpp tarscpp tarsframwork note

learn-tars's Introduction

腾讯开源框架Tars源码学习笔记---重写Tars rpc

前言

这个项目试图从最基本的epoll模型开始,一步步向官方Tars RPC靠拢,尽量记录下关键的结点。之所以选择这样做,是亲手实现一遍代码比单纯调试代码印象更为深刻。

选择将这个过程分享出来,是感觉这份笔记对于想短时间了解Tars源码主要逻辑脉络的人来说,会有一些帮助

使用的系统环境:

  • 操作系统版本:Ubuntu 18.04.1 LTS (GNU/Linux 4.15.0-42-generic x86_64)

  • GCC版本:gcc version 7.3.0 (Ubuntu 7.3.0-27ubuntu1~18.04)

怎样看这份笔记?

  • 代码提交记录可以很好的追踪代码变化。并且下面笔记中1.1、 1.2的内容与代码提交记录中的1.1、1.2是完全匹配的,可以对照理解

这只是实验性质的代码,因为更多关注主体逻辑,很多细节可能忽略掉了

代码编译只需要运行./run.sh,大多数人都可以轻松编译调试

正文

1 建立Tars RPC Server 异步模型框架

2 建立RPC client异步框架

3 RPC Server加入协程

4 进一步完善RPC Client(同步)

5 进一步完善RPC Client(异步)

6 进一步完善RPC Server

7 Framework篇:NodeServer

8 Framework篇:AdminRegistryServer

更多

作者:路小饭

微信号:luguangfamily

邮箱[email protected]

微信

参考资料:https://github.com/TarsCloud/Tars

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.