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
8
votes
4 answers

gearman gives me GEARMAN_COULD_NOT_CONNECT, it is definitely running

My dev server is Debian Squeeze and I'm running Gearman 1.1.5 which I compiled from source along with the php pecl extension v1.1.1 If I run the reverse_client.php script I get the GEARMAN_COULD_NOT_CONNECT error. PHP Warning: GearmanClient::do():…
Darren Beale
  • 753
  • 1
  • 9
  • 24
8
votes
1 answer

Running PHP script in background using Ant

At my current employer we use Ant to execute our build scripts, and I need to add a target to our build.xml file that will start up 4 PHP scripts that are Gearman workers in the background, and then stop those scripts once the build is done. I've…
GrumpyCanuck
  • 1,438
  • 3
  • 18
  • 30
7
votes
1 answer

Distributed video encoding - Gearman vs Beanstalkd

Im looking to build a distributed video encoding cluster of a few dozen machines. Ive never worked with a messaging queue before, but the 2 that I started playing around with were Gearman and Beanstalkd. Beanstalk seems to be a lot simpler and…
user15063
7
votes
3 answers

How To Update Boost When Yum Has the Outdated Version

I am trying to install the latest version of Gearman. However, it keeps giving me the error: Checking for Boost Headers version >= 1.37... no When I check my Boost version (yum list installed | grep boost), all the versions are 1.33. The latest…
Aaron Marks
  • 375
  • 2
  • 7
  • 19
7
votes
1 answer

List Gearman job handles

How can I list all job handles on a Gearman job server? I'm trying to come up with a monitoring approach, where I can list all running threads, and poll their status. Listing running jobs with 'status', and 'workers' (as described in…
Jon Skarpeteig
  • 4,118
  • 7
  • 34
  • 53
7
votes
3 answers

./configure not seeing/finding boost header files

Trying to build gearman from the gearmand-0.33.tar.gz from Launchpad using bzr, on a Fedora 64 system. doing the ./configure by tiself, as well as using the "-with-boost=/usr/include" param generates warnings an errors as the configure process can't…
tom smith
  • 1,035
  • 7
  • 23
  • 39
6
votes
1 answer

Gearman: Sending data from a background worker to the client

Is it possible to send back data from a gearman worker that runs in the background (with PHP)? I know that I can pass a status (numerator/denominator) to the client but I need to "return" data. The background is that I need to call workers on…
stofl
  • 2,950
  • 6
  • 35
  • 48
6
votes
3 answers

Schedule a job in Gearman for a specific date and time

From what I can see Gearman does not support scheduled jobs or delayed jobs. I was thinking that perhaps the scheduled job could be queued in at first and then added to the Gearman queue after the at time period has expired. at tasks are persistent…
Treffynnon
  • 21,365
  • 6
  • 65
  • 98
6
votes
2 answers

Simple scalable work/message queue with delay

I need to set up a job/message queue with the option to set a delay for the task so that it's not picked up immediately by a free worker, but after a certain time (can vary from task to task). I looked into a couple of linux queue solutions…
idevelop
  • 199
  • 2
  • 10
6
votes
5 answers

How to install Gearman with PHP Extension

I'm trying to install Gearman with PHP Extension to use it with PHP-CLI. I have a Debian 6.0.5 with php5-cli and php-pear installed. Thats what I tried # apt-get install php5-dev # apt-get install gearman-job-server libgearman-dev # pecl install…
Aley
  • 8,540
  • 7
  • 43
  • 56
6
votes
1 answer

Haskell framework to parallelize non-threadsafe C++ lib

I have a closed source non-threadsafe C++ shared lib that provides one function f :: ByteString -> ByteString. The run-time of this function can be something between one second and a couple of hours. I am looking for a way to distribute the…
5
votes
1 answer

php GearmanClient timeout

I'm using the gearman pecl extension in php, and want to have a timeout for a function call. Two use cases: (1) no running workers, (2) worker takes too long to complete If everything is running, the call is very fast, and I want to avoid having an…
Niko Sams
  • 4,304
  • 3
  • 25
  • 44
5
votes
2 answers

Problem With Gearman Job Status

I have a Gearman server running a process which takes a few minutes to finish. I'm running a progress bar to show completion, and am attempting to get the percentages for the bar using the Gearman PHP extension and the jobStatus() function. The job…
Aaron Marks
  • 375
  • 2
  • 7
  • 19
5
votes
1 answer

Check Gearman Worker status on particular machine

I am running Gearman server along with Gearman Manager, with their PHP interface. the setup is as shown below. The Gearman server could be either on one of the two machines or on a third machine. For my implemnetation, I need to be able to tell…
kosta
  • 4,302
  • 10
  • 50
  • 104
5
votes
1 answer

Scheduling with gearman vs. cron?

I have noticed a lot of people discussing Gearman and it's scheduling features making it enable to distribute work onto other servers. However, I have not yet seen a comparison to native cronjobs. What are the differences between cron and Gearman?
Industrial
  • 41,400
  • 69
  • 194
  • 289
1 2
3
32 33