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

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Recently uploaded (20)

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 

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