SlideShare a Scribd company logo
1 of 17
UNCON Message Queues &Offline Processing in PHP ByMarcel Esser Code Samurai, CROSCON Contact +1 202 730 9728 +49 176 785 69729 marcel.esser@croscon.com
Offline Processing Explained What is offline processing? Short answer: Running things in the background. Long answer: Offline processing is the act of queuing, prioritizing, dispatching, and executing jobs described by a message packet, received from some initiating process. Practical answer: Do the heavy stuff in a worker thread.
Offline Processing Explained Now Later Web Request Dispatcher Message ApplicationData Store Message Dispatcher Worker
Offline Processing Explained Now Later Web Request Dispatcher Message ApplicationData Store Message Dispatcher Worker
Message Queue Solutions
Amazon SQS Proprietary Web Service. 0.01USD/10,000.00 msgs + bw. Dead simple. Handles all locking. Messages up to 8kb in size. Messages expire after 4 days. Many permissions options. Automatically distributed. Runs on a 3rd party. 5 functions (CreateQueue, SendMessage, ReceiveMessage, ChangeMessageVisibility, and DeleteMessage) SOAP or RESTful.
gearman Open source C daemon. Socket-based client libraries in several languages. PHP client library is nice and clean. Can be configured for redundancy. Fast. No Persistence. Now with minty-fresh persistence.
dropr Open source PHP daemon. “trunk in production” Separate client and poll services. De-centralized PHP-centric Storage and transport are modular. FS and cURL are implemented.
Apache ActiveMQ Open source Java daemon. Big. Fairly Java-centric. De-centralized PHP-centric Storage and transport are modular. FS and cURL are implemented. Uses big words like ‘transport connectors’ and ‘network connectors’ and has big XML configuraton files. Just fail. Don’t even ask me.
beanstalkd Open source C daemon. Fast. Can be persisted by writing events to a binlog. Can be distributed. Still pretty raw. Client libraries for many languages. Little bit slanted towards Rails.
My Homebrew (version 1, PHP) Proprietary PHP library. Pretty fast. Implemented as a memcached linked list. Not even remotely difficult to write. Can scale up pretty well if done with some consideration. Used memcache for locking. I don’t feel comfortable taking PHP out of it’s web role in that way.
My Homebrew (version 2, C) Proprietary C  daemon. Very, very fast. Non-blocking epoll server. C10K and then some. Used mutexes for locking. Highly specialized for the role; not multi-purpose. Difficult to maintain. Difficult to write (properly). Difficult to deploy.
Zend Queue / Zend Job Queue Largely a collection of adaptors to other message queues, plus a job-based queue system. Why? Existing APIs + at command
Message Formats
Message Formats You need something other than XML and JSON because…?
Oh, and btw. In case you forgot…
Shameless Plug Hi, my name is Marcel Esser. I work for CROSCON. We do:  Bespoke application development Customized service monitoring MyCourt productivity software Info? marcel.esser@croscon.com 202.730.9728

More Related Content

What's hot

Making Symfony Services async with RabbitMq (and more Symfony)
Making Symfony Services async with RabbitMq (and more Symfony)Making Symfony Services async with RabbitMq (and more Symfony)
Making Symfony Services async with RabbitMq (and more Symfony)
Gaetano Giunta
 
Alex carcea, radu macovei a story of how java script joined the big league
Alex carcea, radu macovei   a story of how java script joined the big leagueAlex carcea, radu macovei   a story of how java script joined the big league
Alex carcea, radu macovei a story of how java script joined the big league
Codecamp Romania
 
Lindsay distributed geventzmq
Lindsay distributed geventzmqLindsay distributed geventzmq
Lindsay distributed geventzmq
Robin Xiao
 
Cowboy rabbit-websockets
Cowboy rabbit-websocketsCowboy rabbit-websockets
Cowboy rabbit-websockets
Wade Mealing
 
Creating a WebSocket-Chat-Application with Jetty Embedded - Techcamp 2014
Creating a WebSocket-Chat-Application with Jetty Embedded - Techcamp 2014Creating a WebSocket-Chat-Application with Jetty Embedded - Techcamp 2014
Creating a WebSocket-Chat-Application with Jetty Embedded - Techcamp 2014
Minh Nguyen Vo Cao
 

What's hot (17)

Developing high-performance network servers in Lisp
Developing high-performance network servers in LispDeveloping high-performance network servers in Lisp
Developing high-performance network servers in Lisp
 
Building Desktop RIAs with JavaScript and PHP - ZendCon09
Building Desktop RIAs with JavaScript and PHP - ZendCon09Building Desktop RIAs with JavaScript and PHP - ZendCon09
Building Desktop RIAs with JavaScript and PHP - ZendCon09
 
Asynchronous web-development with Python
Asynchronous web-development with PythonAsynchronous web-development with Python
Asynchronous web-development with Python
 
Rabbits, indians and... Symfony meets queueing brokers
Rabbits, indians and...  Symfony meets queueing brokersRabbits, indians and...  Symfony meets queueing brokers
Rabbits, indians and... Symfony meets queueing brokers
 
Making Symfony Services async with RabbitMq (and more Symfony)
Making Symfony Services async with RabbitMq (and more Symfony)Making Symfony Services async with RabbitMq (and more Symfony)
Making Symfony Services async with RabbitMq (and more Symfony)
 
Dlsecyx pgroammr (Dyslexic Programmer - cool stuff for scaling)
Dlsecyx pgroammr (Dyslexic Programmer - cool stuff for scaling)Dlsecyx pgroammr (Dyslexic Programmer - cool stuff for scaling)
Dlsecyx pgroammr (Dyslexic Programmer - cool stuff for scaling)
 
Groovy with Mule
Groovy with MuleGroovy with Mule
Groovy with Mule
 
Alex carcea, radu macovei a story of how java script joined the big league
Alex carcea, radu macovei   a story of how java script joined the big leagueAlex carcea, radu macovei   a story of how java script joined the big league
Alex carcea, radu macovei a story of how java script joined the big league
 
Websocket 101 in Python
Websocket 101 in PythonWebsocket 101 in Python
Websocket 101 in Python
 
Lindsay distributed geventzmq
Lindsay distributed geventzmqLindsay distributed geventzmq
Lindsay distributed geventzmq
 
Cowboy rabbit-websockets
Cowboy rabbit-websocketsCowboy rabbit-websockets
Cowboy rabbit-websockets
 
Zero mq logs
Zero mq logsZero mq logs
Zero mq logs
 
Asynchronous web-development with Python
Asynchronous web-development with PythonAsynchronous web-development with Python
Asynchronous web-development with Python
 
Marcelo Camargo - Let's dive into Babel: how everything works
Marcelo Camargo - Let's dive into Babel: how everything worksMarcelo Camargo - Let's dive into Babel: how everything works
Marcelo Camargo - Let's dive into Babel: how everything works
 
Simple groovy example in mule
Simple groovy example in muleSimple groovy example in mule
Simple groovy example in mule
 
Creating a WebSocket-Chat-Application with Jetty Embedded - Techcamp 2014
Creating a WebSocket-Chat-Application with Jetty Embedded - Techcamp 2014Creating a WebSocket-Chat-Application with Jetty Embedded - Techcamp 2014
Creating a WebSocket-Chat-Application with Jetty Embedded - Techcamp 2014
 
Groovy in Mule
Groovy in MuleGroovy in Mule
Groovy in Mule
 

Similar to Message Queues & Offline Processing with PHP

node.js, javascript and the future
node.js, javascript and the futurenode.js, javascript and the future
node.js, javascript and the future
Jeff Miccolis
 
The Art of Message Queues - TEKX
The Art of Message Queues - TEKXThe Art of Message Queues - TEKX
The Art of Message Queues - TEKX
Mike Willbanks
 
Search Lucene
Search LuceneSearch Lucene
Search Lucene
Jeremy Coates
 
Scalable Architecture 101
Scalable Architecture 101Scalable Architecture 101
Scalable Architecture 101
Mike Willbanks
 
NoSQL afternoon in Japan Kumofs & MessagePack
NoSQL afternoon in Japan Kumofs & MessagePackNoSQL afternoon in Japan Kumofs & MessagePack
NoSQL afternoon in Japan Kumofs & MessagePack
Sadayuki Furuhashi
 
NoSQL afternoon in Japan kumofs & MessagePack
NoSQL afternoon in Japan kumofs & MessagePackNoSQL afternoon in Japan kumofs & MessagePack
NoSQL afternoon in Japan kumofs & MessagePack
Sadayuki Furuhashi
 
PHP from the point of view of a webhoster
PHP from the point of view of a webhosterPHP from the point of view of a webhoster
PHP from the point of view of a webhoster
Dominic Lüchinger
 
Taking the hippie bus to the enterprise
Taking the hippie bus to the enterpriseTaking the hippie bus to the enterprise
Taking the hippie bus to the enterprise
Mogens Heller Grabe
 
The 1990s Called. They Want Their Code Back.
The 1990s Called. They Want Their Code Back.The 1990s Called. They Want Their Code Back.
The 1990s Called. They Want Their Code Back.
Jonathan Oliver
 

Similar to Message Queues & Offline Processing with PHP (20)

Real-Time with Flowdock
Real-Time with FlowdockReal-Time with Flowdock
Real-Time with Flowdock
 
node.js, javascript and the future
node.js, javascript and the futurenode.js, javascript and the future
node.js, javascript and the future
 
TorqueBox at GNUnify 2012
TorqueBox at GNUnify 2012TorqueBox at GNUnify 2012
TorqueBox at GNUnify 2012
 
The Art of Message Queues - TEKX
The Art of Message Queues - TEKXThe Art of Message Queues - TEKX
The Art of Message Queues - TEKX
 
TorqueBox: The beauty of Ruby with the power of JBoss. Presented at Devnexus...
TorqueBox: The beauty of Ruby with the power of JBoss.  Presented at Devnexus...TorqueBox: The beauty of Ruby with the power of JBoss.  Presented at Devnexus...
TorqueBox: The beauty of Ruby with the power of JBoss. Presented at Devnexus...
 
Search Lucene
Search LuceneSearch Lucene
Search Lucene
 
TorqueBox at DC:JBUG - November 2011
TorqueBox at DC:JBUG - November 2011TorqueBox at DC:JBUG - November 2011
TorqueBox at DC:JBUG - November 2011
 
Making it fast: Zotonic & Performance
Making it fast: Zotonic & PerformanceMaking it fast: Zotonic & Performance
Making it fast: Zotonic & Performance
 
"Scala in Goozy", Alexey Zlobin
"Scala in Goozy", Alexey Zlobin "Scala in Goozy", Alexey Zlobin
"Scala in Goozy", Alexey Zlobin
 
Scalable Architecture 101
Scalable Architecture 101Scalable Architecture 101
Scalable Architecture 101
 
NoSQL afternoon in Japan Kumofs & MessagePack
NoSQL afternoon in Japan Kumofs & MessagePackNoSQL afternoon in Japan Kumofs & MessagePack
NoSQL afternoon in Japan Kumofs & MessagePack
 
NoSQL afternoon in Japan kumofs & MessagePack
NoSQL afternoon in Japan kumofs & MessagePackNoSQL afternoon in Japan kumofs & MessagePack
NoSQL afternoon in Japan kumofs & MessagePack
 
PHP from the point of view of a webhoster
PHP from the point of view of a webhosterPHP from the point of view of a webhoster
PHP from the point of view of a webhoster
 
Web Development with Smalltalk
Web Development with SmalltalkWeb Development with Smalltalk
Web Development with Smalltalk
 
Life in a Queue - Using Message Queue with django
Life in a Queue - Using Message Queue with djangoLife in a Queue - Using Message Queue with django
Life in a Queue - Using Message Queue with django
 
Real World Single Page App - A Knockout Case Study
Real World Single Page App - A Knockout Case StudyReal World Single Page App - A Knockout Case Study
Real World Single Page App - A Knockout Case Study
 
Celery in the Django
Celery in the DjangoCelery in the Django
Celery in the Django
 
Taking the hippie bus to the enterprise
Taking the hippie bus to the enterpriseTaking the hippie bus to the enterprise
Taking the hippie bus to the enterprise
 
The 1990s Called. They Want Their Code Back.
The 1990s Called. They Want Their Code Back.The 1990s Called. They Want Their Code Back.
The 1990s Called. They Want Their Code Back.
 
stigbot_beta
stigbot_betastigbot_beta
stigbot_beta
 

Recently uploaded

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 

Recently uploaded (20)

Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 

Message Queues & Offline Processing with PHP

  • 1. UNCON Message Queues &Offline Processing in PHP ByMarcel Esser Code Samurai, CROSCON Contact +1 202 730 9728 +49 176 785 69729 marcel.esser@croscon.com
  • 2. Offline Processing Explained What is offline processing? Short answer: Running things in the background. Long answer: Offline processing is the act of queuing, prioritizing, dispatching, and executing jobs described by a message packet, received from some initiating process. Practical answer: Do the heavy stuff in a worker thread.
  • 3. Offline Processing Explained Now Later Web Request Dispatcher Message ApplicationData Store Message Dispatcher Worker
  • 4. Offline Processing Explained Now Later Web Request Dispatcher Message ApplicationData Store Message Dispatcher Worker
  • 6. Amazon SQS Proprietary Web Service. 0.01USD/10,000.00 msgs + bw. Dead simple. Handles all locking. Messages up to 8kb in size. Messages expire after 4 days. Many permissions options. Automatically distributed. Runs on a 3rd party. 5 functions (CreateQueue, SendMessage, ReceiveMessage, ChangeMessageVisibility, and DeleteMessage) SOAP or RESTful.
  • 7. gearman Open source C daemon. Socket-based client libraries in several languages. PHP client library is nice and clean. Can be configured for redundancy. Fast. No Persistence. Now with minty-fresh persistence.
  • 8. dropr Open source PHP daemon. “trunk in production” Separate client and poll services. De-centralized PHP-centric Storage and transport are modular. FS and cURL are implemented.
  • 9. Apache ActiveMQ Open source Java daemon. Big. Fairly Java-centric. De-centralized PHP-centric Storage and transport are modular. FS and cURL are implemented. Uses big words like ‘transport connectors’ and ‘network connectors’ and has big XML configuraton files. Just fail. Don’t even ask me.
  • 10. beanstalkd Open source C daemon. Fast. Can be persisted by writing events to a binlog. Can be distributed. Still pretty raw. Client libraries for many languages. Little bit slanted towards Rails.
  • 11. My Homebrew (version 1, PHP) Proprietary PHP library. Pretty fast. Implemented as a memcached linked list. Not even remotely difficult to write. Can scale up pretty well if done with some consideration. Used memcache for locking. I don’t feel comfortable taking PHP out of it’s web role in that way.
  • 12. My Homebrew (version 2, C) Proprietary C daemon. Very, very fast. Non-blocking epoll server. C10K and then some. Used mutexes for locking. Highly specialized for the role; not multi-purpose. Difficult to maintain. Difficult to write (properly). Difficult to deploy.
  • 13. Zend Queue / Zend Job Queue Largely a collection of adaptors to other message queues, plus a job-based queue system. Why? Existing APIs + at command
  • 15. Message Formats You need something other than XML and JSON because…?
  • 16. Oh, and btw. In case you forgot…
  • 17. Shameless Plug Hi, my name is Marcel Esser. I work for CROSCON. We do: Bespoke application development Customized service monitoring MyCourt productivity software Info? marcel.esser@croscon.com 202.730.9728