Following yesterday’s marathon package installation ‘experiment’, today I started to acquire and install the Client/Worker API modules.
JAVA – installing gearman-java-0.03.jar
Java modules can be located on the downloads page for Gearman. It is also available at the Launchpad page for Gearman. I selected the code from the gearman.org site to try first, which ended up directing me to: https://launchpad.net/gearman-java.
I downloaded all three available files:
- gearman-java-0.03.jar
- geareman-java-0.03-javadocs.jar
- gearman-java-0.03-src.tar.gz
Once downloaded, I moved all three files, and the original gearmand-C source to my Development directory.
PERL – installing Gearman::XS
For the PERL implementation, I’m going with the PERL wrapper, around the core gearman C libraries. I’d rather leverage as much C as possible. The focus for me is on speed.
It is available via CPAN under Gearman::XS.
Installing PERL packages is generally pretty painless.
#root: cpan Gearman::XS
[...]
Running install for module 'Gearman::XS'
Running make for D/DS/DSCHOEN/Gearman-XS-0.8.tar.gz
Fetching with LWP:
http://www.perl.org/CPAN/authors/id/D/DS/DSCHOEN/Gearman-XS-0.8.tar.gz
[...]
Writing /Library/Perl/5.10.0/darwin-thread-multi-2level/auto/Gearman/XS/.packlist
Appending installation info to /Library/Perl/Updates/5.10.0/darwin-thread-multi-2level/perllocal.pod
DSCHOEN/Gearman-XS-0.8.tar.gz
/usr/bin/make install -- OK
With the installation completed, I wrote and executed a very simple script, to test PERL’s ability to locate the new module.
#!/usr/bin/perl -w
use strict;
use Gearman::XS qw(:constants);
use Gearman::XS::Client;
print “\nLoaded and ran fine\n”;
exit 0;
This was the result:
david$ ./gtest0.pl
Loaded and ran fine
Installation of the PERL module Gearman::XS was successful.
NOTE: This is part of a series of posts, centered around installation and evaluation of Gearman as a distributed scheduling product. Here are the other articles in this group:
Installing GEARMAN on MAC OSX 10.6