Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Making asynchronous tasks in PHP

Making asynchronous tasks in PHP

Why & how making asynchronous tasks in PHP
SFLIve2014 - 04/07/2014 with Grégoire Pineau

Olivier Dolbeau

April 07, 2014
Tweet

More Decks by Olivier Dolbeau

Other Decks in Programming

Transcript

  1. Your visitors don’t want to wait! (and if they have

    to, they don’t want to know it) First reason to do asynchronous
  2. Your web servers want to make their job! (they don’t

    care about emails other boring tasks) Second reason to do asynchronous
  3. With the PECL extension Thanks to Pieter de Zwart See:

    pdezwart/php-amqp Use librabbitmq (alanxz/rabbitmq-c)
  4. get > consume • consume is a blocking call •

    you don’t want blocking calls in your application ! • Use “get” method with a poll-interval