Introduce parallel operations into your program with TamerLib
Find a file
2023-02-09 18:08:38 -05:00
.idea Some updates 2023-02-09 17:26:16 -05:00
src/TamerLib Added Monitor Mode 2023-02-09 18:08:38 -05:00
tests Some updates 2023-02-09 17:26:16 -05:00
.gitignore Initial Commit 2023-01-31 18:43:02 -05:00
.gitlab-ci.yml Initial Commit 2023-01-31 18:43:02 -05:00
LICENSE Initial Commit 2023-01-31 18:43:02 -05:00
Makefile Initial Commit 2023-01-31 18:43:02 -05:00
project.json Implemented supervisors, refactored some stuff, implemented closures, updated examples and added dependency for Symfony\Process 2023-02-05 17:24:22 -05:00
README.md Some updates 2023-02-09 17:26:16 -05:00

TamerLib

Coming soon...

Table of Contents

Usage

Tamer is designed to be simple to use while eliminating the need to write boilerplate code for common tasks, Tamer can only run as a client or worker on a process, so if you want to run both you must run two separate processes (but this is also handled by Tamer's builtin supervisor).

The approach Tamer takes is to be out of the way, and to allow you to focus on the code that matters, Tamer will handle the rest even the difficulty of having to use or implement different protocols.

Client Usage

Using Tamer as a client allows you to send jobs & closures to workers defined by your client, and receive the results of those jobs.

Initialization

To use the client, you must first create a connection to the server by running TamerLib\Tamer::init(string $protocol, array $servers) where $protocol is the protocol to use (see Supported Protocols) and $servers is an array of servers to connect to (eg. ['host:port', 'host:port'])

TamerLib\Tamer::init(\TamerLib\Abstracts\ProtocolType::Gearman, [
    'host:port', 'host:port'
], $password, $username);

Supported Protocols

  • Gearman
  • RabbitMQ (Work in progress)
  • Redis

License

This project is licensed under the MIT License - see the LICENSE file for details