Download the PHP package steadweb/nyx without Composer

On this page you can find all versions of the php package steadweb/nyx. 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 nyx

Nyx

Build Status Scrutinizer Code Quality Code Coverage

A lighweight PHP process manager.

Nyx is a worker process manager which aims to provide functionality to run multiple workers based on configuration. The idea of Nyx replaces the need to run multiple windows / screens / commands within the termnial when instantiating workers.

A better example of Nyx would be to use Supervisor.d which is heavily supported and maintained. Nyx is a lightweight alternative written in PHP.

Example

Let's assume the scripts below are long-running process workers that need to be run from the command line. Multiple termnials (or linux screens) would be created to achieve this.

Nyx tries to eliminate this by allowing you to confgure the amount of workers you want to run, thus running one command.

Getting started

Download the latest .phar from https://steadweb.github.io/nyx

Or install using composer

Configuration

Using nyx.phar requires you to provide the location of your nyx.json. The configuration files suggests where your workers are located, how many workers the manager should spawn and whether to log the outout / errors to file.

Example.

This sample configuration will create three pools, each with one worker assigned. The first two pools will continue to ping their respective IPs 8.8.8.8 and 8.8.4.4. We'll come back to the third pool later on.

Basic usage

Once you've created your nyx.json run the following command:

php nyx.phar run /path/to/nyx.json

And you should see the following output:

Notes

To exit the manager, simply press CTRL + C and all sub processes will exit along with the manager.

Working example: foo.php

Our example configuration had three pools; two of those pools create one worker in each which would ping IPs. The third pool creates one worker which runs a PHP script, foo.php.

The example foo.php script is below. Take a look at the example, you'll notice the script ends after ~5 seconds.

Code

Nyx keeps track of each worker within the assigned pool and restarts the process if the worker has been signaled or has stopped, meaning Nyx will spawn an new worker for you.

As long as a worker process is deemed as running Nyx will not spawn a new worker until that process has been signaled or has stopped. Nyx will only ever spawn the amount of workes you have defined within config.

Testing

Checkout the repository from Github and run the following commands:

License

steadweb/nyx is licensed under MIT.


All versions of nyx with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3
hassankhan/config Version ^0.9.1
symfony/console Version ^2.6
squizlabs/php_codesniffer Version *
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 steadweb/nyx contains the following files

Loading the files please wait ....