Demystifying beanstalk and the workers
Queueing Theory
Why Do It?
Queue
Web
Application
Workers
DB
Queue ==> beanstalkd
(Technically, it's a priority queue)
Web Application == (abaqis, rqi)
Workers == (abaqis, rqi)
(In our implementation, the worker codebase is exactly the same as the Web Application codebase)
Queue
Web
Application
Workers
beanstalkd
Workers
Queued Jobs (Messages)
Static Style:
Resident.ayl_send(:clear_stay, 3, stay) yields =>
"Resident.clear_stay(3, Stay.find(32))"
Instance Style:
resident.ayl_send(:clear_stay, 3, stay) yields =>
"Resident.find(22).clear_stay(3, Stay.find(32))"
All the worker does is 'eval' the message string.
ayl/ayl_beanstalk
abaqis_daemons
Operations
Local Testing