Taking as a starting point a PHP framework, with multiple types of workers 
(doing different things) all within the framework, what is the general 
approach to structuring the architecture?

I'm assuming a separate pipe for each type of task will be useful (e.g. one 
for emails, one for image processing, one for handling file uploads). What 
about the workers? Does it make sense to have one worker entry point that 
listens on all the pipes and then calls up appropriate methods within the 
framework to handle data appropriate to the pipe it comes from? This is how 
cron is often handled on frameworks: one job gets called every minute, and 
that job decides through the framework what it is subsequently going to 
run. Multiple workers would be running, but they are all identical 
(although some pipes may have more workers listening than other pipes, just 
to keep the data flow up where parallel jobs make sense).

Or:

Are jobs created on a more ad-hoc basis, each with their own entry point, 
each with their own process name in supervisord so they can be managed 
separately?

I can see pros and cons in both methods - the first being easier to manage, 
but with a higher development overhead. The latter being easy to throw new 
workers into the mix, but could easily get out of hand if they grow in 
number and all end up with their own unique ways of logging, error 
handling, etc,

How does it work in general? I realise both approaches are probably 
"correct", but just wondering what people [like to] do and what generally 
works?

-- Jason

-- 
You received this message because you are subscribed to the Google Groups 
"beanstalk-talk" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/beanstalk-talk/-/VEVy59udn90J.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/beanstalk-talk?hl=en.

Reply via email to