All Projects → james2doyle → swoole-examples

james2doyle / swoole-examples

Licence: MIT license
Examples on how to use the Swoole async PHP framework

Programming Languages

PHP
23972 projects - #3 most used programming language
Blade
752 projects
HTML
75241 projects

Projects that are alternatives of or similar to swoole-examples

Mix
☄️ PHP CLI mode development framework, supports Swoole, WorkerMan, FPM, CLI-Server / PHP 命令行模式开发框架,支持 Swoole、WorkerMan、FPM、CLI-Server
Stars: ✭ 1,753 (+2639.06%)
Mutual labels:  coroutine
Unityfx.async
Asynchronous operations (promises) for Unity3d.
Stars: ✭ 143 (+123.44%)
Mutual labels:  coroutine
Yurunhttp
YurunHttp 是开源的 PHP HTTP 客户端,支持链式操作,简单易用。完美支持Curl、Swoole 协程。QQ群:17916227
Stars: ✭ 197 (+207.81%)
Mutual labels:  coroutine
Swoole Docker
See: https://github.com/swoole/docker-swoole
Stars: ✭ 132 (+106.25%)
Mutual labels:  coroutine
Aint Queue
🚀 An async-queue library built on top of swoole, flexable multi-consumer, coroutine supported. 基于 Swoole 的一个异步队列库,可弹性伸缩的工作进程池,工作进程协程支持。
Stars: ✭ 143 (+123.44%)
Mutual labels:  coroutine
Yii2 Swoole
make yii2 project runing on swoole
Stars: ✭ 161 (+151.56%)
Mutual labels:  coroutine
Qtnetworkng
QtNetwork Next Generation. A coroutine based network framework for Qt/C++, with more simpler API than boost::asio.
Stars: ✭ 125 (+95.31%)
Mutual labels:  coroutine
Libaco
A blazing fast and lightweight C asymmetric coroutine library 💎 ⛅🚀⛅🌞
Stars: ✭ 2,918 (+4459.38%)
Mutual labels:  coroutine
Guzzle Swoole
让基于 Guzzle 的项目完美无缝兼容 Swoole 协程,支持:Guzzle、Elasticsearch client——来自宇润 PHP 全家桶
Stars: ✭ 143 (+123.44%)
Mutual labels:  coroutine
Mvvmtemplate
An Android Template with MVVM and Clean Architecture
Stars: ✭ 182 (+184.38%)
Mutual labels:  coroutine
Unitask
Provides an efficient allocation free async/await integration for Unity.
Stars: ✭ 2,547 (+3879.69%)
Mutual labels:  coroutine
Fiber Ext
stackful-coroutines for PHP
Stars: ✭ 142 (+121.88%)
Mutual labels:  coroutine
Hyperf Skeleton
🛠 A skeleton of Hyperf framework that provided by official team
Stars: ✭ 162 (+153.13%)
Mutual labels:  coroutine
Archer
基于协程Swoole的Task组件,支持多种模式。轻松实现协程Task的队列、并发、Defer、计时器等 | Swoole coroutine task kit - Swoole Humanization Library
Stars: ✭ 132 (+106.25%)
Mutual labels:  coroutine
Libgo
Go-style concurrency in C++11
Stars: ✭ 2,521 (+3839.06%)
Mutual labels:  coroutine
Awesomegithub
🔥Android Github客户端,基于组件化开发,支持账户密码与认证登陆。使用Kotlin语言进行开发,项目架构是基于JetPack&DataBinding的MVVM;项目中使用了Arouter、Retrofit、Coroutine、Glide、Dagger与Hilt等流行开源技术。
Stars: ✭ 128 (+100%)
Mutual labels:  coroutine
Co
Art of C++. Flag, logging, unit-test, json, go-style coroutine and more.
Stars: ✭ 2,264 (+3437.5%)
Mutual labels:  coroutine
raster
A micro server framework, support coroutine, and parallel-computing, used for building flatbuffers/thrift/protobuf/http protocol service.
Stars: ✭ 19 (-70.31%)
Mutual labels:  coroutine
Trip
Async HTTP for Humans, coroutine Requests ⛺️
Stars: ✭ 211 (+229.69%)
Mutual labels:  coroutine
Minicoro
Single header asymmetric stackful cross-platform coroutine library in pure C.
Stars: ✭ 164 (+156.25%)
Mutual labels:  coroutine

Swoole Example Projects

Examples on how to use the swoole async PHP framework

Examples Inside

  • serve-file: server a file using the correct mimetype
  • client: make an async call to an external domain and download the page
  • channel: share memory and data between coroutines
  • process: load an external program and run it multiple processes
  • router: use an off-the-rack router (nikic/fast-route) to route request methods and URIs
  • websocket: a chat example with websockets
  • slim: an example of how to use the Slim Framework
  • users: using Swoole with Laravel with the laravel-swoole/wiki/Z1.-Notices
  • event-source: an example of the EventSource long-lived connection

Installation

Take a look inside docker-compose.yml and uncomment the example you want to run.

  • composer install
  • docker-compose up

Installation for Laravel example

  • cd users
  • composer install
  • cp .env.example .env
  • Update DB_CONNECTION=sqlite and comment out any other DB_* lines
  • touch database/database.sqlite
  • php artisan key:generate
  • php artisan migrate
  • php artisan db:seed

Development

When modifying files, you need to restart the docker instance to see the changes. This is because the files are loaded into Swooles memory and therefore cannot be modified after the server is started. You may be familiar with this workflow if you developed anything using Node.js.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].