Job Queues provide offline asynchronous processing of tasks and activities
that can be run independently of the end user experience.
The approach is used for streamlining
offline processing of PHP scripts. It provides the ability to delay execution
of “heavy” parts of web applications that originate from direct user interaction
with a Web Server. As result it may significantly improve response time
and reduce Web Server load.
Any PHP script can create a job which will be executed later, separately
from a current HTTP request. The job itself is just an additional HTTP
request to another PHP script that can be done on the same or different
Web Server.
A Zend Server cluster Job Queue is comprised of four main
components:
-
Web Servers- The servers in which the PHP and Job Queue Extensions
reside. In some cases, these servers execute jobs as well. In other case, jobs
are executed on Backend Web servers.
-
Job Queue Extensions- A PHP extension that passes the jobs to
the Job Queue Daemons.
-
Job Queue Daemons- The component that is in charge of managing
scheduling, queuing and executing tasks.
-
MySQL Data Base- The component that stores the jobs created
throughout the cluster.
For additional information on a cluster Job Queue architecture, see Zend Job Queue.