Download the PHP package nekudo/angela without Composer
On this page you can find all versions of the php package nekudo/angela. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download nekudo/angela
More information about nekudo/angela
Files in nekudo/angela
Package angela
Short Description PHP worker/microservice framework based on ZeroMQ.
License MIT
Homepage https://github.com/nekudo/Angela
Informations about the package angela
What is Angela?
Angela is a PHP worker/microservice framework based on ZeroMQ.
A typical Angela application consists of a job-server, a client to communicate with the server and workers which do the actual jobs. Angela provides the job server, the client and an API so you can easily implement your worker processes.
Features
Job server
The job server is Angelas main process. It manages all your workers, listens for new job-requests, distributes these jobs to your workers and send back responses to the client. One server can manage multiple pools of workers and hence handle various types of jobs.
The job server will fire up worker-processes as defined in your project configuration. It will monitor the workers and for example restart processes if a worker crashes.
It is also capable of basic load-balancing so jobs will always be passed to the next idle worker.
Worker
Angela provides an API to easily build worker processes. Each worker typically does one kind of job (even though in can handle multiple types). You would than start multiple pools of worker processes which handle the different kind of jobs required in your application.
Example
Client
The client is a simple class which allows you to send commands or job-requests to the server. It can send commands, normal jobs or background-jobs.
Normal jobs are blocking as the client will wait for a response. Background jobs however are non-blocking. They will be processed by the server but the client does not wait for a response.
Example
Requirements
- PHP >= 7.0
- ZMQ PHP extension
- ev PHP extension (optional but recommand for better performance)
Installation
Using composer:
Documentation
Please see "example" folder for a dummy application. These are the most important files and commands:
- config.php: Holds all necessary configuration for the server and worker pools.
- control.php: A simple control-script to start/stop/restart your server and worker processes. Available commands are:
- php control.php start
- php control.php stop
- php control.php restart
- php control.php status
- php control.php kill
- php control.php flush-queue
- client.php: An example client sending jobs to the job server.
- worker/*.php: All your worker-scripts handling the actual jobs.
License
Released under the terms of the MIT license. See LICENSE file for details.
All versions of angela with dependencies
ext-zmq Version *
react/child-process Version ^0.4.0
katzgrau/klogger Version ^1.2.1
overnil/event-loop Version v0.0.3
react/zmq Version v0.3.0