Joan Miquel 2034ecc449 Update Swoole in Laravel and Lumen (#5099) 6 years ago
..
app aeff04810e Add Laravel-swoole and Lumen-swoole benchmarks (#4090) 7 years ago
bootstrap 09a078e1f5 laravel: update to laravel 5.8 (#4525) 6 years ago
config e2d8689d5a Lumen db persistent connection (#4527) 6 years ago
database d27236b0e7 Upgrade PHP Lumen framework (#3390) 7 years ago
deploy 4f1ba335c3 Unify stack config (#4748) 6 years ago
public d27236b0e7 Upgrade PHP Lumen framework (#3390) 7 years ago
resources d27236b0e7 Upgrade PHP Lumen framework (#3390) 7 years ago
routes d27236b0e7 Upgrade PHP Lumen framework (#3390) 7 years ago
tests d27236b0e7 Upgrade PHP Lumen framework (#3390) 7 years ago
.env 6fce84a278 WIP: Dockerify everything (#3457) 7 years ago
artisan d27236b0e7 Upgrade PHP Lumen framework (#3390) 7 years ago
benchmark_config.json aff735317b [ci skip] Better names for the platforms (#4974) 6 years ago
composer.json 09a078e1f5 laravel: update to laravel 5.8 (#4525) 6 years ago
lumen-swoole.dockerfile 2034ecc449 Update Swoole in Laravel and Lumen (#5099) 6 years ago
lumen.dockerfile 60535c5cc2 Update php to Ubuntu 19.04 and nginx 1.15.9 (#4786) 6 years ago
phpunit.xml d27236b0e7 Upgrade PHP Lumen framework (#3390) 7 years ago
readme.md aeff04810e Add Laravel-swoole and Lumen-swoole benchmarks (#4090) 7 years ago

readme.md

Lumen PHP Framework

Build Status Total Downloads Latest Stable Version Latest Unstable Version License

Laravel Lumen is a stunningly fast PHP micro-framework for building web applications with expressive, elegant syntax. We believe development must be an enjoyable, creative experience to be truly fulfilling. Lumen attempts to take the pain out of development by easing common tasks used in the majority of web projects, such as routing, database abstraction, queueing, and caching.

Official Documentation

Documentation for the framework can be found on the Lumen website.

Security Vulnerabilities

If you discover a security vulnerability within Lumen, please send an e-mail to Taylor Otwell at [email protected]. All security vulnerabilities will be promptly addressed.

License

The Lumen framework is open-sourced software licensed under the MIT license

lumen-swoole Benchmarking Test

The lumen-swoole test is a benchmark test of Lumen running on Swoole.

Swoole is an asynchronous PHP webserver that runs as a PECL extension to PHP.

Traditional PHP servers use php-fpm to run PHP software. On each request, php-fpm initializes a new instance of the php framework, processes the request, returns the response, and terminates the php framework.
This results in decreased performance relative to other technologies like Java or node.js based frameworks which intialize only once and then process multiple requests without terminating in between.

Swoole provides this capability to PHP. When Swoole starts, it initializes the framework once and handles requests without terminating the framework between requests. Also, like nginx, netty, node.js, Swoole is an asynchronous event-loop based server.

Laravel-swoole is an adapter layer between Swoole and Laravel/Lumen. It provides facades for http requests and PDO database connections. It launches Laravel worker instances for each cpu core to handle incoming requests.

Also because Laravel was written under php-fpm environment where the framework is reset between each request, sometimes state changes are not re-initialized between requests since it isn't necessary in an environment where the framework is terminated after each request. To handle this, Laravel-swoole creates a sandbox for each request with a copy of initial framework state so that any changes made by the request do not impact the state of other incoming requests.

Brion Finlay 10/3/2018

Test Type Implementation Source Code

Important Libraries

The tests were run with:

Test URLs

JSON

http://localhost:8080/json

PLAINTEXT

http://localhost:8080/plaintext

DB

http://localhost:8080/db

QUERY

http://localhost:8080/queries/[count]

UPDATE

http://localhost:8080/updates/[count]

FORTUNES

http://localhost:8080/fortunes