Queues And The Giant beanstalkd
This repository contains example code for the talk I gave on Queues and beanstalkd.
The 'simple' folder contains an absolutely bare bones worker architecture to demonstrate scaling with queues.
The 'twitter' folder contains a slightly more fleshed out exmaple of crawling Twitter user tweets.
To run the examples:
- Install beanstalkd & launch
- Install mongodb & launch
mongod(for twitter example only)
php composer.phar installto installd dependencies
- Run n copies of
worker.phpfrom a specificed example (ideally in separate terminal windows)
producer.phpto inject jobs, watch the log outputs from the previous
For the twitter example you will need to copy
keys.json and fill in the values from https://dev.twitter.com/apps