PHP Classes
elePHPant
Icontem

swoft: Framework to develop coroutine based application

Recommend this page to a friend!
  Info   View files Documentation   View files View files (114)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2019-08-31 (2 months ago) RSS 2.0 feedNot enough user ratingsTotal: 68 This week: 2All time: 9,506 This week: 180Up
Version License PHP version Categories
swoft 1.0Custom (specified...5PHP 5, Libraries, Web services
Description Author

This package provides a Framework to develop coroutine based application.

It is based on the Swole extension to run parallel tasks using coroutines that are executed under a single CPU process.

Among other features, the package provides pure PHP based network servers that implement the protocols: HTTP, Web sockets, RPC and other TCP based protocols.

Innovation Award
PHP Programming Innovation award nominee
September 2019
Number 3
Swole is a PHP extension that allows PHP developers to implement coroutine based applications, so it can run multiple parallel tasks in the same HTTP request and finish handling that request on less time, thus making PHP applications run faster than using traditional pure PHP based applications.

This package is a framework that takes advantages of Swole to develop PHP applications easily.

Manuel Lemos
Name: stelin <contact>
Classes: 1 package by
Country: China China
Age: ???
All time rank: 428448 in China China
Week rank: 179 Up1 in China China Up
Innovation award
Innovation award
Nominee: 1x

 

Details

swoft-logo

Latest Stable Version Build Status Docker Build Status Php Version Swoole Version Swoft Doc Swoft License Gitter

start-http-server

PHP microservice coroutine framework

> ????

Introduction

Swoft is a PHP microservices coroutine framework based on the Swoole extension. Like Go, Swoft has a built-in coroutine web server and a common coroutine client and is resident in memory, independent of traditional PHP-FPM. There are similar Go language operations, similar to the Spring Cloud framework flexible annotations, powerful global dependency injection container, comprehensive service governance, flexible and powerful AOP, standard PSR specification implementation and so on.

Through three years of accumulation and direction exploration, Swoft has made Swoft the Spring Cloud in the PHP world, which is the best choice for PHP's high-performance framework and microservices management.

Feature

  • Built-in high performance network server(Http/Websocket/RPC/TCP)
  • Flexible componentization
  • Flexible annotation function
  • Diversified command terminal(Console)
  • Powerful Aspect Oriented Programming?AOP?
  • Perfect Container management?Dependency Injection (DI)
  • Flexible event mechanism
  • Implementation of HTTP message based on PSR-7
  • Event Manager Based on PSR-14
  • Middleware based on PSR-15
  • Internationalization(i18n) support
  • Simple and efficient parameter validator
  • High performance connection pool(Mysql/Redis/RPC)?Automatic reconnection
  • Database is highly compatible Laravel
  • Cache Redis highly compatible Laravel
  • Efficient task processing
  • Efficient seconds corntab
  • Process pool
  • Flexible exception handling
  • Powerful log system
  • Service registration & discovery
  • Service breaker
  • Service restrictions
  • Service fallback
  • Configuration Center
  • Apollo
  • Consul

Document

Discuss

Requirement

Install

Composer

composer create-project swoft/swoft swoft

Start

  • Http Server
[root@swoft swoft]# php bin/swoft http:start

  • WebSocket Server
[root@swoft swoft]# php bin/swoft ws:start

  • RPC Server
[root@swoft swoft]# php bin/swoft rpc:start

  • TCP Server
[root@swoft swoft]# php bin/swoft tcp:start

  • Process Pool
[root@swoft swoft]# php bin/swoft process:start

Core Components

Component Name | Packagist Version --------------------|--------------------- swoft-annotation | Latest Stable Version swoft-config | Latest Stable Version swoft-db | Latest Stable Version swoft-framework | Latest Stable Version swoft-i18n | Latest Stable Version swoft-proxy | Latest Stable Version swoft-rpc-client | Latest Stable Version swoft-stdlib | Latest Stable Version swoft-tcp-server | Latest Stable Version swoft-aop | Latest Stable Version swoft-connection-pool | Latest Stable Version swoft-error | Latest Stable Version swoft-http-message | Latest Stable Version swoft-log | Latest Stable Version swoft-redis | Latest Stable Version swoft-rpc-server | Latest Stable Version swoft-task | Latest Stable Version swoft-validator | Latest Stable Version swoft-bean | Latest Stable Version swoft-console | Latest Stable Version swoft-event | Latest Stable Version swoft-http-server | Latest Stable Version swoft-process | Latest Stable Version swoft-rpc | Latest Stable Version swoft-server | Latest Stable Version swoft-tcp | Latest Stable Version swoft-websocket-server | Latest Stable Version

Extension Components

Component Name | Packagist Version -----------------|--------------------- swoft-apollo | Latest Stable Version swoft-breaker | Latest Stable Version swoft-crontab | Latest Stable Version swoft-consul | Latest Stable Version swoft-limiter | Latest Stable Version swoft-view | Latest Stable Version swoft-whoops | Latest Stable Version

License

Swoft is an open-source software licensed under the LICENSE

  Files folder image Files  
File Role Description
Files folder image.github (2 files)
Files folder imageapp (3 files, 17 directories)
Files folder imagebin (2 files)
Files folder imageconfig (2 files, 1 directory)
Files folder imagepublic (1 directory)
Files folder imageresource (1 directory)
Accessible without login Plain text file .dockerignore Data Auxiliary data
Accessible without login Plain text file .editorconfig Data Auxiliary data
Accessible without login Plain text file .env.example Data Auxiliary data
Accessible without login Plain text file .php_cs Example Example script
Accessible without login Plain text file .travis.yml Data Auxiliary data
Accessible without login Plain text file composer.cn.json Data Auxiliary data
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file dev.composer.json Data Auxiliary data
Accessible without login Plain text file docker-compose.yml Data Auxiliary data
Accessible without login Plain text file Dockerfile Data Auxiliary data
Accessible without login Plain text file LICENSE Lic. License text
Accessible without login Plain text file phpstan.neon.dist Data Auxiliary data
Accessible without login Plain text file phpunit.xml Data Auxiliary data
Accessible without login Plain text file README.md Doc. Documentation
Accessible without login Plain text file README.zh-CN.md Doc. Documentation

  Files folder image Files  /  .github  
File Role Description
  Accessible without login Plain text file CODE_OF_CONDUCT.md Data Auxiliary data
  Accessible without login Plain text file ISSUE_TEMPLATE.md Data Auxiliary data

  Files folder image Files  /  app  
File Role Description
Files folder imageAnnotation (2 directories)
Files folder imageAspect (1 file)
Files folder imageCommon (2 files)
Files folder imageConsole (1 directory)
Files folder imageCrontab (1 file)
Files folder imageException (1 file, 1 directory)
Files folder imageHelper (1 file)
Files folder imageHttp (2 directories)
Files folder imageListener (5 files, 1 directory)
Files folder imageMigration (3 files)
Files folder imageModel (4 directories)
Files folder imageProcess (3 files)
Files folder imageRpc (3 directories)
Files folder imageTask (2 directories)
Files folder imageTcp (1 directory)
Files folder imageValidator (2 files, 1 directory)
Files folder imageWebSocket (3 files, 2 directories)
  Plain text file Application.php Class Class source
  Plain text file AutoLoader.php Class Class source
  Plain text file bean.php Class Class source

  Files folder image Files  /  app  /  Annotation  
File Role Description
Files folder imageMapping (1 file)
Files folder imageParser (1 file)

  Files folder image Files  /  app  /  Annotation  /  Mapping  
File Role Description
  Plain text file AlphaDash.php Class Class source

  Files folder image Files  /  app  /  Annotation  /  Parser  
File Role Description
  Plain text file AlphaDashParser.php Class Class source

  Files folder image Files  /  app  /  Aspect  
File Role Description
  Plain text file AnnotationAspect.php Class Class source

  Files folder image Files  /  app  /  Common  
File Role Description
  Plain text file DbSelector.php Class Class source
  Plain text file RpcProvider.php Class Class source

  Files folder image Files  /  app  /  Console  
File Role Description
Files folder imageCommand (3 files)

  Files folder image Files  /  app  /  Console  /  Command  
File Role Description
  Plain text file AgentCommand.php Class Class source
  Plain text file DemoCommand.php Class Class source
  Plain text file TestCommand.php Class Class source

  Files folder image Files  /  app  /  Crontab  
File Role Description
  Plain text file CronTask.php Class Class source

  Files folder image Files  /  app  /  Exception  
File Role Description
Files folder imageHandler (5 files)
  Plain text file ApiException.php Class Class source

  Files folder image Files  /  app  /  Exception  /  Handler  
File Role Description
  Plain text file ApiExceptionHandler.php Class Class source
  Plain text file HttpExceptionHandler.php Class Class source
  Plain text file RpcExceptionHandler.php Class Class source
  Plain text file WsHandshakeExceptionHandler.php Class Class source
  Plain text file WsMessageExceptionHandler.php Class Class source

  Files folder image Files  /  app  /  Helper  
File Role Description
  Accessible without login Plain text file Functions.php Aux. Auxiliary script

  Files folder image Files  /  app  /  Http  
File Role Description
Files folder imageController (18 files)
Files folder imageMiddleware (1 file)

  Files folder image Files  /  app  /  Http  /  Controller  
File Role Description
  Plain text file BeanController.php Class Class source
  Plain text file BreakerController.php Class Class source
  Plain text file CoController.php Class Class source
  Plain text file DbBuilderController.php Class Class source
  Plain text file DbModelController.php Class Class source
  Plain text file DbTransactionController.php Class Class source
  Plain text file ExceptionController.php Class Class source
  Plain text file HomeController.php Class Class source
  Plain text file LimiterController.php Class Class source
  Plain text file LogController.php Class Class source
  Plain text file RedisController.php Class Class source
  Plain text file RespController.php Class Class source
  Plain text file RpcController.php Class Class source
  Plain text file SelectDbController.php Class Class source
  Plain text file TaskController.php Class Class source
  Plain text file TimerController.php Class Class source
  Plain text file ValidatorController.php Class Class source
  Plain text file ViewController.php Class Class source

  Files folder image Files  /  app  /  Http  /  Middleware  
File Role Description
  Plain text file FavIconMiddleware.php Class Class source

  Files folder image Files  /  app  /  Listener  
File Role Description
Files folder imageTest (5 files)
  Plain text file DeregisterServiceListener.php Class Class source
  Plain text file ModelSavedListener.php Class Class source
  Plain text file RanListener.php Class Class source
  Plain text file RegisterServiceListener.php Class Class source
  Plain text file UserSavingListener.php Class Class source

  Files folder image Files  /  app  /  Listener  /  Test  
File Role Description
  Plain text file ShutDownListener.php Class Class source
  Plain text file StartListener.php Class Class source
  Plain text file TaskProcessListener.php Class Class source
  Plain text file WorkerStartListener.php Class Class source
  Plain text file WorkerStopListener.php Class Class source

  Files folder image Files  /  app  /  Migration  
File Role Description
  Plain text file AddMsg.php Class Class source
  Plain text file AddUser.php Class Class source
  Plain text file Message.php Class Class source

  Files folder image Files  /  app  /  Model  
File Role Description
Files folder imageDao (1 file)
Files folder imageData (1 file)
Files folder imageEntity (5 files)
Files folder imageLogic (8 files)

  Files folder image Files  /  app  /  Model  /  Dao  
File Role Description
  Plain text file UserDao.php Class Class source

  Files folder image Files  /  app  /  Model  /  Data  
File Role Description
  Plain text file UserData.php Class Class source

  Files folder image Files  /  app  /  Model  /  Entity  
File Role Description
  Plain text file Count.php Class Class source
  Plain text file Count2.php Class Class source
  Plain text file Desc.php Class Class source
  Plain text file User.php Class Class source
  Plain text file User3.php Class Class source

  Files folder image Files  /  app  /  Model  /  Logic  
File Role Description
  Plain text file ApolloLogic.php Class Class source
  Plain text file BreakerLogic.php Class Class source
  Plain text file ConsulLogic.php Class Class source
  Plain text file LimiterLogic.php Class Class source
  Plain text file MonitorLogic.php Class Class source
  Plain text file RequestBean.php Class Class source
  Plain text file RequestBeanTwo.php Class Class source
  Plain text file UserLogic.php Class Class source

  Files folder image Files  /  app  /  Process  
File Role Description
  Plain text file MonitorProcess.php Class Class source
  Plain text file Worker1Process.php Class Class source
  Plain text file Worker2Process.php Class Class source

  Files folder image Files  /  app  /  Rpc  
File Role Description
Files folder imageLib (1 file)
Files folder imageMiddleware (1 file)
Files folder imageService (3 files)

  Files folder image Files  /  app  /  Rpc  /  Lib  
File Role Description
  Plain text file UserInterface.php Class Class source

  Files folder image Files  /  app  /  Rpc  /  Middleware  
File Role Description
  Plain text file ServiceMiddleware.php Class Class source

  Files folder image Files  /  app  /  Rpc  /  Service  
File Role Description
  Accessible without login Plain text file big.data Data Auxiliary data
  Plain text file UserService.php Class Class source
  Plain text file UserServiceV2.php Class Class source

  Files folder image Files  /  app  /  Task  
File Role Description
Files folder imageListener (1 file)
Files folder imageTask (2 files)

  Files folder image Files  /  app  /  Task  /  Listener  
File Role Description
  Plain text file FinishListener.php Class Class source

  Files folder image Files  /  app  /  Task  /  Task  
File Role Description
  Plain text file SyncTask.php Class Class source
  Plain text file TestTask.php Class Class source

  Files folder image Files  /  app  /  Tcp  
File Role Description
Files folder imageController (1 file)

  Files folder image Files  /  app  /  Tcp  /  Controller  
File Role Description
  Plain text file DemoController.php Class Class source

  Files folder image Files  /  app  /  Validator  
File Role Description
Files folder imageRule (1 file)
  Plain text file CustomerValidator.php Class Class source
  Plain text file TestValidator.php Class Class source

  Files folder image Files  /  app  /  Validator  /  Rule  
File Role Description
  Plain text file AlphaDashRule.php Class Class source

  Files folder image Files  /  app  /  WebSocket  
File Role Description
Files folder imageChat (1 file)
Files folder imageTest (1 file)
  Plain text file ChatModule.php Class Class source
  Plain text file EchoModule.php Class Class source
  Plain text file TestModule.php Class Class source

  Files folder image Files  /  app  /  WebSocket  /  Chat  
File Role Description
  Plain text file HomeController.php Class Class source

  Files folder image Files  /  app  /  WebSocket  /  Test  
File Role Description
  Plain text file TestController.php Class Class source

  Files folder image Files  /  bin  
File Role Description
  Accessible without login Plain text file bootstrap.php Aux. Auxiliary script
  Accessible without login Plain text file swoft Example Example script

  Files folder image Files  /  config  
File Role Description
Files folder imagedev (1 file)
  Accessible without login Plain text file base.php Aux. Auxiliary script
  Accessible without login Plain text file db.php Aux. Auxiliary script

  Files folder image Files  /  config  /  dev  
File Role Description
  Accessible without login Plain text file db.php Aux. Auxiliary script

  Files folder image Files  /  public  
File Role Description
Files folder imageimage (2 files)

  Files folder image Files  /  public  /  image  
File Role Description
  Accessible without login Image file start-http-server.jpg Data Auxiliary data
  Accessible without login Image file swoft-logo-mdl.png Data Auxiliary data

  Files folder image Files  /  resource  
File Role Description
Files folder imageviews (2 directories)

  Files folder image Files  /  resource  /  views  
File Role Description
Files folder imagehome (1 file)
Files folder imagelayouts (1 file, 1 directory)

  Files folder image Files  /  resource  /  views  /  home  
File Role Description
  Accessible without login Plain text file index.php Aux. Auxiliary script

  Files folder image Files  /  resource  /  views  /  layouts  
File Role Description
Files folder imagedefault (2 files)
  Accessible without login Plain text file default.php Example Example script

  Files folder image Files  /  resource  /  views  /  layouts  /  default  
File Role Description
  Accessible without login Plain text file footer.php Aux. Auxiliary script
  Accessible without login Plain text file header.php Aux. Auxiliary script

 Version Control Unique User Downloads Download Rankings  
 100%
Total:68
This week:2
All time:9,506
This week:180Up