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

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Recently uploaded (20)

ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
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...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 

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