SlideShare a Scribd company logo
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

More Related Content

Similar to Job Queue - web is more than request and response (20)

PDF
Distributed Queue System using Gearman
Eric Cho
 
PDF
2015 ZendCon - Do you queue
Mike Willbanks
 
PPTX
Do you queue (updated)
10n Software, LLC
 
PPT
Gearman and asynchronous processing in PHP applications
Teamskunkworks
 
PDF
Job Queue Presentation - OSSCamp 2014
OSSCube
 
KEY
Work Queues
ciconf
 
PPTX
Get queued
Chad Windnagle
 
PPTX
Massaging the Pony: Message Queues and You
Shawn Rider
 
PPTX
Magento's Imagine eCommerce Conference: Do You Queue?
varien
 
ODP
The Art of Message Queues - TEKX
Mike Willbanks
 
KEY
Gearman and CodeIgniter
Erik Giberti
 
PDF
Working with Asynchronous Events
Garden of Concepts GmbH
 
PPT
Task Scheduling and Asynchronous Processing Evolved. Zend Server Job Queue
Sam Hennessy
 
PDF
Work Queue Systems
David Butler
 
PPTX
North east user group tour
10n Software, LLC
 
PDF
Why Task Queues - ComoRichWeb
Bryan Helmig
 
KEY
Cooking a rabbit pie
Tomas Doran
 
ODP
Introduction to Python Celery
Mahendra M
 
PPTX
Slides from LAX & DEN usergroup meetings
10n Software, LLC
 
PPTX
Slideshare - Magento Imagine - Do You Queue
10n Software, LLC
 
Distributed Queue System using Gearman
Eric Cho
 
2015 ZendCon - Do you queue
Mike Willbanks
 
Do you queue (updated)
10n Software, LLC
 
Gearman and asynchronous processing in PHP applications
Teamskunkworks
 
Job Queue Presentation - OSSCamp 2014
OSSCube
 
Work Queues
ciconf
 
Get queued
Chad Windnagle
 
Massaging the Pony: Message Queues and You
Shawn Rider
 
Magento's Imagine eCommerce Conference: Do You Queue?
varien
 
The Art of Message Queues - TEKX
Mike Willbanks
 
Gearman and CodeIgniter
Erik Giberti
 
Working with Asynchronous Events
Garden of Concepts GmbH
 
Task Scheduling and Asynchronous Processing Evolved. Zend Server Job Queue
Sam Hennessy
 
Work Queue Systems
David Butler
 
North east user group tour
10n Software, LLC
 
Why Task Queues - ComoRichWeb
Bryan Helmig
 
Cooking a rabbit pie
Tomas Doran
 
Introduction to Python Celery
Mahendra M
 
Slides from LAX & DEN usergroup meetings
10n Software, LLC
 
Slideshare - Magento Imagine - Do You Queue
10n Software, LLC
 

Recently uploaded (20)

PDF
From Code to Challenge: Crafting Skill-Based Games That Engage and Reward
aiyshauae
 
PPTX
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
PDF
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
PDF
What Makes Contify’s News API Stand Out: Key Features at a Glance
Contify
 
PDF
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 
PDF
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
PPTX
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
PPTX
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
PDF
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
PDF
Blockchain Transactions Explained For Everyone
CIFDAQ
 
PDF
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
PDF
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
PPTX
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
PDF
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
PDF
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
PDF
LLMs.txt: Easily Control How AI Crawls Your Site
Keploy
 
PDF
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
PDF
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
PDF
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PDF
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
From Code to Challenge: Crafting Skill-Based Games That Engage and Reward
aiyshauae
 
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
What Makes Contify’s News API Stand Out: Key Features at a Glance
Contify
 
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
AUTOMATION AND ROBOTICS IN PHARMA INDUSTRY.pptx
sameeraaabegumm
 
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
Blockchain Transactions Explained For Everyone
CIFDAQ
 
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
CIFDAQ Market Insights for July 7th 2025
CIFDAQ
 
LLMs.txt: Easily Control How AI Crawls Your Site
Keploy
 
Newgen Beyond Frankenstein_Build vs Buy_Digital_version.pdf
darshakparmar
 
Smart Trailers 2025 Update with History and Overview
Paul Menig
 
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
Ad

Job Queue - web is more than request and response

  • 1. JOB QUEUE web is more than request and response Abhinav Lal
  • 2. WHO AM I CTO at Naabo TurboDoc.in Cooking PHP for 4 years
  • 3. 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.
  • 6. 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.
  • 7. But I can use cron for that Asynchronous Low latency Reliable Scalable
  • 10. 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
  • 11. Beanstalkd Open source C daemon Fast Persistence – bin log file Distributed PHP library – pheanstalk, beanstalk Simple protocol
  • 12. Simple setup Client script Job Server Worker script
  • 16. Beanstalkd Goodness Named Tubes – max 200 bytes Priority Delayed job Bury Kick
  • 17. Advantages Speed up work Parallel and asynchronous work Scales easily Call functionality in other programming language Does not block your apache process.
  • 18. 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.
  • 19. Questions Abhinav Lal Blog: abhinavlal.wordpress.com Twitter: @abhinavlal Slideshare: slideshare.net/abhinavlal