Gearman Experiment 
You can experiment with Gearman quickly right from the command line:
Launch the agent, the Gearman daemon:
$ sudo /usr/sbin/gearmand --daemon

Run a worker with the command-line utility gearman. The worker needs a name and can run any command-line utility. For example, you can create a worker to list the contents of a directory. The -f argument names the function the worker is providing:
$ gearman -w -f ls -- ls -lh

The last piece of the puzzle is a producer, or a job that generates lookup requests. You can generate a request with gearman, too. Again, use the -f option to spell out which service you want help from:
$ gearman -f ls < /dev/null
drwxr-xr-x@ 43 supergiantrobot staff 1.4K Nov 15 15:07 gearman-0.6.0
-rw-r--r--@ 1 supergiantrobot staff 29K Oct 1 04:44 gearman-0.6.0.tgz
-rw-r--r--@ 1 supergiantrobot staff 5.8K Nov 15 15:32 gearman.html
drwxr-xr-x@ 32 supergiantrobot staff 1.1K Nov 15 14:04 gearmand-0.10
-rw-r--r--@ 1 supergiantrobot staff 5.3K Jan 1 1970 package.xml
drwxr-xr-x 47 supergiantrobot staff 1.6K Nov 15 14:45 pecl-gearman


source (as of 25-10-2014)
http://www.ibm.com/developerworks/opens ... p-gearman/

[ view entry ] ( 1626 views )   |  print article

<<First <Back | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | Next> Last>>



2024 By Angel Cool