Download the PHP package scil/laravel-fly without Composer

On this page you can find all versions of the php package scil/laravel-fly. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-fly

Please refer to Swoole handles multiple requests simultaneously per-worker and Hola FrankenPHP! Laravel Octane Servers Comparison

====

Would you like php 7.4 Preloading? Would you like php coroutine? Today you can use them with Laravel because of Swoole. With LaravalFly, Laravel will begin like Django 3.0 to be fully async-capable.

LaravelFly is a safe solution to speeds up new or old Laravel 5.5+ projects, with preloading and coroutine, while without data pollution or memory leak. And it makes Tinker available online (use tinker while Laravel is responding requests from browsers).

Thanks to Laravel, Swoole and PsySh.

Notice: Great News! Laravel is supporting Swoole offcially with laravel/octane!

A simple ab test

ab -k -n 1000 -c 10 http://zc.test (21 sql statements were executed in single request)

. fpm Fly
Time taken ≈ 43.5 s 12.3 s
Requests per second 23 81.5
50% 303 ms 117 ms
80% 360 ms 153 ms
99% 1341 ms 239 ms
Test Env
* env: - ubuntu 16.04 on VirtualBox ( 1 CPU: i7-7700HQ 2.80GHz ; Memory: 2G ) - php7.2 + opcache + 5 workers for both fpm and laravelfly ( phpfpm : pm=static pm.max_children=5) - connection pool and coroutine mysql * Test date : 2018/10

Version Compatibility

Quick Start

1.pecl install swoole
Make sure extension=swoole.so in config file for php cli, not for fpm.
Suggest: pecl install inotify

2.composer require "scil/laravel-fly":"dev-master"

3.php vendor/scil/laravel-fly/bin/fly start
If you enable eval(tinker()) and see an error about mkdir, you can start LaravelFly with sudo.

Now, your project is flying and listening to port 9501. Enjoy yourself.

Docker-compose

Doc

Configuration

Commands: Start, Reload & Debug

Coding Guideline

Events about LaravelFly

Using tinker when Laravel Working

For Dev

Recommended Packages

Features and Behaviors

A coroutine starting in a request, can still live when the request ends. What's the effect of following route?
It responds with 'coroutine1; outer1; coroutine2; outer2; outer3',
but it write log 'coroutine1; outer1; coroutine2; outer2; outer3; coroutine2.end; coroutine1.end'

Similar projects that mix swoole and laravel

The main distinguishing feature of LaravalFly is refactoring Laravel, like what Django 3.0 does.

1. laravel-swoole

It is alse a safe sollution. It has supported Lumen and websocket. Its doc is great and also useful for LaravelFly.

The main difference is that in laravel-swoole user's code will be processed by a new app cloned from SwooleTW\Http\Server\Application::$application and laravel-swoole updates related container bindings to the new app. However in LaravelFly, the sandbox is not a new app, but an item in the $corDict of the unique application container.
In LaravelFly, most other objects such as app, event.... always keep one object in a worker process, clone is not used at all by default. LaravelFly makes most of laravel objects keep safe on their own. It's about high cohesion & low coupling and the granularity is at the level of app container or services/objects. For users of laravel-swoole, it's a big challenge to handle the relations of multiple packages and objects which to be booted before any requests. Read Stale Reference.

. technique work to maintaining relations of cloned objects to avoid Stale Reference
laravel-swoole clone app contaniner and objects to make them safe more work (as app,event...are cloned)
LaravelFly Mode Map refactor most official objects to make them safe on their own few work ( nothing is cloned by default)

In LaravelFly, another benefit of non-cloned objects is allowing some improvements, such as event listeners cache, route middlewares cache.

2. laravel-s

Many great features!

About data pollution? Same technique and problems as laravel-swoole. And neither support coroutine jumping (from one request to another request).

Todo About Improvement

Other Todo


All versions of laravel-fly with dependencies

PHP Build Version
Package Version
Requires scil/laravel-fly-files Version 5.5.* || 5.6.* || 5.7.* || 5.8.*|| 6.0.* || 6.6.*
laravel/framework Version 5.5.* || 5.6.* || 5.7.* || 5.8.* || 6.0.* || 6.6.*
hhxsv5/laravel-s Version ~2.0
open-smf/connection-pool Version ~1.0
laravel/helpers Version *
ext-swoole Version >=4.2.13
composer/composer Version ^1.8
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package scil/laravel-fly contains the following files

Loading the files please wait ....