Giter Club home page Giter Club logo

gearman's Introduction

Net/Gearman

This is a fork of mhlavac/gearman which has unfortunately been abandoned.

PHP library for interfacing with Danga's Gearman. Gearman is a system to farm out work to other machines, dispatching function calls to machines that are better suited to do work, to do work in parallel, to load balance lots of function calls, or to call functions between languages.

Installation

Add following line to your composer.json

"vectorface/gearman": "^0.2"

You can use following command

composer.phar require --dev vectorface/geaman:^0.2

Examples

Client

<?php

$client = new \Vectorface\Gearman\Client();
$client->addServer();

$result = $client->doNormal('replace', 'PHP is best programming language!');
$client->doBackground('long_task', 'PHP rules... PHP rules...');

Worker

<?php

$function = function($payload) {
    return str_replace('java', 'php', $payload);
};

$worker = new \Vectorface\Gearman\Worker();
$worker->addServer();
$worker->addFunction('replace', $function);

$worker->work();

Versioning

This library uses semantic versioning.

License

This library is under the new BSD license. See the complete license. See the complete license

About

I've started working on this because you can't compile PECL gearman extension on windows where I had to use the code. Goal of this project is to make copy of the PECL gearman extension and allow PHP developers to use this implementation as a polyfill for it.

gearman's People

Contributors

bkw avatar brianlmoon avatar francislavoie avatar jlcooke avatar joestump avatar lenn0x avatar mhlavac avatar rrehbein avatar sergeyklay avatar till avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Forkers

jlcooke

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.