Managing queues with Laravel Horizon (AFUP)

Managing queues with Laravel Horizon (AFUP)

A1b4b398630bbd32b77a82cbc37fae9a?s=128

Freek Van der Herten

May 17, 2019
Tweet

Transcript

  1. Supercharging 
 queues in Laravel 
 with Horizon

  2. About me Freek Van der Herten Partner & developer at

    Spatie @freekmurze murze.be ohdear.app
  3. fullstackeurope.com

  4. Open Source 
 Software

  5. Spatie creates a lot of it ± 200 packages on

    Packagist ± 2,300,000 downloads a month ± 35,000,000 total downloads All Postcardware!
  6. Highlights Laravel Popular laravel-backup laravel-medialibrary laravel-permission

  7. Highlights PHP Popular browsershot crawler fractalistic image-optimizer

  8. spatie.be/open-source

  9. spatie.be/open-source/postcards

  10. Let's talk 
 about queues

  11. This talk Tiny bit of theory Queueing basics in Laravel

    Introducing Horizon
  12. Theory

  13. Why do we use queues? Users want fast responses Intensive

    tasks shouldn't be done inside the request Move work to a queue
  14. WORK TIME TIME REQUEST REQUEST WORK

  15. ONE QUEUE MULTIPLE QUEUES Queue 1 Queue 2 Queue 3

    TIME TIME WORK A WORK A WORK B WORK C WORK B WORK C
  16. Queues 
 in Laravel

  17. Feature rich Priorities Chaining Delays Testable

  18. Driver based Database, Redis, Beanstalkd, Amazon SQS Can create your

    own driver Sync driver is handy locally
  19. Demo

  20. Introducing Horizon

  21. Free first party package Dashboard for queues Scheduler Code driven

    configuration Laravel & Redis specific
  22. Demo

  23. In closing

  24. Summary Feature rich Driver based Easy testable Horizon is a

    powerful tool to manage jobs
  25. Resources github.com/spatie/laravel-queues-demo-app laravel.com/docs/5.8/queues laravel.com/docs/5.8/horizon ohdear.app/blog/how-to-size-scale-your-laravel-queues

  26. Thank you! speakerdeck.com/freekmurze/horizon-afup spatie.be/open-source murze.be ohdear.app fullstackeurope.com