Download the PHP package zeus-server/zf3-server without Composer
On this page you can find all versions of the php package zeus-server/zf3-server. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download zeus-server/zf3-server
More information about zeus-server/zf3-server
Files in zeus-server/zf3-server
Package zf3-server
Short Description A native PHP, event-driven, preemptive Multitasking Runtime Environment and Service Management System integrated with Zend Framework 3. It's main purpose is to perform multiple tasks (processes) concurrently.
License LGPL-3.0-only
Homepage http://php.webtutor.pl/zeus/docs/
Informations about the package zf3-server
Introduction
ZEUS for PHP is an event-driven, preemptive Multitasking Runtime Environment and Service Management System integrated with Zend Framework 3. It's main purpose is to perform multiple tasks (processes) concurrently.
To guarantee true parallelism and resource isolation ZEUS employs preemptive schedulers and an Inter-Process Communication mechanism to allow its processes to share the data.
ZEUS for PHP is not a standalone service, in order to use it, it must be installed as a module on-top of any Zend Framework application!.
It's designed to be compliant with any ZF3 application such as Apigility or ZendSkeletonApplication. Custom applications must provide index.php
file such as this which instantiates the Zend Framework MVC Zend\Mvc\Application
class.
Features
- Preemptive schedulers allowing to run multiple services asynchronously
- Built-in IPC server with various IPC Adapters suitable for different Operating Systems or usage characteristics
- Server service manager allowing to start, stop and track the status of ZEUS server services
- Well defined, extensive Server Service life-cycle based on Zend Framework
EventManager
functionality and events such asSchedulerEvent
andManagerEvent
- Possibility to write your own asynchronous Server Services by using just few lines of boilerplate code
- Advanced status reporting tools tracking the life-cycle and usage statistics of each service and its processes
- Deep integration with Zend Framework 3+ and its services such as
EventManager
andServiceManager
- Plugin support allowing to extend functionality of ZEUS Schedulers and Server Services
- Attachable, event-driven Server Services, Processes and Schedulers, allowing to react on and alter each step of their life-cycle
- Customizable, user friendly Logger functionality based on and compatible with Zend Framework 3
Logger
module - Easy configuration and customization of ZEUS components provided by Zend Framework 3
Config
module - Built-in
async()
controller plugin and the Async Server Service which allow to run multiple anonymous function/closures asynchronously - Self hosted - ZEUS comes equipped with its own, high-speed HTTP Server Service implementation supporting HTTP/1.0 and HTTP/1.1 protocols, keep-alive connections and a deflate compression
- Can be integrated with any Zend Framework 3 Application with just few commands issued in a terminal
- Compatible with Zend Framework
MVC
module, enabling ZEUS to dispatch HTTP requests both for static files as well as any Zend Framework Application controller - Equipped with its own, customizable Memcached Server Service that is integrated with Zend Framework 3
Cache
module, allowing to use any of itsCache
adapters as a Memcached key storage - Compatible with any UNIX/Linux/BSD platform
- Well documented and unit tested (with at least 90% code coverage)
- Stress tested, shipped with its own benchmark tests
- Compatible with and tested against PHP 5.6, PHP 7.0, PHP 7.1 and HHVM
Documentation
Full documentation can be found here.
Sample usage
Supported command line options
Since version 1.3.5, the following commands are supported (assuming that Zend Framework's index.php
application bootstrap file is compatible with Zend Framework 3 MVC
Module):
index.php zeus start
- Starts all ZEUS Server Servicesindex.php zeus start <service-name>
- Starts selected Server Serviceindex.php zeus list
- Lists all Server Services and their configurationindex.php zeus list <service-name>
- Shows the configuration of a selected Server Serviceindex.php zeus status
- Returns current status of all Server Servicesindex.php zeus status <service-name>
- Returns current status of the selected Server Serviceindex.php zeus stop
- Stops all ZEUS Server Servicesindex.php zeus stop <service-name>
- Stops selected Server Service
Starting built-in Web Server
Command:
Output:
Checking any Server Service status
Command:
Output:
Viewing process status using OS commands
Command:
Executing functions asynchronously in ZF3 controllers
First, the Async Server Service must be launched in order to execute anonymous functions.
Command:
The following ZF3 Application code can be handled by any HTTP Server, such as Apache HTTPD or Nginx - such functions are serialized and send to Async Server Service for asynchronous execution.
Building HTML documentation
Please note, mkdocs must be installed first using the apt-get
command, or any other OS-specific package-manager.
Command:
Serving markdown documentation
Command:
After executing above command, ZEUS documentation can be found under the following URL: http://127.0.0.1:8080/
Performance
Most of the ZEUS code was heavily optimized and thoroughly tested for speed and efficiency.
As the response times of most of ZEUS services dropped below 1 milisecond, its common for ZEUS to handle more than 24,000 requests/second on an average mobile Intel Core i7 processor:
Or achieve transfer speeds higher than 23 Gbits/sec:
Requirements
OS requirements
- Linux/Unix/BSD platform
- Windows platform currently not supported
PHP requirements
- PHP 5.6+ (HHVM or PHP 7+ is recommended for performance reasons as ZEUS can be up to 4x faster and use less memory)
- Posix module installed and enabled
- Pcntl module installed and enabled
- socket functions enabled for IPC purposes
Library requirements
- Zend Framework 3+ application (with the following modules installed:
zend-mvc
,zend-mvc-console
,zend-console
,zend-log
,zend-config
) - Opis library (
opis/closure
)
Installation
ZEUS for PHP can be installed in two different ways:
Downloading
via Composer:
by downloading source code
Source codes can be found in ZIP file under the following URL: https://github.com/artur-graniszewski/ZEUS-for-PHP/archive/master.zip
After downloading, contents of the compressed ZEUS-for-PHP-master
directory in ZIP file must be unpacked into a ZF3 zf3-application-directory/module/Zeus
directory.
Enabling ZEUS module
After installation, ZEUS for PHP must be activated in Zend Framework's config/modules.config.php
file, like so:
This can be achieved either by modifying configuration file in any text editor, or by issuing sed
command in Application's root directory:
If ZEUS for PHP is installed correctly, the following terminal command will show ZEUS version and its services in console:
Road map
Short-term
Documentation
- Improvement of ZEUS documentation
- Tutorials and How-to's
Web Server
- Code refactor and HTTP performance improvements
- Performance improvements in Application dispatcher when handling Zend Framework applications
- (implemented)
Removing dependency on ReactPHP - More configuration options
Inter-Process Communication
- Various code improvements in IPC adapters
- Introduction of IPC strategy that will choose the most efficient IPC implementation depending on a platform.
Server Service Manager
- Additional
EventManager
events covering full application lifecycle - (implemented)
More advanced Service reporting and control tools for terminal and remote use - (implemented)
Add a plugin that drops user privileges on start of the Server Service - Advanced,
systemd
-like handling of Server Service failures or remote shutdowns
Process Manager
- (implemented)
Configurable, more robust scheduling strategies (like terminating processes that handled the largest amount of request, etc)*
Tests
- More automatic tests
Long-Term
POSIX Threads
- Adding support for threads in PHP
Connection pooling
- NGINX like connection pooling in ZEUS Web Server (performance improvement)
- Abstract Server Service classes that will speed up the development of other types of connection pooling services
- Database connection pooling (?)
FastCGI/FPM
- Add possibility to execute Server Services in isolated PHP instances
- Allow ZEUS Web Server to host FastCGI/FPM applications
Experimental support for Windows platform
Other services
- (implemented Memcached instead) ~~Redis Server Service implementation PoC ~~
- More features introduced to ZEUS Web Server
All versions of zf3-server with dependencies
ext-posix Version *
ext-pcntl Version *
zendframework/zend-mvc Version ^3.0.1
zendframework/zend-console Version ^2.6
zendframework/zend-config Version ^2.6
zendframework/zend-mvc-console Version ^1.1
zendframework/zend-log Version ^2.9
opis/closure Version ^2.4.0