koenbetsens / jobserver by koenbetsens

Gearman Jobserver Integration
656
4
1
Package Data
Maintainer Username: koenbetsens
Maintainer Contact: koen@betsens.be (Koen Betsens)
Package Create Date: 2015-02-08
Package Last Update: 2015-09-28
Language: PHP
License: MIT
Last Refreshed: 2024-04-24 03:02:04
Package Statistics
Total Downloads: 656
Monthly Downloads: 0
Daily Downloads: 0
Total Stars: 4
Total Watchers: 1
Total Forks: 1
Total Open Issues: 0

JobServer

Gearman JobServer implementation for Laravel

Gearman

Gearman is a MQ (Message Queue) provider with foreground and background capabilities. This makes it one of the few PHP-suited synchronous MQ handlers.

gearman.org

Laravel

Laravel is on of the leanest and meanest PHP Frameworks around - perfectly suited for rest API projects.

laravel.com


The package

The Jobserver package is a Gearman dispatch implementation for Laravel. The package functions as an abstraction layer to send both foreground as background jobs to a MQ server (Gearman in this case). The Jobserver package is taylored to use in the 3-layer structure (app <-> api <-> worker).

Read more about installing and using the jobserver package here:

3-layer - JobServer package

3-Layer - Set up Message Queueing


Implementation

Add the package to your API dependencies. To use the local "synced" mode - skipping a local Gearman installation - add the models/Ghostjob.php file to your worker app/models directory. To make the synced connection between the API and worker job function work, add "echo Ghostjob::evaluate ('controllerDispatch', $argv);" to the end of the required function files.

Installation

Add the Jobserver package to the composer requirements of your API project. In project/composer.json, add the koenbetsens/jobserver entry