0
Supervisor, Gearman and PHP - Jobmanagement with sanity!    ABU ASHRAF MASNUN
What is it all about? PHP GearmanSupervisor Job Management
Let’s get REAL!             Deploy Ninja – A case study              PROPOSED FEATURES   Deployment Solution (SVN to s/FT...
How to train our Ninja?                What did we have to do?                REQUIREMENTS Tasks Involved:     Fetch the...
And cometh the tragedy!              The day my life sucked !^@#           ARCHITECTURAL CHALLENGES   Instant processing...
Gearman, the super hero!            He came and saved my a$$             GEARMAN FEATURES Distributed workload managemen...
Gearman: How it works?   Understanding Gearman
Gearman: Installation                             Are you ready?   QR CodeInstall Gearman:          sudo apt-get install g...
Gearman: Daemonizing!                      Starting Gearman     QR CodeRunning GearmanDaemon:      sudo gearman –d –u root...
QR CodeGearman: Workers     PHP Worker
QR CodeGearman: Workers   Breaking it down!
QR CodeGearman: Workers   Breaking it down!
QR CodeGearman: Clients   Requesting a job!
Gearman: Alternatives!       Who else is there? RabbitMQ ZeroMQ Apache MQ Dropr Microsoft MQ
Whew! Almost done!                   Life is getting better               CHALLENGES STATUS   Instant processing requires...
Meet Supervisor!               Here comes the tough guy!             SUPERVISOR FEATURES Simple & Centralized Efficient ...
Supervisor: Installation!                  Let’s go!         QR Codesudo apt-get install python-setuptools     sudo easy_i...
Supervisor: Getting Started!     Config, debug and run!    QR Codesudo echo_supervisord_conf >    /etc/supervisord.conf   ...
Hurray! We’re done!                     Life is so good :D               CHALLENGES STATUS   Instant processing requires ...
What’s your Story?                 You can do it too!                USE CASES Image Processing? Cache Regeneration? Ma...
That was Simple! Eh?    Got anything to ask?
The Leevian!           Who am I?     ABU ASHRAF MASNUN  Software Engineer @ Leeviohttp://masnun.commasnun@leevio.com
Upcoming SlideShare
Loading in...5
×

Gearman, Supervisor and PHP - Job Management with Sanity!

9,705

Published on

my talk in the phpXperts seminar 2011, Dhaka.

Published in: Technology
2 Comments
5 Likes
Statistics
Notes
  • Dear Feroz Khan,

    I am located in Bangladesh. What type of training are you looking for? Online or offline? If you could please drop an email to mailbox [at] masnun.me, we could take the discussion ahead in a private space :)

    Thanks for your comment :)
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Ashraf, We are looking at Gearman Training for couple of our associates who are situated in North America. When i was searching the web, saw in your web page that you have expertise in offering training for Gearman. If yes, we would like to hear from you on the procedures for scheduling an training session for Gearman and regarding the other details associated with it.



    Thanks
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
No Downloads
Views
Total Views
9,705
On Slideshare
0
From Embeds
0
Number of Embeds
4
Actions
Shares
0
Downloads
46
Comments
2
Likes
5
Embeds 0
No embeds

No notes for slide

Transcript of "Gearman, Supervisor and PHP - Job Management with Sanity!"

  1. 1. Supervisor, Gearman and PHP - Jobmanagement with sanity! ABU ASHRAF MASNUN
  2. 2. What is it all about? PHP GearmanSupervisor Job Management
  3. 3. Let’s get REAL! Deploy Ninja – A case study PROPOSED FEATURES Deployment Solution (SVN to s/FTP) Trigger URL – Web Hooks Deploy Now – Deploy the latest right now Full Deploy – Upload the entire repo again
  4. 4. How to train our Ninja? What did we have to do? REQUIREMENTS Tasks Involved:  Fetch the repo  Upload to the server Instant processing Process separation for the three deploymenttypes
  5. 5. And cometh the tragedy! The day my life sucked !^@#  ARCHITECTURAL CHALLENGES Instant processing requires “Daemons” PHP was not built for long running processes! Premature termination & Zombie processes. Monitoring the processes. Restarting the processes when terminated.
  6. 6. Gearman, the super hero! He came and saved my a$$  GEARMAN FEATURES Distributed workload management Client – Worker Architecture Multiple workers Multi-lingual workers
  7. 7. Gearman: How it works? Understanding Gearman
  8. 8. Gearman: Installation Are you ready? QR CodeInstall Gearman: sudo apt-get install gearmanInstall Libgearman: sudo apt-get install libgearman-devInstall the PHP Extension: sudo pecl install channel://pecl.php.net/gearman-0.8.0
  9. 9. Gearman: Daemonizing! Starting Gearman QR CodeRunning GearmanDaemon: sudo gearman –d –u rootDebugging Gearman (Verbose mode) : sudo gearman –d -vvv –u root
  10. 10. QR CodeGearman: Workers PHP Worker
  11. 11. QR CodeGearman: Workers Breaking it down!
  12. 12. QR CodeGearman: Workers Breaking it down!
  13. 13. QR CodeGearman: Clients Requesting a job!
  14. 14. Gearman: Alternatives! Who else is there? RabbitMQ ZeroMQ Apache MQ Dropr Microsoft MQ
  15. 15. Whew! Almost done! Life is getting better CHALLENGES STATUS Instant processing requires “Daemons” PHP was not built for long running processes! Premature termination & Zombie processes. Monitoring the processes. Restarting the processes when terminated.
  16. 16. Meet Supervisor! Here comes the tough guy! SUPERVISOR FEATURES Simple & Centralized Efficient & Extensible Compatible & ProvenIt monitors your processes and restarts asinstructed!
  17. 17. Supervisor: Installation! Let’s go! QR Codesudo apt-get install python-setuptools sudo easy_install supervisor
  18. 18. Supervisor: Getting Started! Config, debug and run! QR Codesudo echo_supervisord_conf > /etc/supervisord.conf sudo supervisord -n sudo supervisord
  19. 19. Hurray! We’re done! Life is so good :D CHALLENGES STATUS Instant processing requires “Daemons” PHP was not built for long running processes! Premature termination & Zombie processes. Monitoring the processes. Restarting the processes when terminated.
  20. 20. What’s your Story? You can do it too! USE CASES Image Processing? Cache Regeneration? Mass emails?
  21. 21. That was Simple! Eh? Got anything to ask?
  22. 22. The Leevian! Who am I? ABU ASHRAF MASNUN Software Engineer @ Leeviohttp://masnun.commasnun@leevio.com
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×