Archive for the ‘php’ tag
Gearman – Job Queuing Library for PHP
A Job queue is a list jobs that need to be processed and executed asynchronously. Job queues are an integral part of distributed system which scales everyday. The big advantage of using job queues are running tasks in parallel thereby minimizing load on web server. Gearman, an open source , distributed job queuing library is originally developed by Livejournal to balance their load. Now it is used by many other organizations like Yahoo, Digg for queuing and executing millions of jobs everyday successfully.
Features:
- Opensource: Gearman is free and is supported by a strong developer community.
- Supports various programming languages and platforms( eg: Java, PHP, Perl, Python, Mysql UDFs etc)
- Multi lingual support.
- Flexible: Gearman is much compatible with other distributed computing architectures like Map/Reduce.
- Fast and lightweight.
- Embeddable: Gearman can be accommodated in any kind of application in spite of their size. It can be integrated to existing systems without much pain.
- Fault tolerance:
- persistent message queues: Gearman guarantees the delivery of messages. An acknowledgment will be received after the delivery.
- queue replication and improved statistics are available.
Installation:
Job server
Gearmand : It is written is C and is well suited for threading, persistent queues, and pluggable protocols.
http://launchpad.net/gearmand/trunk/0.9/+download/gearmand-0.9.tar.gz
Client & Worker APIs:
libgearman C http://launchpad.net/gearmand/trunk/0.9/+download/gearmand-0.9.tar.gz Gearman::Client-Worker Perl http://search.cpan.org/~bradfitz/ Gearman::XS Perl http://launchpad.net/gearmanxs/trunk/0.4/+download/Gearman-XS-0.4.tar.gz Gearman PHP Extension PHP http://pecl.php.net/get/gearman-0.5.0.tgz Net_Gearman (PHP) http://pear.php.net/package/Net_Gearman/ gearman-jms (Java) https://launchpad.net/gearman-jms/trunk/0.1/+download/gearman-jms-0.1.tar.gz
Gearman installation steps in Ubuntu:
Install gearmand: tar zxvf gearmand-0.9.tar.gz ./configure make make install
Install Gearman PHP Extension:
pecl install gearman-0.5.0