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

418997665c4a3368515ecf9c3d746b95?s=128

Olivier Dolbeau

April 07, 2014
Tweet

Transcript

  1. 4.
  2. 5.
  3. 6.
  4. 7.
  5. 8.
  6. 9.
  7. 10.

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

    to, they don’t want to know it) First reason to do asynchronous
  8. 11.

    Your web servers want to make their job! (they don’t

    care about emails other boring tasks) Second reason to do asynchronous
  9. 12.
  10. 14.
  11. 19.
  12. 21.

    With the PECL extension Thanks to Pieter de Zwart See:

    pdezwart/php-amqp Use librabbitmq (alanxz/rabbitmq-c)
  13. 23.
  14. 24.
  15. 28.
  16. 29.
  17. 30.
  18. 31.
  19. 32.
  20. 33.

    get > consume • consume is a blocking call •

    you don’t want blocking calls in your application ! • Use “get” method with a poll-interval
  21. 34.
  22. 35.
  23. 36.
  24. 37.
  25. 38.
  26. 39.
  27. 40.
  28. 41.
  29. 42.
  30. 43.
  31. 47.
  32. 48.
  33. 49.
  34. 50.
  35. 51.
  36. 52.
  37. 53.
  38. 54.
  39. 55.
  40. 56.
  41. 59.