On Thursday, 6 December 2012 02:05:25 UTC, Keith Rarick wrote: > > On Wed, Dec 5, 2012 at 5:58 PM, Jason Judge > <[email protected]<javascript:>> > wrote: > > That surprises me. Maybe this is an edge case, but I could imagine that > some > > jobs need to be processed in order, by a single worker that handles one > job > > at a time. Other jobs can be handled in parallel with a big bunch of > workers > > waiting to process jobs as quickly as they arrive. This seems like two > > separate tubes to me - one with a single worker and one with a load of > > workers standing by. > > Yes, that would be an example of having different types of workers > with fundamentally different capabilities. > > However, I'd advise you not to rely on having a single, serial worker > process for jobs that require mutual exclusion. It's more reliable to > coordinate things like that separately, through a database or locking > service, and to express reify dependencies so they can be checked > explicitly. This also gives you the freedom to run however many > workers makes sense and possibly get more parallelism. >
Thanks, I'll consider that. I've not found a good way to create locks in PHP yet, but that's another adventure to explore. The bottom line, then, is to get stuff through the pipes as quickly as possible, pulling them from the pipes with a single worker (if possible) and handle the back end processing and parallelism and locking through that worker. -- 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/-/fW45XZ5_5-wJ. 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.
