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

Gearman function is not getting dropped and it displaying error

Gearman function is not getting dropped and it displaying the below error. Error: there are still connected workers or executing clients from gearadmin --status it shows function_name_one 0 0 112 so 112 worker are ther available for…
0
votes
1 answer

latest gearman on Ubuntu 12.04

Is it possible to install gearman 1.1.12 on Ubuntu 12.04 without compiling it manually? Doing an add-apt-repository ppa:gearman-developers/ppa before doing an apt-get install still installs the old version.
simoncpu
  • 578
  • 5
  • 9
0
votes
1 answer

How to queue jobs in gearman so that they are strictly processed one at a time, in the order they were submitted?

Is this the default behaviour for gearman or do I have to specify it as a parameter? I am using php and I am using gearman to queue up a large amount of mysql queries, kind of using gearman as a transaction manager. It's crucial that a job isn't…
Hard worker
  • 3,916
  • 5
  • 44
  • 73
0
votes
1 answer

How to integrate image resizing with gearman client

I've written a wrapper class for Gearman as below: class gearman { private $server_ip = '127.0.0.1'; private $server_port = '4730'; public function registerWorker($qName,$function){ // register function if (!($qName &&…
Alireza
  • 6,497
  • 13
  • 59
  • 132
0
votes
2 answers

Parellal processing in PHP

I written one high performances script in php. Which takes 30 ms time to execute. now i have make this script more sealable so i have done rnd on following points. What i am looking is the do parallel processing on chunk of the code to minimize the…
PHP Connect
  • 539
  • 2
  • 7
  • 24
0
votes
1 answer

Gearmand Server Completely Locks Up

Running Gearmand 1.1.8 on a CentOS AWS VM using MySQL as storage for the queue, every few hours Gearmand suddenly spins out of control, 100% CPU, and sucks up most of the memory on the small instance. We are currently in testing and not production,…
donatJ
  • 3,105
  • 3
  • 32
  • 51
0
votes
1 answer

Best Way to Handle Background Processes

I'm trying to implement an iCal synchronization service for my project. There are nearly 10.000+ listings (more to come) in the database and almost every listing has a Google Calendar iCal URL to be synchronized every 12 hours. Synchronizing a…
Burak Erdem
  • 19,630
  • 7
  • 36
  • 56
0
votes
1 answer

Why would Gearman return empty http response

I have configured Gearman to accept request via http too. I have a terminal with a running worker in which I confirm that workload is passed, and I receive a 200 status with expected headers, but Content-Length 0 and, of course, empty response…
Michael
  • 4,786
  • 11
  • 45
  • 68
0
votes
1 answer

Scale number of workers according to number of jobs in gearman

I am using Gearman as my job queue manager. Basically i use gearman to manage mail jobs (fire & forget approach). I have a single worker to handle those mail sending jobs. When my application is going to send large amount (>1000) of emails, i can…
0
votes
1 answer

RabbitMQ/AMQP/Gearman distributing workload based on job type and grouping

I am working on a system that has lots of tasks that are perfect for queueing and has some existing home made legacy solutions already in place that work to varying degrees, I am familiar with gearman and have read through the RabbitMQ tutorials and…
0
votes
2 answers

Gearman tasks - how to detect when all have been completed?

The code: $gmc = new GearmanClient(); $gmc->addServer(); $gmc->setCompleteCallback(function(GearmanTask $task){ echo 'Complete: Task ' . $task->unique() . PHP_EOL; }); for ($i=0; $i<10; $i++) { $gmc->addTask('queryShard',…
temuri
  • 2,767
  • 5
  • 41
  • 63
0
votes
2 answers

how to install libmysqld-dev on ubuntu 12.04?

When I enter command: sudo apt-get install libmysqld-dev I have this message: Reading package lists... Done Building dependency tree Reading state information... Done Some packages could not be installed. This may mean that you have …
Max Khrichtchatyi
  • 507
  • 1
  • 7
  • 14
0
votes
1 answer

PHP Gearman installation

i have trying to sort out gearman extension for php for nothing is going correct. I have tried to install gearman-1.1.2 as per the instructions given in the website. Install gearman Thanks for the great article since the install went on smoothly.…
PRASANTH
  • 695
  • 3
  • 15
  • 33
0
votes
2 answers

mmoreram/GearmanBundle throws exception on calling \GearmanClient method

When I execute the following code: $Gearman = $this->get('gearman'); $Gearman->doNormalJob('BundleName~test'); My code throws the following exception: GearmanClient::doNormal() expects parameter 2 to be string, array given Stack: #0 [internal…
Rene Terstegen
  • 7,911
  • 18
  • 52
  • 74
0
votes
0 answers

Gearman: 3 seconds between client request and worker receive. Is this normal?

Environment: Ubuntu 12.04 Desktop & Server PHP 5.3.10 Gearman (libgearman 1.1.5 with PHP Extension 1.1.1) Multiple servers on LAN I've been working on distributed processes for some time. Most of these tools require DB access. Eventually this led…
Gabe Spradlin
  • 1,937
  • 4
  • 23
  • 47