Questions tagged [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.

Gearman is an open source application framework originally written in Perl by Brad Fitzpatrick. Brian Aker and Eric Day rewrote the framework in C.

Gearman is designed to distribute appropriate computer tasks to multiple computers, so large tasks can be done more quickly.

In some cases, load balancing rather than raw speed may be the main goal; a Web server, for instance, could use Gearman to send tasks for which it is not optimized to another computer (which may be running on a different architecture, using another operating system, or loaded with a computer language better suited to a particular operation).

Job server is available in three languages:

  • C/C++
  • Java
  • Perl

Client & Worker APIs are available in following languages:

  • libgearman (C)
  • Shell
  • Perl
  • Nodejs
  • PHP
  • Python
  • Java
  • Databases
  • JMS
  • C# / .NET

Some of the use cases provided at the web site:

Resources

IRC channel is #gearman on Freenode.

484 questions
0
votes
1 answer

PHP Gearman - idle when no workers available

Is it possible to idle the Client when all workers are working? I have the following case: $client= new GearmanClient(); $client->addServer(); $data = array(thousands of entries); foreach($data as $dt) { $client->doBackground('doFancy',…
Aley
  • 8,540
  • 7
  • 43
  • 56
0
votes
1 answer

Permission problems with Gearman worker

Here is the scenario: I have a web application (php, mysql) which writes pdf files to a given directory: /var/www/myapp/tmp. I then use Gearman (worker php script run from terminal) to generate preview images from these pdf files. The worker script…
Asciiom
  • 9,867
  • 7
  • 38
  • 57
0
votes
1 answer

How do I access my PHP apps public functions within a Gearman worker?

In my app a user can upload several photographs at once. Once these are received by the server the following happens: A Gearman worker job is scheduled which processes all the uploaded images, creating various different crop sizes and…
gordyr
  • 6,078
  • 14
  • 65
  • 123
0
votes
2 answers

GearMan Background Tasks

I have to use Gearman for background tasks. someone tell me that there is a user interface for gearman, i am not able to find out any good tutorial related to gearman so through i can start learning it. Please give good link for a beginner to learn…
Anurag
  • 1,013
  • 11
  • 30
0
votes
1 answer

How to install mmoreramerino/GearmanBundle with Symfony 2.1.x?

I am pretty new to Symfony 2 and brand new to Gearman. I am looking for a bundle to integrate Symfony 2 with Gearman. mmoreramerino's bundle seems to be the most popular bundle according to packagist. Unfortunately something seems to be broken, the…
herrjeh42
  • 2,782
  • 4
  • 35
  • 47
0
votes
1 answer

php - try/catch gearman not catching timeout warning

I'm using the php gearman client and I'm trying to catch/ignore any errors in the event the gearman server is offline: try { $gearman = new GearmanClient(); $gearman->addServer('apps-1'); $gearman->setTimeout(4000); …
Joe
  • 1,762
  • 9
  • 43
  • 60
0
votes
0 answers

gearman is returning old worker results

I have a PHP gearman client and worker. I am testing my worker with very minimal output to ensure all is working as intended. Strangely, I am getting old results from previous workers and I can't figure out why. It seems that they cycle through in…
Jared Eitnier
  • 7,012
  • 12
  • 68
  • 123
0
votes
2 answers

PHP Gearman Duplicate tasks

I got: Debian 6 nginx 1.2.6 PHP 5.3.20-1~dotdeb.0 (fpm-fcgi) (built: Dec 24 2012 11:53:16) gearmand 1.1.4 pecl gearman ext 1.1.1 And I got two scripts (Probably I copied them from php.). Client:
ns3777k
  • 41
  • 1
  • 5
0
votes
1 answer

Issues installing gearman on MAMP running OS X 10.8

As the title states I am having some issues when installing gearman for PHP in a MAMP environment. Here's what I've done so far: I've downloaded the latest PECL version and run these commands based on the docs: tar xzf gearman-X.Y.tgz cd…
Jared Eitnier
  • 7,012
  • 12
  • 68
  • 123
0
votes
1 answer

gearman worker doesn't receive input

machine 1 - client using PHP api $client = new \GearmanClient(); $client->addServer(..); $client->doBackground('demotask', 'hello world'); machine 2 - workers - not using PHP api, directly in bash: gearman -w -f demotask -- php -f…
Alex
  • 11,479
  • 6
  • 28
  • 50
0
votes
1 answer

dynamically load-balanced task queue

Set up Front-end machine receives web requests and puts 3 different kinds of tasks into Gearman server. 3 worker machines registered with that gearman server, each can perform any of those tasks. Different tasks consume different resources. Each…
Alex
  • 11,479
  • 6
  • 28
  • 50
0
votes
1 answer

Modularising Gearman workers in Perl

I need to modularise gearman workers in Perl, so that I can just register different worker function name and their implementation and reuse all the other code. use strict; use warnings; use Getopt::Std; use JSON qw( decode_json ); use FindBin…
Imran Imtiaz
  • 65
  • 1
  • 7
0
votes
2 answers

Installing gearman on windows 7 through cygwin and get "configure: error: Unable to find libevent"

I'm a newbie trying to install gearman on windows through cygwin using the tutorial here: http://www.phpvs.net/2010/11/30/installing-gearman-and-gearmand-on-windows-with-cygwin/ I need to install gearman to develop on my windows 7 laptop. I've…
frankp221
  • 175
  • 3
  • 11
0
votes
1 answer

passing an undetermined number of arguments to a function - PHP

Possible Duplicate: Unlimited arguments for PHP function? Forward undefined number of arguments to another function I am setting up a Gearman server in order to 'delegate' the execution of a method on an object, like for example…
Jean-Marc Dormoy
  • 129
  • 1
  • 2
  • 9
0
votes
1 answer

Can i use earlier version symfony plugin in symfony2 project?

I want to use http://www.symfony-project.org/plugins/sfGearmanPlugin in my project. This plugin has developed in symfony 1.4. I want to use in symfony2.How can i use that?
Manivasagan
  • 212
  • 1
  • 6
  • 17