This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
Brian Moon (author)
Tue Apr 21 10:37:33 -0700 2009
commit 756b08acfa1918cb98077640ffd2033730ee3eab
tree b23fdfecd7f0a2bce805c2d96a1067cf4e67509c
parent cf2317206fdc98e363487364eb3ff0121959b0f6
tree b23fdfecd7f0a2bce805c2d96a1067cf4e67509c
parent cf2317206fdc98e363487364eb3ff0121959b0f6
| name | age | message | |
|---|---|---|---|
| |
Net/ | Tue Apr 21 10:37:33 -0700 2009 | |
| |
README | Tue Dec 16 11:45:27 -0800 2008 | |
| |
examples/ | Fri Jan 02 01:53:40 -0800 2009 | |
| |
package.xml | Wed Jan 28 15:39:57 -0800 2009 | |
| |
tests/ | Fri Apr 25 13:35:10 -0700 2008 |
README
Net_Gearman About Net_Gearman is a PEAR package for interfacing with Danga's 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. Net_Gearman is currently in production at Yahoo! and Digg doing all sorts of offloaded near time processing. Installation 1. Install PEAR if it is not already installed on your system. 2. Run pear install http://netgearman.googlecode.com/files/Net_Gearman-x.y.z.tgz (Replace x.y.z with the latest version from the featured download to the right). Examples Client <?php require_once 'Net/Gearman/Client.php'; $client = new Net_Gearman_Client('localhost:7003'); $client->someBackgroundJob(array( 'userid' => 5555, 'action' => 'new-comment' )); ?> Job <?php class Net_Gearman_Job_someBackgroundJob extends Net_Gearman_Job_Common { public function run($args) { if (!isset($args['userid']) || !isset($args['action'])) { throw new Net_Gearman_Job_Exception('Invalid/Missing arguments'); } // Insert a record or something based on the $args return array(); // Results are returned to Gearman, except for // background jobs like this one. } } ?> Worker <?php require_once 'Net/Gearman/Worker.php'; $worker = new Net_Gearman_Worker('localhost:7003'); $worker->addAbility('someBackgroundJob'); $worker->beginWork(); ?>







