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

logging when there is more than one server

I currently use text files to track errors or watch process in the system. I thinking to scale with Gearman and to have workers on separated machines. What is the way to logging when you have multiple servers , assuming I'm want to keep logging into…
alon_r
  • 423
  • 1
  • 4
  • 7
0
votes
1 answer

Gearman Worker Job Setup

I have the Gearman Job server where I am planning on creating the workers and do all the heavy lifting. The Gearman Job Server is called from an application server by a PHP script (already installed the gearman client on it). Tested if the Gearman…
0
votes
0 answers

Gearman PHP 2000 tasks less time

I installed Gearman in my VPS server, after read documentation of Gearman I created two scripts to handle run 2,000 tasks in parallel. This Worker script
SimpleojbC
  • 127
  • 2
  • 14
0
votes
1 answer

How to use Net_Gearman in a PHP application?

I have a PHP application in which I want to use Gearman for time consuming tasks. I searched a lot and found Net_Gearman as PHP API containing client and worker classes. What should I do next in order to use Net_Gearman? I have no knowledge of Linux…
Vishal Suri
  • 447
  • 2
  • 12
  • 32
0
votes
1 answer

How can I get the status of non-blocking jobs of gearman submit_multiple_jobs?

how can I tell if a background job or a non-blocking request by gearman client is successful or not? while (True): jobs = getJobs() submitted_requests = gm_client.submit_multiple_jobs(jobs, background = False, wait_until_complete = False) …
shilk
  • 589
  • 5
  • 17
0
votes
1 answer

PHP gearman worker with shared DB connection

I have a php worker for gearman running from command line (through supervisord), that acts as a kind of "API". The worker uses mysqli connections to retrieve data from a DB and sends it back to a connected client. class My_worker{ private…
user2531657
  • 339
  • 2
  • 9
0
votes
3 answers

Scheduling a task at certain time interval (including seconds)

I have a php script that runs on a standard linux, apache server. In certain cases I would like to have a php script run exactly 15 minutes after certain action was performed by an user. EG: user visit at 13:04:55 and the background process has to…
ToughPal
  • 2,231
  • 5
  • 26
  • 30
0
votes
0 answers

GearMan Backgrounded HTTP Fetch

I have tasks that get some content from multiple urls in the internet. When i run my parser with addTask - all works good. And all tasks are completed. But when i run addTaskBackground that doesn't block runTasks() ...Then i can fill queue every…
sandra1n
  • 133
  • 1
  • 1
  • 10
0
votes
2 answers

Gearman setCompleteCallback not working

It's seems that setCompleteCallback not working at me. What i'm doing wrong? Thanks. addServer("127.0.0.1", 4730); …
sandra1n
  • 133
  • 1
  • 1
  • 10
0
votes
1 answer

Connection pool between gearman/php and mysql

I have a few Gearman workers that are implemented on php. Each task for these workers should be executed in the own transaction. In order to have access from these workers to my MySQL db I need something like a connection pool. Could you please…
alexanoid
  • 24,051
  • 54
  • 210
  • 410
0
votes
1 answer

Import data from other app in background using php

What is the best way to import data like contacts from other app into our app? Basically the scenario is, we have an app for which the data comes from a CRM. As such we want that whenever a new user registers into our app we must start importing the…
0
votes
1 answer

ImportError when running Python script in Jenkins

I have a Python script that I want to run as part of a Jenkins project. When I try to run the script via Jenkins, I get an ImportError when it tries to find the gearman module. (Yes, the gearman module is installed on the slave node - I am able to…
user2406467
  • 1,017
  • 6
  • 18
  • 22
0
votes
1 answer

Gearman Task Completion Callback

It's possible to set a callback when a single task has finished with setCompleteCallback() - is it possible to set a callback when an entire batch of tasks has completed (when run in parallel), for example if you use runTasks() as…
user300285
0
votes
1 answer

Slow Form Processing in PHP - Need Queue?

I have a web form which I want to validate the inputs, and if it passes validation, send the info to a web service, and save to mySQL as a backup. If there is an error either sending to the web service, or with sql, I want to email myself an alert…
Evan
  • 67
  • 10
0
votes
1 answer

Task quantity in gearman queue

How to recieve current task quantity in gearman queue or active task quantity in php? I'm using library http://www.php.net/manual/ru/class.gearmanclient.php
Alex
  • 8,055
  • 7
  • 39
  • 61