Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #29 from artur-graniszewski/develop
Release of 1.3.6
- Loading branch information
Showing
50 changed files
with
1,230 additions
and
543 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,114 @@ | ||
# Changelog | ||
|
||
## Version 1.3.6 | ||
- [Fix] Scheduler ignored custom configuration and used default `LruDiscipline` exclusively | ||
- [Fix] Typo in constructor's name of ProcessTitle class, method removed as it was never executed. | ||
- [Fix] Due to broken gzcompress() function in Facebook HHVM, ZEUS Web Server will now use `deflate` rather than `gzip` to compress HTTP responses | ||
- [Improvement] Lots of code improvements based on static code analysis, minor performance tweaks | ||
- [Improvement] Better handling of runtime exceptions in ZEUS Web Server | ||
- [Improvement] Changelog extracted from the main README file | ||
|
||
## Version 1.3.5 | ||
- [Feature] Added `stop` and `stop <service>` CLI commands to ZEUS | ||
- [Feature] Added various sanity checks to IPC adapters | ||
- [Feature] Application exists with appropriate error code when it detects that all of its Server Services have been shut-down externally | ||
|
||
## Version 1.3.4 | ||
- [Feature] Implemented Scheduler Disciplines functionality | ||
- [Feature] Extracted LRU Discipline from Scheduler core | ||
- [Fix] Scheduler was too aggressive in its calculations of number of spare processes to create | ||
- [Fix] Documentation fixes (added missing namespaces in configuration examples) | ||
- [Tests improvements] Improved code coverage | ||
|
||
## Version 1.3.3 | ||
- [Tests improvements] Improved code coverage | ||
- [Improvement] Documentation improvements and enhancements | ||
|
||
## Version 1.3.2 | ||
- [Fix] Quickfix for potential Task Pool exhaustion issue when using slow HTTP keep-alive connections | ||
- [Fix] POSIX Process MPM now uses `SchedulerEvent` just like the rest of ZEUS Scheduler's code | ||
- [Fix] Scheduler Status View console command now properly shows status of Processes in TERMINATED state | ||
|
||
## Version 1.3.1 | ||
- [Fix] Configured Travis builds to not to use phpunit 6.x | ||
|
||
## Version 1.3.0 | ||
- [Feature] Heavy refactoring of `Scheduler` events | ||
- [Feature] Improved `Process` and `Scheduler` life cycle. | ||
- [Feature] New `SchedulerEvent` introduced. | ||
- [Feature] Now its possible to provide text description along the process status | ||
- [Feature] Console Server Service status command shows extended status descriptions | ||
- [Feature] From now on each HTTP keep-alive request handled by ZEUS Web Server will reduce the TTL of entire process. | ||
|
||
## Version 1.2.3 | ||
- [Feature] Introduced `ON_PROCESS_CREATED` event to `Scheduler` | ||
- [Feature] Now its possible to intercept `ON_SCHEDULER_STOP` event before `exit()` | ||
- [Fix] Fixed various `ON_SCHEDULER_STOP` event triggering inconsistencies | ||
- [Fix] Added `ext-pcntl` to Composer as required PHP extension | ||
- [Tests improvements] Improved code coverage + dead code removed | ||
|
||
## Version 1.2.2 | ||
- [Feature] Added `StreamLogFormatter` and basic strategy that chooses between `StreamLogFormatter` and `ConsoleLogFormatter` depending on stream type. | ||
- [Fix] Added `zendframework/zend-console` as required Composer package | ||
- [Tests improvements] Improved code coverage | ||
|
||
## Version 1.2.1 | ||
- [Fix] Renamed status names reported by a Service Status command to be inline with those reported by Proces Title functionality | ||
|
||
## Version 1.2.0 | ||
- [Feature] Added new commandline options `index.php zeus status` and `index.php zeus status <service_name>` | ||
- [Fix] Fixed Scheduler's `ON_SERVER_START` and `ON_SCHEDULER_START` event triggering inconsistency | ||
- [Fix] Refactor of `FixedCollection` iterator code for improved HHVM compatibility | ||
- [Fix] Fixed request counter in ZEUS Web Server | ||
- [Tests improvements] Improved code coverage | ||
|
||
## Version 1.1.8 | ||
- [Feature] Added MIME type detection to ZEUS Web Server's `StaticFileDispatcher` | ||
- [Tests improvements] Code coverage for `StaticFileDispatcher` | ||
- [Fix] ZEUS Web Server returned 404 HTTP status code instead of 400 when attempting to list a directory | ||
- [Fix] Fixed compatibility between `FixedCollection` and HHVM | ||
- [Fix] Resolved issue wih invalid handling of first element in `FixedCollection` | ||
|
||
## Version 1.1.7 | ||
- [Fix] Fixed read/write indexing in `ApcAdapter` | ||
- [Fix] Performance fix in HTTP hosts cache (ZEUS Web Server) | ||
- [Tests improvements] Code coverage tests moved from PHP 5.6 to 7.1 | ||
- [Tests improvements] Enabled APCu tests in Travis | ||
|
||
## Version 1.1.6 | ||
- [Fix] Various fixes for IpcAdapters: `MsgAdapter`, `ApcAdapter`, `FifoAdapter` | ||
- [Fix] Fixed permissions of some PHP files | ||
|
||
## Version 1.1.5 | ||
- [Feature] New event `Zeus\Kernel\ProcessManager\SchedulerEvent::PROCESS_EXIT` introduced | ||
- [Feature] Improved console help | ||
- [Unclassified] Dead code removal, README tweaks | ||
- [Tests improvements] More `Scheduler` tests added | ||
|
||
## Version 1.1.4 | ||
- [Unit tests fix] Fix for division by zero error in PHP 5.6 unit tests in `ProcessTitle` class | ||
- [Tests improvements] Added test class for Scheduler, increased tests code coverage | ||
- [Fix] Fixed PHP 5.6 compatibility in `Scheduler` garbage collection mechanism | ||
|
||
## Version 1.1.3 | ||
- [Feature] Enabled travis build and improved phpunit configuration | ||
- [Unit tests fix] Fix for failing phpunit tests due to the recent changes in ZEUS Web Server classes and interfaces | ||
- [Security fix] Fixed ZEUS Web Server logger throwing fatal exception and leaving open connection when HTTP request was corrupted | ||
- [Unclassified] Various `composer.json` fixes and tweaks | ||
|
||
## Version 1.1.2 | ||
- [Composer fix] Corrected PSR4 installation path in `composer.json` file | ||
- [Documentation] Updated road-map | ||
|
||
## Version 1.1.1 | ||
- [Composer fix] Specified ZEUS license type in `composer.json` | ||
- [Documentation fix] Fixed command syntax that installs ZEUS via Composer | ||
|
||
## Version 1.1.0 | ||
- [Performance fix] ZEUS Web Server uses a custom React PHP `Buffer` implementation to overcome severe `fwrite` performance penalty when serving large files through a keep-alive connection | ||
- [Security fix] ZEUS Web Server counts the number of keep-alive requests and closes connection when the requests limit is reached. | ||
- [Feature] Implemented `IpcLoggerInterface` and `IpcLoggerWriter` to send logs through IPC to a Scheduler which will act as as a logger sink. | ||
- [Feature] Service name is now reported by a built-in logger processor | ||
|
||
## Version 1.0.0 | ||
- Initial revision |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,240 @@ | ||
# Installing Apigility with ZEUS | ||
|
||
## Installing Apigility first | ||
Commands: | ||
``` | ||
artur@osboxes:/var/www$ composer create-project zfcampus/zf-apigility-skeleton --quiet | ||
artur@osboxes:/var/www$ cd zf-apigility-skeleton/ | ||
artur@osboxes:/var/www/zf-apigility-skeleton$ composer development-enable | ||
``` | ||
|
||
Output: | ||
``` | ||
> zf-development-mode enable | ||
You are now in development mode. | ||
``` | ||
|
||
## Installing ZEUS on top of Apigility | ||
Command: | ||
``` | ||
artur@osboxes:/var/www/zf-apigility-skeleton$ composer require zeus-server/zf3-server | ||
``` | ||
|
||
Output: | ||
``` | ||
Using version ^1.3 for zeus-server/zf3-server | ||
./composer.json has been updated | ||
Loading composer repositories with package information | ||
Updating dependencies (including require-dev) | ||
- Installing psr/log (1.0.2) | ||
Loading from cache | ||
- Installing zendframework/zend-log (2.9.1) | ||
Loading from cache | ||
Please select which config file you wish to inject 'Zend\Log' into: | ||
[0] Do not inject | ||
[1] config/modules.config.php | ||
[2] config/development.config.php.dist | ||
Make your selection (default is 0):1 | ||
Remember this option for other packages of the same type? (y/N)y | ||
Installing Zend\Log from package zendframework/zend-log | ||
- Installing evenement/evenement (v2.0.0) | ||
Loading from cache | ||
- Installing react/stream (v0.4.6) | ||
Loading from cache | ||
- Installing react/promise (v2.5.0) | ||
Loading from cache | ||
- Installing react/event-loop (v0.4.2) | ||
Loading from cache | ||
- Installing react/socket (v0.4.6) | ||
Loading from cache | ||
- Installing react/promise-timer (v1.1.1) | ||
Downloading: 100% | ||
- Installing react/cache (v0.4.1) | ||
Loading from cache | ||
- Installing react/dns (v0.4.6) | ||
Downloading: 100% | ||
- Installing react/socket-client (v0.4.6) | ||
Loading from cache | ||
- Installing psr/http-message (1.0.1) | ||
Loading from cache | ||
- Installing ringcentral/psr7 (1.2.1) | ||
Loading from cache | ||
- Installing react/http (v0.4.4) | ||
Loading from cache | ||
- Installing guzzlehttp/psr7 (1.4.1) | ||
Downloading: 100% | ||
- Installing react/http-client (v0.4.16) | ||
Downloading: 100% | ||
- Installing react/child-process (v0.4.3) | ||
Downloading: 100% | ||
- Installing react/react (v0.4.2) | ||
Loading from cache | ||
- Installing zendframework/zend-text (2.6.0) | ||
Loading from cache | ||
- Installing zendframework/zend-mvc-console (1.1.11) | ||
Loading from cache | ||
Installing Zend\Mvc\Console from package zendframework/zend-mvc-console | ||
- Installing zeus-server/zf3-server (1.3.5) | ||
Downloading: 100% | ||
zendframework/zend-log suggests installing ext-mongo (mongo extension to use Mongo writer) | ||
zendframework/zend-log suggests installing ext-mongodb (mongodb extension to use MongoDB writer) | ||
zendframework/zend-log suggests installing zendframework/zend-mail (Zend\Mail component to use the email log writer) | ||
react/event-loop suggests installing ext-libevent (>=0.1.0) | ||
react/event-loop suggests installing ext-event (~1.0) | ||
react/event-loop suggests installing ext-libev (*) | ||
react/react suggests installing ext-libevent (Allows for use of a more performant event-loop implementation.) | ||
react/react suggests installing ext-libev (Allows for use of a more performant event-loop implementation.) | ||
react/react suggests installing ext-event (Allows for use of a more performant event-loop implementation.) | ||
Writing lock file | ||
Generating autoload files | ||
``` | ||
|
||
## Enabling ZEUS and checking if it responds | ||
Commands: | ||
``` | ||
artur@osboxes:/var/www/zf-apigility-skeleton$ sed -i "s/'Application',/'Application','Zeus',/g" config/modules.config.php | ||
artur@osboxes:/var/www/zf-apigility-skeleton$ php public/index.php zeus status | ||
``` | ||
Output: | ||
``` | ||
2017-03-15 11:55:04.310 INFO 8802 --- [ main] erverService\Shared\Logger\LoggerFactory : | ||
__________ _________ | ||
\____ /____ __ __/ _____/ PHP | ||
/ // __ \| | \_____ \ | ||
/ /\ ___/| | / \ | ||
/_______ \___ >____/_______ / | ||
\/ \/ \/ | ||
ZEUS for PHP - ZF3 Edition (1.3.4) | ||
2017-03-15 11:55:04.311 INFO 8802 --- [ main] el\ProcessManager\Factory\ManagerFactory : Scanning configuration for services... | ||
2017-03-15 11:55:04.316 INFO 8802 --- [ main] el\ProcessManager\Factory\ManagerFactory : Found 1 service(s): zeus_httpd | ||
2017-03-15 10:55:04.326 ERR 8802 --- [ main] Zeus\Controller\ZeusController : Service "zeus_httpd" is offline or too busy to respond | ||
``` | ||
|
||
## Starting ZEUS Web Server | ||
Command: | ||
``` | ||
artur@osboxes:/var/www/zf-apigility-skeleton$ php public/index.php zeus start zeus_httpd | ||
2017-03-15 11:56:09.004 INFO 8828 --- [ main] erverService\Shared\Logger\LoggerFactory : | ||
__________ _________ | ||
\____ /____ __ __/ _____/ PHP | ||
/ // __ \| | \_____ \ | ||
/ /\ ___/| | / \ | ||
/_______ \___ >____/_______ / | ||
\/ \/ \/ | ||
ZEUS for PHP - ZF3 Edition (1.3.4) | ||
2017-03-15 11:56:09.004 INFO 8828 --- [ main] el\ProcessManager\Factory\ManagerFactory : Scanning configuration for services... | ||
2017-03-15 11:56:09.009 INFO 8828 --- [ main] el\ProcessManager\Factory\ManagerFactory : Found 1 service(s): zeus_httpd | ||
2017-03-15 10:56:09.011 INFO 8828 --- [ zeus_httpd] Zeus\ServerService\Http\Service : Launching HTTP server on 0.0.0.0:7070 | ||
2017-03-15 10:56:09.016 INFO 8828 --- [ zeus_httpd] Zeus\Kernel\ProcessManager\Scheduler : Starting server | ||
2017-03-15 10:56:09.020 DEBUG 8829 --- [ zeus_httpd] Zeus\Kernel\ProcessManager\Scheduler : Scheduler starting... | ||
2017-03-15 10:56:09.020 INFO 8828 --- [ main] Zeus\Controller\ZeusController : Started 1 services in 0.01 seconds (PHP running for 0.09) | ||
2017-03-15 10:56:09.020 INFO 8829 --- [ zeus_httpd] Zeus\Kernel\ProcessManager\Scheduler : Scheduler started | ||
``` | ||
|
||
## Opening Apigility UI in Web Browser | ||
|
||
Open the following URL in your favourite browser: [http://localhost:7070/](http://localhost:7070/) | ||
|
||
_Host name may differ if you're running ZEUS outside of your local machine._ | ||
|
||
## Verifying ZEUS performance | ||
|
||
### Static files | ||
|
||
Make sure that Apache Benchmark tool is installed. | ||
|
||
Open another terminal instance (ZEUS should be running in the first terminal) | ||
|
||
We will test performance of 8 concurrent OPTIONS requests (the -i switch) using the keep-alive connections. | ||
|
||
Command: | ||
``` | ||
artur@osboxes:/var/www/zf-apigility-skeleton$ ab -n 50000 -c 8 -k -i http://127.0.0.1:7070/apigility-ui/img/ag-hero.png | ||
``` | ||
|
||
Output (on _Intel Core i3_): | ||
``` | ||
This is ApacheBench, Version 2.3 <$Revision: 1706008 $> | ||
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ | ||
Licensed to The Apache Software Foundation, http://www.apache.org/ | ||
Benchmarking 127.0.0.1 (be patient) | ||
Completed 5000 requests | ||
Completed 10000 requests | ||
Completed 15000 requests | ||
Completed 20000 requests | ||
Completed 25000 requests | ||
Completed 30000 requests | ||
Completed 35000 requests | ||
Completed 40000 requests | ||
Completed 45000 requests | ||
Completed 50000 requests | ||
Finished 50000 requests | ||
Server Software: | ||
Server Hostname: 127.0.0.1 | ||
Server Port: 7070 | ||
Document Path: /apigility-ui/img/ag-hero.png | ||
Document Length: 0 bytes | ||
Concurrency Level: 8 | ||
Time taken for tests: 14.131 seconds | ||
Complete requests: 50000 | ||
Failed requests: 0 | ||
Keep-Alive requests: 49509 | ||
Total transferred: 6942144 bytes | ||
HTML transferred: 0 bytes | ||
Requests per second: 3538.23 [#/sec] (mean) | ||
Time per request: 2.261 [ms] (mean) | ||
Time per request: 0.283 [ms] (mean, across all concurrent requests) | ||
Transfer rate: 479.74 [Kbytes/sec] received | ||
Connection Times (ms) | ||
min mean[+/-sd] median max | ||
Connect: 0 0 0.0 0 2 | ||
Processing: 0 2 3.1 1 77 | ||
Waiting: 0 2 3.0 1 77 | ||
Total: 0 2 3.1 1 77 | ||
Percentage of the requests served within a certain time (ms) | ||
50% 1 | ||
66% 2 | ||
75% 3 | ||
80% 3 | ||
90% 6 | ||
95% 9 | ||
98% 12 | ||
99% 14 | ||
100% 77 (longest request) | ||
``` | ||
|
||
Similar tests may be performed for other files or Zend Framework actions. |
Oops, something went wrong.