# TarsPHP **Repository Path**: icewind2021/TarsPHP ## Basic Information - **Project Name**: TarsPHP - **Description**: TARS-PHP是针对php使用tars二进制协议,以及tars平台整体运维、RPC等一系列能力的解决方案 - **Primary Language**: PHP - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 15 - **Created**: 2022-02-24 - **Last Updated**: 2022-02-24 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # TARS-PHP Tars PHP is a solution for PHP to use the tars binary protocol, as well as the overall operation and maintenance of the tars platform, RPC and a series of capabilities. It mainly consists of the following parts: If you want to experience tar server quickly, please enter the examples directory, which contains detailed deployment guidelines and development guidelines for three services * [tcp server](https://github.com/TarsPHP/TarsPHP/blob/master/examples/tars-tcp-server/README.md) * [http server](https://github.com/TarsPHP/TarsPHP/blob/master/examples/tars-http-server/README.md) * [timer server ](https://github.com/TarsPHP/TarsPHP/blob/master/examples/tars-timer-server/README.md) Refer to here for more detailed documents https://tarsphp.gitbook.io/doc ## tars-client The PHP ability to call the tar service is provided in the tar client, including: * Call the instance of the remote service; * Main dispatching Report * Automatic addressing module [Detailed description](https://github.com/TarsPHP/tars-client/blob/master/README.md) ## tars-server Tars-server provides the underlying server framework and supports the following features * High performance service based on swoole1. X / 2. X / 4. X * Support two protocol modes: tup protocol and tar stream * Support three kinds of servers: http, TCP and timer * Reporting, monitoring and log integration * Tars platform release support [Details Description](https://github.com/TarsPHP/tars-server/blob/master/README.md) ## tars-config The ability module to pull configuration files from the configuration service of the tar platform. [Details Description](https://github.com/TarsPHP/tars-config/blob/master/README.md) ## tars-deploy The module that packs the business code of tar server. [Detailed description](https://github.com/TarsPHP/tars-deploy/blob/master/README.md) ## tars-extension The PHP extension code that tar relies on [Detailed description](https://github.com/TarsPHP/tars-extension/blob/master/README.md) ## tars-log Tars Modules of remote log [Detailed description](https://github.com/TarsPHP/tars-log/blob/master/README.md) ## tars-monitor tarsFunction modules for main dispatching report and feature report [Detailed description](https://github.com/TarsPHP/tars-monitor/blob/master/README.md) ## tars-registry The function module of tars for master addressing [Detailed description](https://github.com/TarsPHP/tars-registry/blob/master/README.md) ## tars-report tars Module of keeping alive Report [Detailed description](https://github.com/TarsPHP/tars-report/blob/master/README.md) ## tars-utils tars Module for profile resolution [Detailed description](https://github.com/TarsPHP/tars-utils/blob/master/README.md) ## examples Three actual server instances and descriptions of TCP, HTTP and timer: * [tcp-server](https://github.com/TarsPHP/TarsPHP/tree/master/examples/tars-tcp-server) * [http-server](https://github.com/TarsPHP/TarsPHP/tree/master/examples/tars-http-server) * [timer-server](https://github.com/TarsPHP/TarsPHP/tree/master/examples/tars-timer-server) ## tars2php The tool of automatic code generation can automatically generate server and client code. [Detailed description](https://github.com/TarsPHP/tars2php/blob/master/README.md) ## tars Platform modification instructions for PHP Compared with the default template tar.default, PHP adds tar.tarsphp.default, mainly including the following parts: ``` ... ... php=/data/env/runtime/php-7.1.7/bin/php buffer_output_size=12582912 open_tcp_nodelay=1 open_eof_check=0 open_eof_split=0 task_worker_num=1 dispatch_mode=2 daemonize=1 ... ... ``` * Support custom PHP execution file (/ tar / application / server < PHP >), default / usr / bin / PHP. * Support the configuration of the startup file of the custom tar s_php framework (/ tar s / application / server < entry >), and the Src / index.php under the default project directory. * The startup script generated by the tar platform will execute the startup and shutdown script with entrance as the entry file. In the tar server module, three different HTTP, timer and TCP servers need to use different modules. Please be sure to add and modify new templates!!