SlideShare a Scribd company logo
1 of 18
Qless – Powerful Queues
               Dan Lecocq
       http://bit.ly/redisconf-qless
About SEOmoz
Martin Luther Time
Dropped Jobs, Flaky Workers


                                  - We’re on the cloud



                                  - Jobs are long-running



                                  - Jobs are sparse




    Please forgive my memegenerator abuse!
Debugging, Tracking, Insight


- Squeaky wheels



- Finding misbehaving hosts



- How long are jobs taking?
Scheduling, Dependencies, Operations


               - Crawls run once a week


               - Customer site transient outages


               - Multiple campaigns, same domain


               - Empower help team to help
A New Hope
Language Agnostic

                                                          github.com/seomoz/qless



                                                          github.com/seomoz/qless-py




                                                          bitbucket.org/nuclon/qless-perl

github.com/seomoz/qless-core


                                                          Releasing Soon!



                       We’ve also played with Node.js and C++ bindings
Job Anatomy
       Job ID and Type          Priority, Flagging, Move



                              Searchable Tags




     JSON Blob Data               History



Straight out of the web app
Web App and Operational Insight
Strong Guarantees

- Completely client managed


- Strong job completion guarantees


- Decommissioning workers is easy


- Flaky workers affect efficiency, not correctness
Code Example
Gnomes!




For those unfamiliar with this meme: wiki/Gnomes_(South_Park)
Python Client
# In gnomes.py
class GnomesJob(object):
       # This would be invoked when a GnomesJob is popped off the 'underpants' queue
       @staticmethod
       def underpants(job):
              # 1) Collect Underpants
              job['foo'] # Reference job data
              # Complete and advance to the next step, 'unknown’
              job.complete('unknown')

      @staticmethod
      def unknown(job):
            # 2) ?
            ...
            # Complete and advance to the next step, 'profit’
            job.complete('profit')

      @staticmethod
      def profit(job):
             # 3) Profit
             ...
             # Complete the job
             job.complete()
Running A Worker

qless-py-worker [-h] [--host HOST] [-w WORKERS] [-g GREENLETS]
              [-p PATH] [-q QUEUE] [-m IMPORT] [-i INTERVAL]
              [-n NAME] [-d WORKDIR] [-r] [-v]

qless-py-worker --host "my-qless-host" 
       -q underpants 
       -q unknown 
       -q profit 
       -w 20 
       -d /path/to/sandboxes 
       -v




# Now in python, add some jobs:
import qless
from qless import GnomesJob
client = qless.Client(...)

client.put('underpants', GnomesJob, {'foo': 'bar'})
Shameless Plug
  bit.ly/work-at-seomoz
Dan Lecocq, Software Ninja | @danlecocq
  dan@seomoz.org


Slides: http://bit.ly/redisconf-qless
Apply: http://bit.ly/work-at-seomoz




             Follow Up!
Where My Images At?


1) “Angry Guy” from http://dinkerson.wordpress.com/
    http://dinkerson.files.wordpress.com/2012/02/angry-
    guy.jpg

2) “Underpants Gnomes” from
   http://www.tumblr.com/tagged/underpants-gnomes

3) “Switchboards” from
   http://markc1.typepad.com/.a/6a00d83451bb2969e201310f
   8060a1970c-800wi




            Thanks for the images!

More Related Content

What's hot

Real-Time Python Web: Gevent and Socket.io
Real-Time Python Web: Gevent and Socket.ioReal-Time Python Web: Gevent and Socket.io
Real-Time Python Web: Gevent and Socket.ioRick Copeland
 
Put a Button on It: Removing Barriers to Going Fast
Put a Button on It: Removing Barriers to Going FastPut a Button on It: Removing Barriers to Going Fast
Put a Button on It: Removing Barriers to Going FastOSCON Byrum
 
Rubyslava + PyVo #48
Rubyslava + PyVo #48Rubyslava + PyVo #48
Rubyslava + PyVo #48Jozef Képesi
 
Ember.js internals backburner.js and rsvp.js
Ember.js internals  backburner.js and rsvp.jsEmber.js internals  backburner.js and rsvp.js
Ember.js internals backburner.js and rsvp.jsgavinjoyce
 
Psgi Plack Sfpm
Psgi Plack SfpmPsgi Plack Sfpm
Psgi Plack Sfpmsom_nangia
 
Webinar: Getting Started with Ruby and MongoDB
Webinar: Getting Started with Ruby and MongoDBWebinar: Getting Started with Ruby and MongoDB
Webinar: Getting Started with Ruby and MongoDBMongoDB
 
Cooking Up Drama - ChefConf 2015
Cooking Up Drama - ChefConf 2015 Cooking Up Drama - ChefConf 2015
Cooking Up Drama - ChefConf 2015 Chef
 
Groovy Powered Clean Code
Groovy Powered Clean CodeGroovy Powered Clean Code
Groovy Powered Clean Codenoamt
 
Reasons To Love Ruby
Reasons To Love RubyReasons To Love Ruby
Reasons To Love RubyBen Scheirman
 
AnyMQ, Hippie, and the real-time web
AnyMQ, Hippie, and the real-time webAnyMQ, Hippie, and the real-time web
AnyMQ, Hippie, and the real-time webclkao
 
Html5, css3, canvas, svg and webgl
Html5, css3, canvas, svg and webglHtml5, css3, canvas, svg and webgl
Html5, css3, canvas, svg and webglKilian Valkhof
 
Ring: Web Apps in Idiomatic Clojure
Ring: Web Apps in Idiomatic ClojureRing: Web Apps in Idiomatic Clojure
Ring: Web Apps in Idiomatic ClojureMark McGranaghan
 
CoffeeScript in 5mins
CoffeeScript in 5minsCoffeeScript in 5mins
CoffeeScript in 5minsMasakuni Kato
 
Perl: Hate it for the Right Reasons
Perl: Hate it for the Right ReasonsPerl: Hate it for the Right Reasons
Perl: Hate it for the Right ReasonsMatt Follett
 
CoffeeScript: A beginner's presentation for beginners copy
CoffeeScript: A beginner's presentation for beginners copyCoffeeScript: A beginner's presentation for beginners copy
CoffeeScript: A beginner's presentation for beginners copyPatrick Devins
 
Front-end development automation with Grunt
Front-end development automation with GruntFront-end development automation with Grunt
Front-end development automation with Gruntbenko
 

What's hot (19)

Real-Time Python Web: Gevent and Socket.io
Real-Time Python Web: Gevent and Socket.ioReal-Time Python Web: Gevent and Socket.io
Real-Time Python Web: Gevent and Socket.io
 
Put a Button on It: Removing Barriers to Going Fast
Put a Button on It: Removing Barriers to Going FastPut a Button on It: Removing Barriers to Going Fast
Put a Button on It: Removing Barriers to Going Fast
 
Rubyslava + PyVo #48
Rubyslava + PyVo #48Rubyslava + PyVo #48
Rubyslava + PyVo #48
 
Ember.js internals backburner.js and rsvp.js
Ember.js internals  backburner.js and rsvp.jsEmber.js internals  backburner.js and rsvp.js
Ember.js internals backburner.js and rsvp.js
 
Modern Perl
Modern PerlModern Perl
Modern Perl
 
Psgi Plack Sfpm
Psgi Plack SfpmPsgi Plack Sfpm
Psgi Plack Sfpm
 
Webinar: Getting Started with Ruby and MongoDB
Webinar: Getting Started with Ruby and MongoDBWebinar: Getting Started with Ruby and MongoDB
Webinar: Getting Started with Ruby and MongoDB
 
Cooking Up Drama
Cooking Up DramaCooking Up Drama
Cooking Up Drama
 
Cooking Up Drama - ChefConf 2015
Cooking Up Drama - ChefConf 2015 Cooking Up Drama - ChefConf 2015
Cooking Up Drama - ChefConf 2015
 
Groovy Powered Clean Code
Groovy Powered Clean CodeGroovy Powered Clean Code
Groovy Powered Clean Code
 
Reasons To Love Ruby
Reasons To Love RubyReasons To Love Ruby
Reasons To Love Ruby
 
AnyMQ, Hippie, and the real-time web
AnyMQ, Hippie, and the real-time webAnyMQ, Hippie, and the real-time web
AnyMQ, Hippie, and the real-time web
 
Html5, css3, canvas, svg and webgl
Html5, css3, canvas, svg and webglHtml5, css3, canvas, svg and webgl
Html5, css3, canvas, svg and webgl
 
Ring: Web Apps in Idiomatic Clojure
Ring: Web Apps in Idiomatic ClojureRing: Web Apps in Idiomatic Clojure
Ring: Web Apps in Idiomatic Clojure
 
CoffeeScript in 5mins
CoffeeScript in 5minsCoffeeScript in 5mins
CoffeeScript in 5mins
 
Perl: Hate it for the Right Reasons
Perl: Hate it for the Right ReasonsPerl: Hate it for the Right Reasons
Perl: Hate it for the Right Reasons
 
CoffeeScript: A beginner's presentation for beginners copy
CoffeeScript: A beginner's presentation for beginners copyCoffeeScript: A beginner's presentation for beginners copy
CoffeeScript: A beginner's presentation for beginners copy
 
Front-end development automation with Grunt
Front-end development automation with GruntFront-end development automation with Grunt
Front-end development automation with Grunt
 
Start using vagrant now!
Start using vagrant now!Start using vagrant now!
Start using vagrant now!
 

Viewers also liked

Plumbr Slide Deck
Plumbr Slide DeckPlumbr Slide Deck
Plumbr Slide DeckContriber
 
SprayPrinter Pitch Deck
SprayPrinter Pitch DeckSprayPrinter Pitch Deck
SprayPrinter Pitch DeckContriber
 
SportID Pitch Deck
SportID Pitch DeckSportID Pitch Deck
SportID Pitch DeckContriber
 
Pendo Series B Investor Deck External
Pendo Series B Investor Deck ExternalPendo Series B Investor Deck External
Pendo Series B Investor Deck ExternalTodd Olson
 
Contently Pitch Deck
Contently Pitch DeckContently Pitch Deck
Contently Pitch DeckRyan Gum
 
Tinder Pitch Deck
Tinder Pitch DeckTinder Pitch Deck
Tinder Pitch DeckRyan Gum
 
2013 Weekdone Slush startup competition winning pitch
2013 Weekdone Slush startup competition winning pitch2013 Weekdone Slush startup competition winning pitch
2013 Weekdone Slush startup competition winning pitchWeekdone.com
 
Mattermark 2nd (Final) Series A Deck
Mattermark 2nd (Final) Series A DeckMattermark 2nd (Final) Series A Deck
Mattermark 2nd (Final) Series A DeckDanielle Morrill
 
Intercom's first pitch deck!
Intercom's first pitch deck!Intercom's first pitch deck!
Intercom's first pitch deck!Eoghan McCabe
 
Airbnb Pitch Deck From 2008
Airbnb Pitch Deck From 2008Airbnb Pitch Deck From 2008
Airbnb Pitch Deck From 2008Ryan Gum
 
Linkedin Series B Pitch Deck
Linkedin Series B Pitch DeckLinkedin Series B Pitch Deck
Linkedin Series B Pitch DeckJoseph Hsieh
 
Foursquare's 1st Pitch Deck
Foursquare's 1st Pitch DeckFoursquare's 1st Pitch Deck
Foursquare's 1st Pitch DeckRami Al-Karmi
 
The investor presentation we used to raise 2 million dollars
The investor presentation we used to raise 2 million dollarsThe investor presentation we used to raise 2 million dollars
The investor presentation we used to raise 2 million dollarsMikael Cho
 
Mixpanel - Our pitch deck that we used to raise $65M
Mixpanel - Our pitch deck that we used to raise $65MMixpanel - Our pitch deck that we used to raise $65M
Mixpanel - Our pitch deck that we used to raise $65MSuhail Doshi
 
The slide deck we used to raise half a million dollars
The slide deck we used to raise half a million dollarsThe slide deck we used to raise half a million dollars
The slide deck we used to raise half a million dollarsBuffer
 
SEOmoz Pitch Deck July 2011
SEOmoz Pitch Deck July 2011SEOmoz Pitch Deck July 2011
SEOmoz Pitch Deck July 2011Rand Fishkin
 

Viewers also liked (18)

Plumbr Slide Deck
Plumbr Slide DeckPlumbr Slide Deck
Plumbr Slide Deck
 
SprayPrinter Pitch Deck
SprayPrinter Pitch DeckSprayPrinter Pitch Deck
SprayPrinter Pitch Deck
 
SportID Pitch Deck
SportID Pitch DeckSportID Pitch Deck
SportID Pitch Deck
 
BuzzFeed Pitch Deck
BuzzFeed Pitch DeckBuzzFeed Pitch Deck
BuzzFeed Pitch Deck
 
Pendo Series B Investor Deck External
Pendo Series B Investor Deck ExternalPendo Series B Investor Deck External
Pendo Series B Investor Deck External
 
Contently Pitch Deck
Contently Pitch DeckContently Pitch Deck
Contently Pitch Deck
 
Tinder Pitch Deck
Tinder Pitch DeckTinder Pitch Deck
Tinder Pitch Deck
 
2013 Weekdone Slush startup competition winning pitch
2013 Weekdone Slush startup competition winning pitch2013 Weekdone Slush startup competition winning pitch
2013 Weekdone Slush startup competition winning pitch
 
Mattermark 2nd (Final) Series A Deck
Mattermark 2nd (Final) Series A DeckMattermark 2nd (Final) Series A Deck
Mattermark 2nd (Final) Series A Deck
 
Intercom's first pitch deck!
Intercom's first pitch deck!Intercom's first pitch deck!
Intercom's first pitch deck!
 
Front series A deck
Front series A deckFront series A deck
Front series A deck
 
Airbnb Pitch Deck From 2008
Airbnb Pitch Deck From 2008Airbnb Pitch Deck From 2008
Airbnb Pitch Deck From 2008
 
Linkedin Series B Pitch Deck
Linkedin Series B Pitch DeckLinkedin Series B Pitch Deck
Linkedin Series B Pitch Deck
 
Foursquare's 1st Pitch Deck
Foursquare's 1st Pitch DeckFoursquare's 1st Pitch Deck
Foursquare's 1st Pitch Deck
 
The investor presentation we used to raise 2 million dollars
The investor presentation we used to raise 2 million dollarsThe investor presentation we used to raise 2 million dollars
The investor presentation we used to raise 2 million dollars
 
Mixpanel - Our pitch deck that we used to raise $65M
Mixpanel - Our pitch deck that we used to raise $65MMixpanel - Our pitch deck that we used to raise $65M
Mixpanel - Our pitch deck that we used to raise $65M
 
The slide deck we used to raise half a million dollars
The slide deck we used to raise half a million dollarsThe slide deck we used to raise half a million dollars
The slide deck we used to raise half a million dollars
 
SEOmoz Pitch Deck July 2011
SEOmoz Pitch Deck July 2011SEOmoz Pitch Deck July 2011
SEOmoz Pitch Deck July 2011
 

Similar to Qless

Pilot Tech Talk #10 — Practical automation by Kamil Cholewiński
Pilot Tech Talk #10 — Practical automation by Kamil CholewińskiPilot Tech Talk #10 — Practical automation by Kamil Cholewiński
Pilot Tech Talk #10 — Practical automation by Kamil CholewińskiPilot
 
Khanh-Nguyen - Gearman - distributed process solution
Khanh-Nguyen - Gearman - distributed process solutionKhanh-Nguyen - Gearman - distributed process solution
Khanh-Nguyen - Gearman - distributed process solutionJavaScript Meetup HCMC
 
Simple ETL in python 3.5+ with Bonobo - PyParis 2017
Simple ETL in python 3.5+ with Bonobo - PyParis 2017Simple ETL in python 3.5+ with Bonobo - PyParis 2017
Simple ETL in python 3.5+ with Bonobo - PyParis 2017Romain Dorgueil
 
Simple ETL in python 3.5+ with Bonobo, Romain Dorgueil
Simple ETL in python 3.5+ with Bonobo, Romain DorgueilSimple ETL in python 3.5+ with Bonobo, Romain Dorgueil
Simple ETL in python 3.5+ with Bonobo, Romain DorgueilPôle Systematic Paris-Region
 
Packaging et déploiement d'une application avec Docker et Ansible @DevoxxFR 2015
Packaging et déploiement d'une application avec Docker et Ansible @DevoxxFR 2015Packaging et déploiement d'une application avec Docker et Ansible @DevoxxFR 2015
Packaging et déploiement d'une application avec Docker et Ansible @DevoxxFR 2015Stephane Manciot
 
Docker for Development
Docker for DevelopmentDocker for Development
Docker for Developmentallingeek
 
Groovy there's a docker in my application pipeline
Groovy there's a docker in my application pipelineGroovy there's a docker in my application pipeline
Groovy there's a docker in my application pipelineKris Buytaert
 
OSMC 2017 | Groovy There is a Docker in my Dashing Pipeline by Kris Buytaert
OSMC 2017 | Groovy There is a Docker in my Dashing Pipeline by Kris Buytaert OSMC 2017 | Groovy There is a Docker in my Dashing Pipeline by Kris Buytaert
OSMC 2017 | Groovy There is a Docker in my Dashing Pipeline by Kris Buytaert NETWAYS
 
PuppetConf 2014 Killer R10K Workflow With Notes
PuppetConf 2014 Killer R10K Workflow With NotesPuppetConf 2014 Killer R10K Workflow With Notes
PuppetConf 2014 Killer R10K Workflow With NotesPhil Zimmerman
 
Toolbox of a Ruby Team
Toolbox of a Ruby TeamToolbox of a Ruby Team
Toolbox of a Ruby TeamArto Artnik
 
Large-scaled Deploy Over 100 Servers in 3 Minutes
Large-scaled Deploy Over 100 Servers in 3 MinutesLarge-scaled Deploy Over 100 Servers in 3 Minutes
Large-scaled Deploy Over 100 Servers in 3 MinutesHiroshi SHIBATA
 
Puppet at GitHub / ChatOps
Puppet at GitHub / ChatOpsPuppet at GitHub / ChatOps
Puppet at GitHub / ChatOpsPuppet
 
Infrastructure as Data with Ansible
Infrastructure as Data with AnsibleInfrastructure as Data with Ansible
Infrastructure as Data with AnsibleCarlo Bonamico
 
Infrastructure as data with Ansible: systems and cloud deployment and managem...
Infrastructure as data with Ansible: systems and cloud deployment and managem...Infrastructure as data with Ansible: systems and cloud deployment and managem...
Infrastructure as data with Ansible: systems and cloud deployment and managem...Codemotion
 
Gitlab and Lingvokot
Gitlab and LingvokotGitlab and Lingvokot
Gitlab and LingvokotLingvokot
 
OpenShift State of the Union, brought to you by JBoss
OpenShift State of the Union, brought to you by JBossOpenShift State of the Union, brought to you by JBoss
OpenShift State of the Union, brought to you by JBossEric D. Schabell
 
Puppet for dummies - PHPBenelux UG edition
Puppet for dummies - PHPBenelux UG editionPuppet for dummies - PHPBenelux UG edition
Puppet for dummies - PHPBenelux UG editionJoshua Thijssen
 
Puppet@Citygrid - Julien Rottenberg - PuppetCamp LA '12
Puppet@Citygrid - Julien Rottenberg - PuppetCamp LA '12Puppet@Citygrid - Julien Rottenberg - PuppetCamp LA '12
Puppet@Citygrid - Julien Rottenberg - PuppetCamp LA '12Puppet
 

Similar to Qless (20)

Pilot Tech Talk #10 — Practical automation by Kamil Cholewiński
Pilot Tech Talk #10 — Practical automation by Kamil CholewińskiPilot Tech Talk #10 — Practical automation by Kamil Cholewiński
Pilot Tech Talk #10 — Practical automation by Kamil Cholewiński
 
Khanh-Nguyen - Gearman - distributed process solution
Khanh-Nguyen - Gearman - distributed process solutionKhanh-Nguyen - Gearman - distributed process solution
Khanh-Nguyen - Gearman - distributed process solution
 
Simple ETL in python 3.5+ with Bonobo - PyParis 2017
Simple ETL in python 3.5+ with Bonobo - PyParis 2017Simple ETL in python 3.5+ with Bonobo - PyParis 2017
Simple ETL in python 3.5+ with Bonobo - PyParis 2017
 
Simple ETL in python 3.5+ with Bonobo, Romain Dorgueil
Simple ETL in python 3.5+ with Bonobo, Romain DorgueilSimple ETL in python 3.5+ with Bonobo, Romain Dorgueil
Simple ETL in python 3.5+ with Bonobo, Romain Dorgueil
 
Packaging et déploiement d'une application avec Docker et Ansible @DevoxxFR 2015
Packaging et déploiement d'une application avec Docker et Ansible @DevoxxFR 2015Packaging et déploiement d'une application avec Docker et Ansible @DevoxxFR 2015
Packaging et déploiement d'une application avec Docker et Ansible @DevoxxFR 2015
 
Docker for Development
Docker for DevelopmentDocker for Development
Docker for Development
 
Groovy there's a docker in my application pipeline
Groovy there's a docker in my application pipelineGroovy there's a docker in my application pipeline
Groovy there's a docker in my application pipeline
 
OSMC 2017 | Groovy There is a Docker in my Dashing Pipeline by Kris Buytaert
OSMC 2017 | Groovy There is a Docker in my Dashing Pipeline by Kris Buytaert OSMC 2017 | Groovy There is a Docker in my Dashing Pipeline by Kris Buytaert
OSMC 2017 | Groovy There is a Docker in my Dashing Pipeline by Kris Buytaert
 
Ansible 202 - sysarmy
Ansible 202 - sysarmyAnsible 202 - sysarmy
Ansible 202 - sysarmy
 
PuppetConf 2014 Killer R10K Workflow With Notes
PuppetConf 2014 Killer R10K Workflow With NotesPuppetConf 2014 Killer R10K Workflow With Notes
PuppetConf 2014 Killer R10K Workflow With Notes
 
Toolbox of a Ruby Team
Toolbox of a Ruby TeamToolbox of a Ruby Team
Toolbox of a Ruby Team
 
Large-scaled Deploy Over 100 Servers in 3 Minutes
Large-scaled Deploy Over 100 Servers in 3 MinutesLarge-scaled Deploy Over 100 Servers in 3 Minutes
Large-scaled Deploy Over 100 Servers in 3 Minutes
 
Puppet at GitHub / ChatOps
Puppet at GitHub / ChatOpsPuppet at GitHub / ChatOps
Puppet at GitHub / ChatOps
 
Infrastructure as Data with Ansible
Infrastructure as Data with AnsibleInfrastructure as Data with Ansible
Infrastructure as Data with Ansible
 
Infrastructure as data with Ansible: systems and cloud deployment and managem...
Infrastructure as data with Ansible: systems and cloud deployment and managem...Infrastructure as data with Ansible: systems and cloud deployment and managem...
Infrastructure as data with Ansible: systems and cloud deployment and managem...
 
Node azure
Node azureNode azure
Node azure
 
Gitlab and Lingvokot
Gitlab and LingvokotGitlab and Lingvokot
Gitlab and Lingvokot
 
OpenShift State of the Union, brought to you by JBoss
OpenShift State of the Union, brought to you by JBossOpenShift State of the Union, brought to you by JBoss
OpenShift State of the Union, brought to you by JBoss
 
Puppet for dummies - PHPBenelux UG edition
Puppet for dummies - PHPBenelux UG editionPuppet for dummies - PHPBenelux UG edition
Puppet for dummies - PHPBenelux UG edition
 
Puppet@Citygrid - Julien Rottenberg - PuppetCamp LA '12
Puppet@Citygrid - Julien Rottenberg - PuppetCamp LA '12Puppet@Citygrid - Julien Rottenberg - PuppetCamp LA '12
Puppet@Citygrid - Julien Rottenberg - PuppetCamp LA '12
 

Qless

  • 1. Qless – Powerful Queues Dan Lecocq http://bit.ly/redisconf-qless
  • 4. Dropped Jobs, Flaky Workers - We’re on the cloud - Jobs are long-running - Jobs are sparse Please forgive my memegenerator abuse!
  • 5. Debugging, Tracking, Insight - Squeaky wheels - Finding misbehaving hosts - How long are jobs taking?
  • 6. Scheduling, Dependencies, Operations - Crawls run once a week - Customer site transient outages - Multiple campaigns, same domain - Empower help team to help
  • 8. Language Agnostic github.com/seomoz/qless github.com/seomoz/qless-py bitbucket.org/nuclon/qless-perl github.com/seomoz/qless-core Releasing Soon! We’ve also played with Node.js and C++ bindings
  • 9. Job Anatomy Job ID and Type Priority, Flagging, Move Searchable Tags JSON Blob Data History Straight out of the web app
  • 10. Web App and Operational Insight
  • 11. Strong Guarantees - Completely client managed - Strong job completion guarantees - Decommissioning workers is easy - Flaky workers affect efficiency, not correctness
  • 13. Gnomes! For those unfamiliar with this meme: wiki/Gnomes_(South_Park)
  • 14. Python Client # In gnomes.py class GnomesJob(object): # This would be invoked when a GnomesJob is popped off the 'underpants' queue @staticmethod def underpants(job): # 1) Collect Underpants job['foo'] # Reference job data # Complete and advance to the next step, 'unknown’ job.complete('unknown') @staticmethod def unknown(job): # 2) ? ... # Complete and advance to the next step, 'profit’ job.complete('profit') @staticmethod def profit(job): # 3) Profit ... # Complete the job job.complete()
  • 15. Running A Worker qless-py-worker [-h] [--host HOST] [-w WORKERS] [-g GREENLETS] [-p PATH] [-q QUEUE] [-m IMPORT] [-i INTERVAL] [-n NAME] [-d WORKDIR] [-r] [-v] qless-py-worker --host "my-qless-host" -q underpants -q unknown -q profit -w 20 -d /path/to/sandboxes -v # Now in python, add some jobs: import qless from qless import GnomesJob client = qless.Client(...) client.put('underpants', GnomesJob, {'foo': 'bar'})
  • 16. Shameless Plug bit.ly/work-at-seomoz
  • 17. Dan Lecocq, Software Ninja | @danlecocq dan@seomoz.org Slides: http://bit.ly/redisconf-qless Apply: http://bit.ly/work-at-seomoz Follow Up!
  • 18. Where My Images At? 1) “Angry Guy” from http://dinkerson.wordpress.com/ http://dinkerson.files.wordpress.com/2012/02/angry- guy.jpg 2) “Underpants Gnomes” from http://www.tumblr.com/tagged/underpants-gnomes 3) “Switchboards” from http://markc1.typepad.com/.a/6a00d83451bb2969e201310f 8060a1970c-800wi Thanks for the images!

Editor's Notes

  1. Hi, I’m Dan Lecocq from SEOmoz, and I’m going to talk quickly about our queueing system, qless.
  2. Real quickly, we’re up in Seattle and though we don’t do SEO ourselves, we sell data and services to support SEO consultants.We offer a number of services, but the one that drove our need for qless was one in which we crawl customer sites and report general SEO bad practices.
  3. We’re on the cloud, and so in addition to possible code flakiness, workers sometimes disappear.Jobs are long-running (sometimes even days) and represent a lot of work, and so making sure that jobs complete is really important.Jobs are sparse, and so when jobs get lost, we hear about it
  4. We have great customers, but we’re a b2b company with most of those customers being independent SEO consultants. When things go wrong, we hear about it quickly. Getting back to customers who have taken the time to write in is importantBeyond that, we’d like to have the information to find hosts that are misbehaving, as well as automatically get stats about how long jobs take
  5. Allows our Help Team to do stuff on their ownRetry jobsChange job propertiesFigure out what went wrongSaves engineer time (we used to have to do all that for them)Improves customer response timesCustom Crawl QlessShow:Queue statsFailed jobs (and retry a few)Search tags, add, remove, change priorityNotifications with growl
  6. Because it’s completely client-managed, and written in a core set of Lua bindings, it’s easy to support new languages. The atomicity guaranty of the Lua scripts enables us to make strong correctness guaranteesClient detect jobs dropped by other workers; clients get an exclusive lock on a job and must complete or heartbeat to keep lease
  7. Because it’s completely client-managed, and written in a core set of Lua bindings, it’s easy to support new languages. The atomicity guaranty of the Lua scripts enables us to make strong correctness guaranteesClient detect jobs dropped by other workers; clients get an exclusive lock on a job and must complete or heartbeat to keep lease
  8. Because it’s completely client-managed, and written in a core set of Lua bindings, it’s easy to support new languages. The atomicity guaranty of the Lua scripts enables us to make strong correctness guaranteesClient detect jobs dropped by other workers; clients get an exclusive lock on a job and must complete or heartbeat to keep lease