Download the PHP package riki137/multitron without Composer

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

Multitron

Multitron is a PHP-based task orchestration and execution library designed to efficiently run and manage complex task trees. It's designed to handle parallel task execution, inter-process communication, and resource management.

⚠️ This library is still in early development and may have breaking changes in the future. However, it is already being used in production and actively developed.

Features

Installation

Multitron can be installed using Composer:

Usage

Basic Task Tree

Define your custom tasks by implementing the Task interface or extending the SimpleTask abstract class. Inject these tasks into a task tree using a dependency injection container.

Running the Task Tree

To run the task tree, ...

Error Logging

Configure error handling by using either a PSR-3 logger or Tracy for detailed error reports.

PSR-3 Logger

Tracy

Progress Reporting and Logging

Multitron provides real-time logging and progress updates that can be configured using the provided classes.

Task Partitioning

Partition tasks to run chunks of tasks in parallel, each of which operates on a subset of data.

Central Cache with TaskCommunicator

The Central Cache in Multitron offers a global shared memory space for tasks to read and write data efficiently across different task instances. This functionality is facilitated through the TaskCommunicator, which serves as an intermediary for these operations within the execute method of a task.

Operations Provided by TaskCommunicator

Within the context of a task's execution, the TaskCommunicator provides four key methods that interact with the Central Cache:

  1. $comm->read(string $key): ?array

    This method allows a task to read data from the Central Cache associated with the specified key. If the key exists, it retrieves the corresponding data and returns it as an array. If the key does not exist, it returns null.

  2. $comm->readSubset(string $key, array $subkeys): ?array

    This method reads a subset of the data stored under a specified key. It takes a key and an array of subkeys. It retrieves data for each of the provided subkeys if they exist, returning an associative array containing the subkeys and their corresponding values. If any subkey is not found, it will simply omit them from the result.

  3. $comm->write(string $key, array &$data): Future

    This method allows tasks to write or update data in the Central Cache associated with a specified key. It takes the key and a reference to the data array to be stored. The method asynchronously writes the data and returns a Future, allowing the task to continue execution without blocking.

  4. $comm->merge(string $key, array $data, int $level = 1): Future

    The merge method is used to merge new data into the existing data structure under a specified key in the Central Cache. It takes a key, the data to merge, and an optional merge level indicating how deep the array structure should be merged. This is particularly useful for hierarchical or nested data structures.

Contributing

Contributions, issues, and feature requests are welcome!

Feel free to check issues page if you want to contribute.

License

Multitron is licensed under the MIT License. See the LICENSE file for more details.


All versions of multitron with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
ext-pcntl Version *
ext-mbstring Version *
symfony/console Version ^5.4|^6.0|^7.0
amphp/parallel Version ^2.2
amphp/sync Version ^2.2
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 riki137/multitron contains the following files

Loading the files please wait ....