Tars is a high-performance RPC framework based on name service and Tars protocol, also integrated administration platform, and implemented hosting-service via flexible schedule.

Overview

TARS - A Linux Foundation Project

What is TARS?

TARS is a Linux Foundation project. It is a high-performance RPC framework based on name service and Tars protocol, also integrated administration platform, and implemented hosting-service via flexible schedule.

Tars, aka TAF(Total Application Framework), has been used in Tencent since 2008. It supports C++, Java, Nodejs and PHP for now. This framework offers a set of solution for development, maintenance and testing, which making development, deployment and testing service efficiently. It integrated extensible protocol for encoding/decoding, high-performance RPC communication framework, name service, monitor, statistics and configuration. You can use it to develop your reliable distributed application based on microservice fast, and reach fully efficient service management.

Nowadays it's used by hundreds of bussiness in Tencent, services that developed base on TAF run on 16 thousands of machines.

See the detailed introduction SUMMARY.md.

Supported platforms

For now it supports OS as below:

  • Linux
  • Mac(>=2.1.0 support)
  • Windows (>= Windows 7)

Supported languages

For now it supports following languages:

  • C++
  • Java
  • Nodejs
  • PHP
  • Go

Version Management

Tars is composed of many modules, scattered in many warehouses, and the basic framework version and language version can develop independently. In view of this, from version 2.1.0, the Framework version tag is printed on the tarsframework warehouse, no longer reflected in the tars warehouse

In addition, each component will have its own version. When there is a version dependency specification, each component will have its own version

Installation

  1. If you are new to Tars, please read documentation installation.
  2. First deploy, please read documentation source.
  3. Install by docker, detail information: docker

Submodule

Directory Features
framework Source code implementation of C++ language framework basic service
cpp C++ language framework rpc source code implementation
java java language framework rpc source code implementation
go go language framework rpc source code implementation
nodejs nodejs language framework rpc source code implementation
php php language framework rpc source code implementation
tup source code implementation of tup group protocol in each language
web manage tars web source implementation

Developer's documentation

See docs.

License

The open-source protocol Tars used is BSD-3-Clause, see LICENSE.md.

Chinese Version

Read Chinese Version

Comments
  • Call the service more frequently and the service will restart. What is the solution?

    Call the service more frequently and the service will restart. What is the solution?

    #689

    If the A service calls the B service interface too fast, the B service will restart, and there will be no problem calling at a very slow frequency.

    opened by TARS-Question 22
  • The CentOS of VMware, the host of docker container, can connect mysql of windows, but it can not connect mysql when it is started in the container. How to solve this problem?

    The CentOS of VMware, the host of docker container, can connect mysql of windows, but it can not connect mysql when it is started in the container. How to solve this problem?

    #548(1)

    CentOS can connect to MySQL service under win with MySQL command, and run VMware under win. CentOS is installed in VMware, and mysql-h 192.168.8.109-uroot-p under CentOS can be connected.

    #548(2)

    opened by TARS-Question 19
  • Can I fill in my node address when adding a deployment node? I want to add a server address with public IP address. How to operate?

    Can I fill in my node address when adding a deployment node? I want to add a server address with public IP address. How to operate?

    As shown in the figure below, when adding a deployment node, can I fill in my node address here? The intranet IP here is the intranet IP of tars registry. I want to add a server address with public IP address here. How to do it? #656(1)

    opened by TARS-Question 14
  •   Using docker to create a virtual network, tarsframe work uses the host's IP, but an error will be reported when publishing.

    Using docker to create a virtual network, tarsframe work uses the host's IP, but an error will be reported when publishing.

    In tarsnode, I use docker to create a virtual network. In tarsframe-work, I use the host's ip. When tarsnode runs, I upload the package. When publishing, I get an error ("batchPatch err: NodeImp.cpp: patchPro: 111 | error: ip 172.25 .0.1 is invalid ") Is there a problem with the deployment process?

    opened by TARS-Question 14
  • 关于installation/docker.md的一个小问题 A little problem about installation/docker.md

    关于installation/docker.md的一个小问题 A little problem about installation/docker.md

    在2.3 使用 tarscloud/framework 部署框架中

    1. 启动框架从节点

    如果希望多节点部署, 则在不同机器上执行 docker run ...即可, 注意参数设置!

    最新版本:

    docker run -d \
        --name=tars-framework-slave \
        --net=tars \
        -e MYSQL_HOST="172.25.0.2" \
        -e MYSQL_ROOT_PASSWORD="123456" \
        -e MYSQL_USER=root \
        -e MYSQL_PORT=3306 \
        -e REBUILD=false \
        -e INET=eth0 \
        -e SLAVE=true \
        --ip="172.25.0.4" \
        -v /data/framework-slave:/data/tars \
        -v /etc/localtime:/etc/localtime \
        docker.tarsyun.com/tarscloud/framework:latest
    

    稳定版本:

    docker run -d \
        --name=tars-framework-slave \
        --net=tars \
        -e MYSQL_HOST="172.25.0.2" \
        -e MYSQL_ROOT_PASSWORD="123456" \
        -e MYSQL_USER=root \
        -e MYSQL_PORT=3306 \
        -e REBUILD=false \
        -e INET=eth0 \
        -e SLAVE=true \
        --ip="172.25.0.4" \
        -v /data/framework-slave:/data/tars \
        -v /etc/localtime:/etc/localtime \
        docker.tarsyun.com/tarscloud/framework:stable
    

    其中

    docker.tarsyun.com/tarscloud/framework:latest docker.tarsyun.com/tarscloud/framework:stable

    这两行镜像地址应该有误,直接运行是不能跑的,会显示错误为:

    Unable to find image 'docker.tarsyun.com/tarscloud/framework:stable' locally docker: Error response from daemon: Get https://docker.tarsyun.com/v2/: x509: certificate signed by unknown authority.

    我在浏览器中输入地址,也是404。

    应该就简单的改成 tarscloud/framework:stabletarscloud/framework:latest吧?

    虽然不是大问题,可能就是一个笔误,但也是抱着尽善尽美的态度提出来啦。

    opened by zestloveheart 14
  • php ext 几处问题

    php ext 几处问题

    工作环境: rpm --query centos-release centos-release-7-4.1708.el7.centos.x86_64

    在 ext 目录下运行 auto 命令,能够成功完成,但 make test 会报错,具体错误是 ZVAL_ADDREF、ZVAL_COPY 或 convert_to_bool 找不到。

    在 ttars.c 里加入: #define ZVAL_ADDREF Z_ADDREF_P #define ZVAL_COPY ZVAL_COPY_VALUE

    然后全文将 convert_to_bool 修改为 convert_to_boolean ,问题就消失了。

    opened by tangramor 12
  • How do you think about single connection and multi connection (or connection pool) design in RPC framework?

    How do you think about single connection and multi connection (or connection pool) design in RPC framework?

    For example, Baidu's brpc uses a single connection by default, while Google's grpc reuses a connection based on http2?

    Do multiple connections or connection pools theoretically have higher concurrent throughput and lower latency?

    opened by TARS-Question 10
  • Push the configuration file to the service node. When parsing, it prompts why the file cannot be found?

    Push the configuration file to the service node. When parsing, it prompts why the file cannot be found?

    I want to know the difference between the following two folder paths? Both folders are on the node service node 1./usr/local/app/tars/tarsnode/data/Test.test/bin/conf.yaml 2./data/tars/tarsnode-data/Test.test/bin/conf.yaml After I push the configuration file to the service node. When parsing, it prompts that the file cannot be found.

    opened by TARS-Question 10
  • See details below.

    See details below.

    • Refer to the example in the document (https://tarscloud.gitbook.io/tarsdocs/rumen/hello-world/tarsphp#chapter-4). In an existing http service, I copied the tars file and made a client requesting other tcp services. When I made the client according to the document, an error occurred after the request The error log appears to be pulled back after the service hung up(Remarks Figure is the abnormality of app_log). What is the reason?

    #586

    opened by TARS-Question 10
  • Stringtoproxy in Java will trigger the dead loop bug of concurringhashmap computeifabsent. (JDK version is 1.8)

    Stringtoproxy in Java will trigger the dead loop bug of concurringhashmap computeifabsent. (JDK version is 1.8)

    1. During system initialization, stringtoproxy notifyhelper's proxy, computeifabsent will lock.
    2. Next, when initializing any proxy for the first time, updateservantendpoints will find available nodes,
    3. At this time, stringtoproxy queryhelper's proxy will be added internally
    4. The same communicator, the same concurringhashmap, the same cache, and the same computeifabsent are in infinite CAS loop.

    When different objs happen to bump into a hashcode, and they are all in computeifabsent, there is a dead cycle.

    • #566(1)

    • #566(2)

    opened by TARS-Question 10
  • Tar error: internal system error

    Tar error: internal system error

    Problems: When I switch to service monitoring and feature monitoring, I report internal system error. Log alarm condition: {"level":"error","message":"192.168.226.1||MonitorController.js:47|line #1, Ret= -1 ","timestamp":"2018-10-26 18:17:18.242"} pm2: 0|tars-nod | error: 192.168.226.1||MonitorController.js:47|line #1, Ret= -1
    0|tars-nod | error: 192.168.226.1||MonitorController.js:47|line #1, Ret= -1
    0|tars-nod | error: 192.168.226.1||MonitorController.js:47|line #1, Ret= -1
    0|tars-nod | error: 192.168.226.1||MonitorController.js:47|line #1, Ret= -1
    0|tars-nod | error: 192.168.226.1||MonitorController.js:58|line #1, Ret= -1
    0|tars-nod | error: 192.168.226.1||MonitorController.js:47|line #1, Ret= -1
    0|tars-nod | error: 192.168.226.1||MonitorController.js:47|line #1, Ret= -1
    0|tars-nod | error: 192.168.226.1||MonitorController.js:47|line #1, Ret= -1

    opened by Cowboyc 10
  • [FEATURE]python

    [FEATURE]python

    Is your feature request related to a problem? Please describe. Does Tars support python?

    Describe the solution you'd like The algorithms of deep learning are basically implemented in python, but currently Tars does not support python, is there a solution.

    Describe alternatives you've considered There is currently no alternative.

    Additional context none

    enhancement 
    opened by lixiang19870818 2
  • 【问题求助】发布服务后,服务当前状态一直是inactive

    【问题求助】发布服务后,服务当前状态一直是inactive

    tars-framework(latest)、tars-nodes(latest)、mysql(5.7)都是docker启动的 发布https://github.com/TarsCloud/TarsJava/exzamples下的tars-spirng-boot-servertars-spring-boot-client后,页面提示发布成功,但当前状态一直显示的inactive,且接口测试的时候报超时错误,请问可能是什么问题呢? image image

    opened by PeiMouRen 2
  • helloserver

    helloserver

    2022-06-10 12:49:43|140465163990912|DEBUG|[TARS]accept [127.0.0.1:36638] [19] incomming 2022-06-10 12:49:54|140465017972480|DEBUG|[TARS]timeout [127.0.0.1:36638] del from list

    helloserver.log输出如上,服务成功添加,但是客户端访问的时候返回-7超时错误。

    framework mysql 均在docker, servant在宿主机,宿主机为Ubuntu virualbox虚拟机web正常

    bug 
    opened by hjhj111 1
  • 对于Python和ruby这类语言应该怎么处理?

    对于Python和ruby这类语言应该怎么处理?

    如题,我打算使用微服务集成由python和ruby编写的应用,当前查看文档没有找到关于这些语言的处理方式(如果有的话劳烦指明一下位置)。对于一些支持的语言(如nodejs)可以支持打包上传及部署,那么支持之外的语言呢?是否是把节点当做一个服务器,然后将代码上传运行并映射出来就可以了?如果这样做的话,对于服务监控这些是否和nodejs编写的应用是一样的?谢谢大佬。

    opened by liuyu2018 1
  • [BUG]当节点经过网关连入主框架时,PUSH配置文件存在问题,无法推送节点配置的内容

    [BUG]当节点经过网关连入主框架时,PUSH配置文件存在问题,无法推送节点配置的内容

    What version of TARS and what language are you using? TarsFramework-3.0.3

    What operating system (Linux, Windows, ...) and version? [e.g. CentOS 7.8] Linux&Windows

    What runtime/compiler are you using? [e.g. JDK version or version of gcc] docker

    Describe the bug 在添加了服务配置和节点配置时(不启用set),PUSH配置文件给经过网关连接上来的节点(已设置nodeid,框架中显示的ip是实际ip)推送文件只会推送服务配置,不会合并节点配置的信息。具体原因是: tars-bug-1 在getScriptFile函数中调用loadConfigByInfo时传入的配置参数是自己新建的对象,构建时只设置了部分信息,不包含host字段 tars-bug-2 后面取host时如果为空则取current->getHostName(),获取到的是连接的实际接入IP,也就是网关IP,而不是节点真实IP tars-bug-3 在最后查库取节点配置时,用网关IP去查,无法获取真正的节点配置,导致推送的配置只有服务配置的内容,没有节点配置的内容。

    getScriptFile函数中可以取到_desc.nodeName,这个能确保是实际的ip?用这个字段给host赋值传入是否可以?

    To Reproduce

    Expected behavior

    Screenshots

    Additional context

    bug 
    opened by JanuarYJL 1
Releases(v2.1.0)
  • v2.1.0(Mar 15, 2020)

    en:

    • udp in ipv6 bug
    • add tars.resource
    • fix rsp queue
    • add max buffer limit, send queue, data accumulate clear
    • Adjust cmake third library path
    • tc_network_buffer add iterator
    • optimize tc_http tc_http_async, improve http parser performance
    • fix tars2node, support --with-tars
    • remove rapidjson depends
    • fix tarsAdminRegistry bug
    • querystat & query property protocol change to tars
    • tarsnode timing update template configuration, auto update registry locator
    • Adjust template configuration, DB configuration is centralized to one file

    cn:

    • 修改udp在ipv6下的bug
    • 服务框架增加tars.resource命令字, 可以查看服务内网络连接细节
    • 修改响应队列上报的bug
    • 增加发送buffer过载保护
    • 调整第三方库安装后的库路径
    • tc_network_buffer增加iterator接口 -优化tc_http tc_http tc_http_async性能, 提升http parser
    • fix tars2node, support --with-tars
    • 修改tarsAdminRegistry bug
    • 删除rapidjson依赖
    • 修改querystat & query property 协议到tars
    • tarsnode定时更tarsnode配置到本地, 当主控切换地址后, tarsnode可以跟随自动变动
    • 调整模板继承方式, 将框架db配置集中到一个模板, 方便管理
    Source code(tar.gz)
    Source code(zip)
  • v2.0.0(Mar 15, 2020)

    en:

    • support linux & windows, tarscpp support mac
    • support ARM
    • Reduce memory copy and improve performance
    • Download compile dependencies automatically
    • Improve compilation mode and rely on MySQL client Lib
    • fix some bug

    cn:

    • tarscpp支持linux, mac, windows
    • tarscpp支持ARM CPU
    • 减少内存copy, 大幅度提升性能
    • 优化编译逻辑, 自动下载第三方依赖库并编译
    • 改善自动编译模式, mysql依赖改成mysql client lib
    • 修复其他相关bug
    Source code(tar.gz)
    Source code(zip)
  • v1.9.0(Jan 12, 2020)

  • v1.8.0(Jan 12, 2020)

    • tars-cpp support tars2json
    • protocol: notify.tars 上报增加格式
    • cpp: cgi encode fix
    • framework: patch, adminregistry, node add notify report, show error message in web
    • web: deploy ssl server, support server bind dns
    • web: undeploy check server state
    • web: expand server can bind dns
    • web: fix deploy page
    • web: manage page add refresh
    • web: deploy message, goto manage page
    • web: add tarsnode list
    • web: add tarsnode install online
    • framework: fix deploy script, during deploy , copy tarsnode.tgz to web/dist/static
    Source code(tar.gz)
    Source code(zip)
  • v1.7.1(Jan 12, 2020)

  • v1.7.0(Jan 12, 2020)

    • Update the installation mode of tar web, and support permission verification by default
    • Create the admin user by default, and change the admin password for the first login
    • Registration not allowed, admin user to create user
    • Add password modification function
    • Add check.sh script to monitor tarsregistry, tarsadminregistry, tarsnode
    • Complete installation documentation
    Source code(tar.gz)
    Source code(zip)
  • v1.6.0(Oct 23, 2018)

    • 说明

      • tars-c++ IPv6,绑定地址为IPv6的地址格式即可;
      • 新安装tars框架的数据库已经把相应字段扩大,如果是升级框架则需要执行下面命令;
        1. mysql -uroot -proot@appinside db_tars -e "alter table t_config_files modify column host varchar(50) not null default '';"
        2. mysql -uroot -proot@appinside db_tars -e "alter table t_node_info modify column endpoint_ip varchar(50) default '';"
        3. mysql -uroot -proot@appinside db_tars -e "alter table t_task_item modify column node_name varchar(50) default null;"
    • Description

      • tars-c++ supports IPv6 by binding the address to IPv6.
      • The database of the newly installed tars framework has expanded the corresponding fields. If it is an upgrade framework, you need to execute the following command:
        1. mysql -uroot -proot@appinside db_tars -e "alter table t_config_files modify column host varchar(50) not null default '';"
        2. mysql -uroot -proot@appinside db_tars -e "alter table t_node_info modify column endpoint_ip varchar(50) default '';"
        3. mysql -uroot -proot@appinside db_tars -e "alter table t_task_item modify column node_name varchar(50) default null;"
    Source code(tar.gz)
    Source code(zip)
  • v1.5.0(Jul 4, 2018)

    • 说明

      • tars-c++支持http2;
      • tars-c++支持protobuf协议;
      • tars-php的全面支持与优化;
      • tars-nodejs支持Node.js v10.x特性,优化RPC调用性能,优化编解码库,支持存取更多种格式。
      • tars-java 支持调用链
    • Description

      • tars-c++ supports http2.
      • tars-c++ supports protobuf.
      • tars-php server is full supported.
      • tars-nodejs supports Node.js v10.x, optimize RPC call, encode/decode, supports more formats.
      • tars-java supports tracing
    Source code(tar.gz)
    Source code(zip)
  • v1.4.0(May 7, 2018)

    • 描述

      • tars-java:提供集成spring cloud的能力
      • 修复tarsnotify在某些环境不能重启
    • Description

      • tars-java: Integration with spring cloud.
      • fix tarsnotify restart failed.
    Source code(tar.gz)
    Source code(zip)
  • v1.3.0(Dec 1, 2017)

    1.tars java容器剥离,简化发布包 2.tars java支持Spring框架 3.tars java支持多种负载均衡策略 4.tars java支持染色日志

    Source code(tar.gz)
    Source code(zip)
  • v1.2.0(Nov 15, 2017)

    1.tars java支持protobuf协议 2.tars c++支持openssl和鉴权功能 3.tars c++解码性能优化 4.tars php客户端支持php 7 5.bug修复: web修复侧边栏超出被隐藏的问题 tarsAdminRegistry修复线程过多的问题 php兼容tars中基本类型大小写的问题和对于入参的map类型修改传入参数方式 web修复管理平台包含的java框架 php修复注释格式可能带来的解析问题和修复vector或map中包含namespace时候代码生成问题

    Source code(tar.gz)
    Source code(zip)
  • v1.1.0(Nov 15, 2017)

    1.tars框架支持nodejs和php开发语言,其中nodejs支持客户端和服务端,php暂支持客户端。 2.tars c++网络线程缓存区优化 3.tars java支持第三方协议 4.tup修复python语言解析vector的问题 5.tars c++添加push模式demo的示例 6.tarsnotify修复tarsnotify连接数据库异常磁盘被打满的问题

    Source code(tar.gz)
    Source code(zip)
  • v1.0.1(Jul 4, 2017)

    1.support c++&java rpc develop framework 2.support service running platform 3.support web operation system 4.support milti-language tars-uni protocal(tup)

    Source code(tar.gz)
    Source code(zip)
Owner
THE TARS FOUNDATION PROJECTS
TARS Foundation is the neutral home for open source Microservices projects that empower any industry to quickly turn ideas into applications at scale.
THE TARS FOUNDATION PROJECTS
A light-weight RPC implement of google protobuf RPC framework.

sofa-pbrpc A light-weight RPC implementation of Google's protobuf RPC framework. Wiki: https://github.com/baidu/sofa-pbrpc/wiki Features High performa

Baidu 2.1k Dec 10, 2022
Php-rpc-server - JSON RPC server implementation for PHP.

JSON RPC Server implementation for PHP. The json-rpc is a very simple protocol. You can see this by reading the protocol specification. This library i

null 4 Sep 28, 2022
Leaf's very own high-speed, high-performance server

[WIP] Leaf Eien Server Eien is Leaf's implementation of a high-speed, high-performance server based on powerful tools like Open Swoole and Swoole. Eie

Leaf Framework 8 Dec 28, 2022
CRUD Build a system to insert student name information, grade the class name, and edit and delete this information

CRUD Build a system to insert student name information, grade the class name, and edit and delete this information

Sajjad 2 Aug 14, 2022
The game is implemented as an example of scalable and high load architecture combined with modern software development practices

Crossword game The game is implemented as an example of scalable and high load architecture combined with modern software development practices Exampl

Roman 56 Oct 27, 2022
A high-performance license server system service for creating and managing products, major versions, and software licenses for the purpose of selling installable software products.

A high-performance license server system service for creating and managing products, major versions, and software licenses for the purpose of selling installable software products. Comes with a SDK and command-line tool. Works anywhere that PHP runs.

CubicleSoft 32 Dec 5, 2022
A school platform to organize documents and files for students manged by teachers also user role management

A school platform to organize documents and files for students manged by teachers also user role management. The app is developed by the LARAVEL Framework.

med el mobarik 3 Sep 5, 2022
> Create e-wallet, send money, withdraw and check balance all via USSD protocol

Mobile Money USSD solution Create e-wallet, send money, withdraw and check balance all via USSD protocol Create e-wallet Step 1 Step 2 Step 3 Step 4 S

Emmanuel HAKORIMANA 1 Nov 3, 2021
This tool can write the monolog standard log directly to clickhouse in real time via the tcp protocol

log2ck This tool can write the monolog standard log directly to clickhouse in real time via the tcp protocol. If you can write regular rules, other st

Hisune 9 Aug 15, 2022
High performance view templating API for PHP applications using tags & expressions inspired by Java JSTL and C compiler

View Language API Table of contents: About Expressions Tags Configuration Compilation Installation Unit Tests Examples Reference Guide About This API

Lucian Gabriel Popescu 0 Jan 9, 2022
High-performance, low-memory-footprint, single-file embedded database for key/value storage

LDBA - a fast, pure PHP, key-value database. Information LDBA is a high-performance, low-memory-footprint, single-file embedded database for key/value

Simplito 12 Nov 13, 2022
High performance pocketmine 4.0 vote plugin

Voting38 This is a threaded high performance voting plugin for PocketMine-MP API 4.0 You can configure messages and voting rewards in the config. Ther

KingOfTurkey38 7 Jun 1, 2022
High performance mine reset plugin for PocketMine-MP 4.0.0

MineReset38 High performance mine reset plugin for PocketMine-MP 4.0.0 Unlike other plugins, this plugin is not threaded but asynchronous. When a mine

KingOfTurkey38 6 Dec 17, 2022
A high-performance event loop library for PHP

?? A high-performance event loop library for PHP ??

workbunny 13 Dec 22, 2022
MajorDoMo is an open-source DIY smarthome automation platform aimed to be used in multi-protocol and multi-services environment.

MajorDoMo (Major Domestic Module) is an open-source DIY smarthome automation platform aimed to be used in multi-protocol and multi-services environment. It is based on web-technologies stack and ready to be delivered to any modern device. It is very flexible in configuration with OOP paradigm used to set up automation rules and scripts. This platform can be installed on almost any personal computer running Windows or Linux OS.

Sergei Jeihala 369 Dec 30, 2022
A Simple MVC PHP Framework, integrated with lot of features such as Session, Cookies, Migrations, Database, Factories, Seeding, Bootstrap and Tailwind CSS

Navite A Simple MVC PHP Framework, integrated with lot of features such as Session, Cookies, Migrations, Database, Factories, Seeding, Bootstrap and T

Celionatti 2 Aug 22, 2022
This is a setup for a Tor based shared web hosting server

General Information: This is a setup for a Tor based shared hosting server. It is provided as is and before putting it into production you should make

Daniel Winzen 312 Dec 24, 2022
Configure Magento 2 to send email using Google App, Gmail, Amazon Simple Email Service (SES), Microsoft Office365 and many other SMTP (Simple Mail Transfer Protocol) servers

Magento 2 SMTP Extension - Gmail, G Suite, Amazon SES, Office 365, Mailgun, SendGrid, Mandrill and other SMTP servers. For Magento 2.0.x, 2.1.x, 2.2.x

MagePal :: Magento Extensions 303 Oct 7, 2022