Upgrade to Pro — share decks privately, control downloads, hide ads and more …

JobQueuePatterns.pdf

Robert Allen
March 20, 2013
160

 JobQueuePatterns.pdf

Robert Allen

March 20, 2013
Tweet

Transcript

  1. Service  Design  Pa-erns   Service  Design  Pa-erns:  Fundamental  Design  Solu?ons

     for     SOAP/WSDL  and  RESTful  Web  Services     By  Robert  Daigneau   Publica?on  Date:  November  4,  2011   ISBN-­‐10:  032154420X   ISBN-­‐13:  978-­‐0321544209   Edi?on:  1  
  2. Workflow  processor   Workflow  engines  govern  en?re  workflow  life  

    cycles  from  process  instan?a?on  to  termina?on.  
  3. What  the  Zend  Job  Queue  is  not   •  It

     is  not  perfect   •  It  is  not  well  documented   •  It  is  not  free   •  It  is  not  always  the  right  tool  
  4. Alterna?ves  to  Zend  Job  Queue   •  Gearman+libgearman   • 

    Celery+Rhubarb   •  Cron/Chronos   •  PHP_Job-­‐Queue  
  5. Why  do  I  need  this  extra  work?   •  Concurrency

      •  Resiliency   •  Scaling  work  load   •  Reliability  of  task  execu?on  
  6. The  pa-erns   •  Request/Response   •  Workflow  Connector  

    •  Request/Acknowledge   •  Request/Acknowledge/Poll   •  Request/Acknowledge/Callback  
  7. Resources   •  The  Code  Examples:  h-ps://gist.github.com/ zircote/974ba6a3360874b75a14   • 

    h-p://gearman.org/   •  h-p://www.zend.com/en/products/server/ zend-­‐server-­‐job-­‐queue   •  ZendJobQueue  Autocomple?on  file:  h-ps:// gist.github.com/zircote/3189466   •  h-ps://github.com/astorm/Job-­‐Queue