Generally, integration between multi-language and multi-systems is a big problem. In general, people will mostly use WebService to handle such integration problems, but no matter what style of WebService, such as RPC style, or REST. Style has its own complexity. In contrast, Gearman can achieve a similar effect, and is easier to use. The processing of a Gearman request involves three roles: Client -> Job -> Worker. Client: The originator of the request, which can be C, PHP
, Perl, MySQL UDF, etc. Job: The dispatcher of the request, responsible for coordinating the forwarding of requests from the client to the appropriate Work. Worker: The handler of the request, which can be C, PHP, Perl, etc. Because Client, Worker does not restrict the use of the same language, it is conducive to the integration between multi-language and multi-system. Even by adding more workers, we can easily implement a distributed load balancing architecture for the application. Let's take a look at how to install and run an example. Under the limited conditions, we run the three roles Client, Job, and Worker on a server: install libevent:
wget http://www.monkey.org/~provos/libevent-1.4.12-stable.tar.gztar zxvf libevent-1.4.12-stable.tar.gzcd libevent-1.4.12-stable/./configure --prefix=/usrmake && make install/Sbin/ldconfigcd ../
Install Gearman server and library:
wget http://launchpad.net/gearmand/trunk/0.9/+download/gearmand- 0.9.tar.gztar zxvf gearmand-0.9.tar.gzcd gearmand-0.9./configuremakemake install/sbin/ldconfigcd ../
Install Gearman PHP extension:wget http://pecl.php.net/get /gearman-0.5.0.tgztar zxvf gearman-0.5.0.tgzcd gearman-0.5.0/usr/local/webserver/php/bin/phpize./configure --with-php-config=/usr/local/webserver /php/bin/php-config --with-gearmanmakemake installcd ../Edit the php.ini configuration file to load the appropriate module and make it effective: extension = "gearman.so"Start Job:gearmand -d if the current user is root Then Need to do this: gearmand -d -u root will use port 4730 by default, which will be used below. Note: If you can't find the path to the gearand command, don't forget to confirm with whereis gearmand.
We can use the ps command to see if the startup is successful:
ps aux
Download NetBeans Take netbeans-7.0beta2-ml-javaee-linux.sh as an example #sh netbeans-7.0beta2-ml-
The disk sector defaults to 512 bytes. To verify, execute it from the command line: fdisk -l
Because the installation of debian uses a minimal installation, the default installation in Chinese,
Many Linux enthusiasts consider the hardware configuration to be compatible with Linux systems when
Multiple commands are executed continuously under Linux
Create a CA self-signed certificate in Linux, CSR certificate signing request
Redirect command application and its syntax under Linux operating system
Linux shell awk get external variables (variable value) Introduction
Linux rz/sz command using tutorial
Who is safer with Linux and Windows?
JFS System in Linux Server Operating System Log Files
Switching From Windows to Nix or a Newbie to Linux – 20 Use
Linux shell awk process control statement (if, for, while, do) details
A revolution in the operating system Linux system storms 15 years
How to view image size in win10 system
How to convert qsv format to rmvb
Microsoft answers frequently asked questions about the Win8 app store
Win7 desktop and start menu can not find the solution of IE browser
The general process of the Linux system startup process (10 steps)
Win10 can't open the folder prompt "Is it working"?
How to extract Win10 icon Win10 preview system icon extraction tutorial
How can I solve the problem that the content of the webpage cannot be copied?