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
5
votes
1 answer

Library file issues when installing Gearman through Cygwin

I have been installing Gearman job server on my WIN 7 machine through Cygwin terminal. I have extracted the tar file of gearman-1.1.12 successfully . Now I have to run ./configure to build the new makefile. But it says * CPP Flags: …
Arsalan Sherwani
  • 889
  • 2
  • 25
  • 60
5
votes
1 answer

What's the difference between Gearman's job and task?

I'm trying to understand Gearman but until now I can't figure out what's the difference between task and job. I'm trying to create a client which will parse periodically (every 10 minutes) a XML page. Which is the best approach?
SilVeR AleCS
  • 93
  • 1
  • 5
5
votes
1 answer

Sharing curl handler among gearman workers

I've a gearman worker (called "manager") which reads a list of urls and then calls, for each of them, another gearman worker (called "dependent") which fetches the content of passed url and does some work on it - indexing, and so on. Each url…
fdellutri
  • 963
  • 1
  • 7
  • 16
5
votes
1 answer

What do I wrong with INNODB Lock?

I working on a System with handels a lot of Update, Insert and Delete Requests. That's why I choosed INNODB as my Storage Engine cause of the Row Locks. We are updating 60.000 Records every 10 Minutes. And we are using Gearman to parallise our Work…
M. Hirn
  • 725
  • 7
  • 22
5
votes
2 answers

Using php + gearman + node.js

I am considering building a site using php, but there are several aspects of it that would perform far, far better if made in node.js. At the same time, large portions of of the site need to remain in PHP. This is because a lot of functionality is…
user396404
  • 2,759
  • 7
  • 31
  • 42
4
votes
1 answer

What is the best way to send failed job output from gearman worker?

#!/usr/bin/env python import sys import json import gearman from fabric import * from fabric.api import * from gearman import GearmanWorker # # Run the ssh task # def exe_job(worker, job): d = json.loads(job.data) env.host_string =…
Nikhil Singh
  • 625
  • 2
  • 8
  • 14
4
votes
2 answers

Segmentation Fault running Gearman PHP from the Command Line

I'm using Ubuntu Natty with PHP 5.3.5 and PECL Gearman 0.8.0. Here's the version info: PHP 5.3.5-1ubuntu7.3 with Suhosin-Patch (cli) (built: Oct 13 2011 22:20:48) Copyright (c) 1997-2009 The PHP Group Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend…
ObiHill
  • 11,448
  • 20
  • 86
  • 135
4
votes
1 answer

Can multiple gearman servers share the same libdrizzle queue?

Can multiple gearman servers share the same gearman queue, via libdrizzle? I'm wondering if this will eliminate the gearman server as a single point of failure--if I have multiple web nodes, each talking to the same gearman server, then the site…
mjs
  • 63,493
  • 27
  • 91
  • 122
4
votes
2 answers

GearmanManager in background

We were using Gearman/PHP on Ubuntu to delegate our processes. On this (development) machine we were opening few terminal windows to start clients and workers respectively, but now on live machine we need to send our clients and workers into…
luigi7up
  • 5,779
  • 2
  • 48
  • 58
4
votes
2 answers

Gearman with PHP - threads in worker

I have a problem with Gearman and the worker for PHP. I want to run the same function at the same time. But now Gearman seems to make it a queue. The output I'm searching for is: $ ./daemon.php Starting daemon... Received job: H:www-dev1:15…
brasimon
  • 769
  • 2
  • 9
  • 22
4
votes
1 answer

Gearman + SQLAlchemy - keep losing MySQL thread

I have a python script that sets up several gearman workers. They call into some methods on SQLAlchemy models I have that are also used by a Pylons app. Everything works fine for an hour or two, then the MySQL thread gets lost and all queries fail.…
Tony
  • 2,037
  • 3
  • 22
  • 22
4
votes
1 answer

Asynchronous database/service calls in PHP: Gearman vs. pthreads

On our LAMP site, we have a problem with some services having to make several calls to the database to pull data. Usually the way this is done in PHP (at least my experience) is serially; which obviously is inefficient. We can mitigate some of the…
Frank Rosario
  • 2,512
  • 5
  • 31
  • 47
4
votes
1 answer

Can I build a software around Gearman in 2015?

I'm looking for a queue/job tool and Gearman would perflectly fit my need. However development seems stalled: Last release was 1.5 year ago: https://launchpad.net/gearmand/+download Last commit by maintainers as well:…
Manuel VACELET
  • 555
  • 4
  • 16
4
votes
0 answers

Gearman client NON_BLOCKING mode vs doBackground

I'm looking for what the options GEARMAN_CLIENT_NON_BLOCKING does. Using this example: setOptions(GEARMAN_CLIENT_NON_BLOCKING); $client->addServer('127.0.0.1',…
allevo
  • 844
  • 1
  • 9
  • 20
4
votes
2 answers

Changing Pecl installation directory

Hi i'm having trouble with pecl installation, the problem i'm having is i'm installing gearman , and i'm now at the stage of installation of the pecl PHP extension. it should be a simple as executing the command : $ sudo pecl install gearman the…
muffin
  • 2,034
  • 10
  • 43
  • 79