SlideShare a Scribd company logo
Delayed operations
with queues
Yuriy Gerasimov
Frédéric G. Marand
Yuriy Gerasimov
ygerasimov
• FFW
• Drupal architect & developer
• Contrib 7 modules: services,
draggableviews
• Founder at Backtrac.io
Frédéric G. Marand
fgm
• OSInet: performance/architecture
consulting
• for internal teams at larger accounts
• Core contributor 4.7 to 8.0.x,
MongoDB + XMLRPC maintainer +
others
• Already 4 D8 customer projects
before 8.0.0
• Customer D8 in production since
07/2015
• Frequently adds queueing to larger
Drupal projects
Why use queues ?
To have websites which are :
• Faster for visitors
• Snappier for editors
• More scaleable
To process time-consuming jobs :
• Video encoding
• High-resolution gallery uploads and processing
Concrete use cases
• Prepare content for non-Drupal front-ends
• Anticipate content generation
• Deferred submits, e.g. comments handling
• Slow operations: node saves, previews, image
processing
• External data sources: pull, push
• Multi-step operations: batch
Cooking for front-ends
Anticipated content
generation
Comment handling
“Pull” data sources
(aggregator)
“Push” data sources
Image processing
Job servers
• How to get results
• Rerun failed jobs
• Separate queue for failed jobs
• Monitoring queues, workers
• Supervisor
Some implementations
Queue API methods: Queue
QueueInterface
• Q::createItem(mixed $data: void
• Q::claimItem($lease_time = 3600: mixed $item
FALSE | stdClass + [item_id => int, data => mixed, created => timestamp]
$lease_time → Assumptions for runner, currently not used
• Q::deleteItem($item): void -> work done
• Q::releaseItem($item): bool
• Q::numberOfItems(): int → best guess, unreliable
• Q::createQueue() / Q::deleteQueue()
ReliableQueueInterface: ordering, single execution
Queue Runners
Core / Contrib
• Core Cron / Elysia Cron / Queue_Runner
• Drush: queue-list / queue-run
Similar limitations:
• Default on in D6 / D7, default off in D8
• Single threaded, single process across queues
Custom runners
• Provided by queue modules or per-project one-offs
• Preemption, parallel execution...
Queue API limitations
• Exception handling
• Priority management
• Tagging
• Delay, burying ...
• No monitoring, peek(), deduplication
Questions ?

More Related Content

KEY
Cms expo
PPTX
Cross-platform JavaScript
PPTX
PDF
Phototype Digital Asset Management
PDF
[Nuxeo World 2013] nuxeo.io
PPT
Shio CMS - Presentation
PDF
Introduction to Lectures in Apple iClub at DA-IICT
PDF
Find your data
Cms expo
Cross-platform JavaScript
Phototype Digital Asset Management
[Nuxeo World 2013] nuxeo.io
Shio CMS - Presentation
Introduction to Lectures in Apple iClub at DA-IICT
Find your data

What's hot (19)

PPTX
Multisite Implementation Within Nonprofit Organization by Wigid Triyadi
PPTX
GraphDb in XPages
PPTX
SPSNL16 - Building Office 365 and SharePoint solutions using modern developer...
ODP
Unicon June 2014 IAM Briefing
PDF
e-Business and Enterprise-grade Content Management - Hans Bossenbroek, Luminis
PDF
Enterprise Web Development
ODP
Asset Management and Drupal
PDF
Drupal 8 introduction
PDF
Pavel Prischepa. Fffast Drupal backend.
PDF
nodeconf-eu
PDF
WDC lntroduction
PDF
JAMstack
PPTX
Yace 3.0
PPTX
How to automate your BizTalk Installations and Deployments with Chef
PPTX
Lightswitch
PDF
Uniface 10 Now is the time by David Akerman
PDF
TYPO3 - The Enterprise Open Source CMS - Rania Marou - FOSSCOMM 2015
PDF
Week6 office-hours
PPTX
TYPO3 and t3kit overview
Multisite Implementation Within Nonprofit Organization by Wigid Triyadi
GraphDb in XPages
SPSNL16 - Building Office 365 and SharePoint solutions using modern developer...
Unicon June 2014 IAM Briefing
e-Business and Enterprise-grade Content Management - Hans Bossenbroek, Luminis
Enterprise Web Development
Asset Management and Drupal
Drupal 8 introduction
Pavel Prischepa. Fffast Drupal backend.
nodeconf-eu
WDC lntroduction
JAMstack
Yace 3.0
How to automate your BizTalk Installations and Deployments with Chef
Lightswitch
Uniface 10 Now is the time by David Akerman
TYPO3 - The Enterprise Open Source CMS - Rania Marou - FOSSCOMM 2015
Week6 office-hours
TYPO3 and t3kit overview
Ad

Viewers also liked (20)

PDF
Gastcollege > Jongeren & social media > Universiteit Twente
PPT
Qasper - BIABC regional presentation
PPTX
Catalogo camp 7
ODP
DrupalCafe4 Kiev Services
ODP
DrupalCafe5 VCS
PPTX
Catalogo camp 10
ODP
DrupalCamp Kyiv 2011 Services
PPS
Pha thai
KEY
Commercial
PPT
4 h center program staff risk management policies & procedures
 
PPTX
Catalogo camp 8
DOC
ODP
DrupalCafe7 CTools AJAX responder
ODP
Drupal camp donetsk c tools
PPT
Pepe simeu rimini 2008 atrial fibrillation
ODP
Services Stanford 2012
PDF
5 in1869 c agility 3 im en web
ODP
Apache SOLR | Drupal Camp Kyiv 2010
PDF
Workshop > generatie zap of generatie gezond?
ODP
Automated ui testing with selenium. drupal con london 2011
Gastcollege > Jongeren & social media > Universiteit Twente
Qasper - BIABC regional presentation
Catalogo camp 7
DrupalCafe4 Kiev Services
DrupalCafe5 VCS
Catalogo camp 10
DrupalCamp Kyiv 2011 Services
Pha thai
Commercial
4 h center program staff risk management policies & procedures
 
Catalogo camp 8
DrupalCafe7 CTools AJAX responder
Drupal camp donetsk c tools
Pepe simeu rimini 2008 atrial fibrillation
Services Stanford 2012
5 in1869 c agility 3 im en web
Apache SOLR | Drupal Camp Kyiv 2010
Workshop > generatie zap of generatie gezond?
Automated ui testing with selenium. drupal con london 2011
Ad

Similar to Delayed operations with Queues (17)

PDF
Delayed operations with queues for website performance
PDF
Faster Drupal sites using Queue API
ODP
Drupal 7 Queues
PDF
Using queues and offline processing to help speed up your application
PPTX
Job Queues Overview
PDF
Faster PHP apps using Queues and Workers
PDF
Laravel Queues In Action 2nd Mohamed Said
PDF
Laravel Queues and Jobs – from the basics to Horizon
PPTX
Do you queue (updated)
ODP
Deferred Processing in Ruby - Philly rb - August 2011
KEY
Work Queues
PDF
Job Queue Presentation - OSSCamp 2014
KEY
Gearman and CodeIgniter
PPTX
Message Queues & Offline Processing with PHP
ODP
Drupal course - batch API
PDF
Queue your work
PDF
Chapman: Building a High-Performance Distributed Task Service with MongoDB
Delayed operations with queues for website performance
Faster Drupal sites using Queue API
Drupal 7 Queues
Using queues and offline processing to help speed up your application
Job Queues Overview
Faster PHP apps using Queues and Workers
Laravel Queues In Action 2nd Mohamed Said
Laravel Queues and Jobs – from the basics to Horizon
Do you queue (updated)
Deferred Processing in Ruby - Philly rb - August 2011
Work Queues
Job Queue Presentation - OSSCamp 2014
Gearman and CodeIgniter
Message Queues & Offline Processing with PHP
Drupal course - batch API
Queue your work
Chapman: Building a High-Performance Distributed Task Service with MongoDB

More from Yuriy Gerasimov (16)

PDF
Progressing to Team Lead
PDF
What kind testing DUG Vancouver
PDF
Editor Experience in Drupal 8
PDF
Load Testing with JMeter
PDF
Ci. Drupal Camp Berlin 2014
PDF
Inline elements. DrupalCamp Berlin 2014
ODP
CI and other tools for feature branch development
ODP
Drupal 8 Routing
ODP
Clean code and refactoring
ODP
BADCamp 2012 Facet API
ODP
DrupalCafe Kyiv EntityAPI
ODP
DrupalCafe Kyiv CTools
ODP
DrupalCafe Kyiv drupal8
ODP
Automated UI testing. Selenium. DrupalCamp Kyiv 2011
ODP
Automated UI testing with Selenium
ODP
Code Driven Development Zaporozhye DrupalForum
Progressing to Team Lead
What kind testing DUG Vancouver
Editor Experience in Drupal 8
Load Testing with JMeter
Ci. Drupal Camp Berlin 2014
Inline elements. DrupalCamp Berlin 2014
CI and other tools for feature branch development
Drupal 8 Routing
Clean code and refactoring
BADCamp 2012 Facet API
DrupalCafe Kyiv EntityAPI
DrupalCafe Kyiv CTools
DrupalCafe Kyiv drupal8
Automated UI testing. Selenium. DrupalCamp Kyiv 2011
Automated UI testing with Selenium
Code Driven Development Zaporozhye DrupalForum

Recently uploaded (20)

PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Encapsulation theory and applications.pdf
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Empathic Computing: Creating Shared Understanding
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
Electronic commerce courselecture one. Pdf
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
Programs and apps: productivity, graphics, security and other tools
NewMind AI Weekly Chronicles - August'25 Week I
Unlocking AI with Model Context Protocol (MCP)
Encapsulation theory and applications.pdf
Spectral efficient network and resource selection model in 5G networks
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Dropbox Q2 2025 Financial Results & Investor Presentation
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
The AUB Centre for AI in Media Proposal.docx
Empathic Computing: Creating Shared Understanding
MIND Revenue Release Quarter 2 2025 Press Release
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Understanding_Digital_Forensics_Presentation.pptx
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Electronic commerce courselecture one. Pdf
Diabetes mellitus diagnosis method based random forest with bat algorithm
Per capita expenditure prediction using model stacking based on satellite ima...

Delayed operations with Queues

  • 1. Delayed operations with queues Yuriy Gerasimov Frédéric G. Marand
  • 2. Yuriy Gerasimov ygerasimov • FFW • Drupal architect & developer • Contrib 7 modules: services, draggableviews • Founder at Backtrac.io
  • 3. Frédéric G. Marand fgm • OSInet: performance/architecture consulting • for internal teams at larger accounts • Core contributor 4.7 to 8.0.x, MongoDB + XMLRPC maintainer + others • Already 4 D8 customer projects before 8.0.0 • Customer D8 in production since 07/2015 • Frequently adds queueing to larger Drupal projects
  • 4. Why use queues ? To have websites which are : • Faster for visitors • Snappier for editors • More scaleable To process time-consuming jobs : • Video encoding • High-resolution gallery uploads and processing
  • 5. Concrete use cases • Prepare content for non-Drupal front-ends • Anticipate content generation • Deferred submits, e.g. comments handling • Slow operations: node saves, previews, image processing • External data sources: pull, push • Multi-step operations: batch
  • 12. Job servers • How to get results • Rerun failed jobs • Separate queue for failed jobs • Monitoring queues, workers • Supervisor
  • 14. Queue API methods: Queue QueueInterface • Q::createItem(mixed $data: void • Q::claimItem($lease_time = 3600: mixed $item FALSE | stdClass + [item_id => int, data => mixed, created => timestamp] $lease_time → Assumptions for runner, currently not used • Q::deleteItem($item): void -> work done • Q::releaseItem($item): bool • Q::numberOfItems(): int → best guess, unreliable • Q::createQueue() / Q::deleteQueue() ReliableQueueInterface: ordering, single execution
  • 15. Queue Runners Core / Contrib • Core Cron / Elysia Cron / Queue_Runner • Drush: queue-list / queue-run Similar limitations: • Default on in D6 / D7, default off in D8 • Single threaded, single process across queues Custom runners • Provided by queue modules or per-project one-offs • Preemption, parallel execution...
  • 16. Queue API limitations • Exception handling • Priority management • Tagging • Delay, burying ... • No monitoring, peek(), deduplication