6. http://twitter.com/GianArb
Queue
gianarb92@gmail.com Gianluca Arbezzano 6
ZendQueueQueue
// Create an array queue adapter
$adapter = new ArrayAdapter();
// Create a queue object
$queue = new Queue('queue1', $adapter);
Adapter
• Db
• MongoDb
• MongoCappedCollection
• ArrayAdapter
• TODO: Redis
• TODO: RabbitMQ
7. http://twitter.com/GianArb
Message Queue
Message queues provide an asynchronous
communications protocol, meaning that the
sender and receiver of the message do not need
to interact with the message queue at the same
time.
Cit. Wikipedia
gianarb92@gmail.com Gianluca Arbezzano 7
ZendQueueMessageMessage implement ZendStdlibMessage
9. http://twitter.com/GianArb
Queue System, when?
gianarb92@gmail.com Gianluca Arbezzano 9
Registration Query Mail
• Time-shifts job processing when the “CPU” is
less busy
• Distributed computing
• In a web app allows to run tasks in background
reducing the http request time