Overview
Tencent Server Framework is a coroutine and Swoole based server framework for fast server deployment which developed by Tencent engineers.
Features
- PHP Based. Compared with C++, the framework is more efficient in developing and programing.
- based on Swoole extension. powerful async IO, timers and other infrastructure capacity can be used in this framework.
- support PHP coroutine. Synchronous programing is possible using the coroutine schedule system, and can lead to the similar server capability with that of server deveoped in an asynchronous way.
- support server monitor and provide interface to add more rules
Requirements
- php5.5+
- Swoole1.7.18+
- linux,OS X
Installation
Introduction
- Tencent Server Framework can help you to start your server quickly,you just need to set a few settings
Server
config
1 | 复制代码vim server.ini |
How
to start your server
1 | 复制代码cd /root/tsf/bin/ |
- Support Cmds: start,stop,reload,restart,status,shutdown,startall,list
How
to use TCP/UDP/HTTP Client
- we support different network protocols: TCP,UDP,HTTP
1 | 复制代码 |
How
to use Muticall
- Beside that,we also support Muticall:
- you can use Muticall to send TCP,UDP packets at the sametime
- when all the requests come back,return to interrupt
1 | 复制代码 |
Concect
to mysql async
1 | 复制代码 |
Router
- We support individuation route rules
- now we realize some universal route rules and restful rules
- besides that, we also support default GET parameter
1 | 复制代码 URL METHOD CONTROLLER ACTION |
Performance
Contribution
Your contribution to TSF development is very welcome!
You may contribute in the following ways:
- Repost issues and feedback
- Submit fixes, features via Pull Request
- Write/polish documentation
本文转载自: 掘金