• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Job Queue - web is more than request and response
 

Job Queue - web is more than request and response

on

  • 4,780 views

Job queue presentation for PHP meetup bangalore on 24th April 2010

Job queue presentation for PHP meetup bangalore on 24th April 2010

Statistics

Views

Total Views
4,780
Views on SlideShare
2,424
Embed Views
2,356

Actions

Likes
3
Downloads
40
Comments
0

7 Embeds 2,356

http://abrdev.com 2263
http://www.linkedin.com 61
https://www.linkedin.com 13
http://www.slideshare.net 8
url_unknown 8
http://www.lmodules.com 2
http://hghltd.yandex.net 1
More...

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

CC Attribution License

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Job Queue - web is more than request and response Job Queue - web is more than request and response Presentation Transcript

    • JOB QUEUE web is more than request and response Abhinav Lal
    • WHO AM I
      • CTO at Naabo
      • TurboDoc.in
      • Cooking PHP for 4 years
    • Job Queue
      • In computer science, message queues and mailboxes are software-engineering components used for interprocess communication, or for inter-thread communication within the same process.
      • http://en.wikipedia.org/wiki/Message_queue
      • Any long running work which does not require user feedback should be done in background.
    • Order processing without job queue
    • Order processing with job queue
    • Jobs to run in background
        • Sending email
        • Fetching RSS feed periodically
        • Interacting with other application API
        • Complex report generation
        • Log analysis
        • cleaning file system
          • periodically or after certain action.
    • But I can use cron for that
      • Asynchronous
      • Low latency
      • Reliable
      • Scalable
    • Options out there
    • Options out there
    • Gearman = Manager
      • Developed by Danga (People behind memcache)
      • Open source C daemon
      • Native PHP extension
      • Persistence – drizzle, postgres, memcache, sqllite
      • Distributed
      • No single point of failure
    • Beanstalkd
      • Open source C daemon
      • Fast
      • Persistence – bin log file
      • Distributed
      • PHP library – pheanstalk, beanstalk
      • Simple protocol
    • Simple setup Client script Job Server Worker script
    • Beanstalkd
    • Beanstalkd client
    • Beanstalkd Worker
    • Beanstalkd Goodness
      • Named Tubes – max 200 bytes
      • Priority
      • Delayed job
      • Bury
      • Kick
    • Advantages
      • Speed up work
      • Parallel and asynchronous work
      • Scales easily
      • Call functionality in other programming language
      • Does not block your apache process.
    • Running worker script
      • Use supervisord
      • Gearman Manager
      • Gear up
      • Check for memory leaks in worker scripts
      • Restart your worker scripts after certain number of runs.
      • Questions
      Abhinav Lal Blog: abhinavlal.wordpress.com Twitter: @abhinavlal Slideshare: slideshare.net/abhinavlal