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:
- PHP - Mass PDF quote email
- PHP - Synchronous Image Resize
- PHP - Feed fetching / parsing
- Perl - Geocoding
- PHP - Mail Queue
- Build & Test Framework at Tokutek
- Using Gearman For Distributed Alerts
- Shard-Query is a PHP project which uses Net_Gearman to execute queries on horizontally partitioned databases and returns the results. Supports aggregation.
- Distribute Nagios Checks/Eventhandler with Gearman
Resources
IRC channel is #gearman on Freenode.