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

PHP-Queue Case Study: IslamicEvents.sg

PHP-Queue Case Study: IslamicEvents.sg

Case study on how I optimised the Facebook publishing of prayer reminders for IslamicEvents.sg

Michael Cheng

January 29, 2013
Tweet

More Decks by Michael Cheng

Other Decks in Programming

Transcript

  1. PHPQueue in Action
    Case Study: IslamicEvents.sg
    Tuesday, 29 January, 13

    View Slide

  2. Michael Cheng
    Senior Software Engineer, mig33
    http://twitter.com/coderkungfu
    http://github.com/miccheng
    Tuesday, 29 January, 13

    View Slide

  3. Problem
    • Daily prayer reminders via Facebook.
    • Facebook publishing is failing.
    • Cron Jobs & messy MySQL gymnastics.
    • Unable to reach audience fully.
    Tuesday, 29 January, 13

    View Slide

  4. Solution
    • Implement a queuing system that can be
    scaled onto multiple servers.
    • Use Beanstalkd & PHPQueue.
    • Batch processing using Facebook's batch
    request API.
    Tuesday, 29 January, 13

    View Slide

  5. PHP-Queue
    https://github.com/miccheng/php-queue
    https://packagist.org/packages/coderkungfu/php-queue
    Tuesday, 29 January, 13

    View Slide

  6. Result
    • Increase reach by 80%.
    • Facebook Page Likes increased from 12,000
    to 15,000 in a few weeks.
    • Zero maintenance.
    • Git deployment using Bitbucket.
    Tuesday, 29 January, 13

    View Slide

  7. Lessons Learnt
    • Facebook's Batch Request API does not work
    as advertised.
    • Continuous Deployment is a god-sent.
    • Continuous Integration is important, even in
    small projects.
    Tuesday, 29 January, 13

    View Slide