Hey,
I have a bunch of pipelines (think pipes & filters) that take an individual message from an AMQP queue, transform it throughout several steps (filters) and eventually publish to a different queue. Most of the steps are computational but some are responsible for getting further data (from services, databases other I/O) to mutate/supplement the message.
I'm trying to determine how best to leverage celluloid and allow execution of the filters in parallel. I hacked together something with notifications whereby the pipeline was responsible for wiring up its filters to subscribe to events published in the filter prior once its work was complete. This worked but didn't feel particularly smart and could get quite complex as the number of filters increases. It felt as though I was abusing the celluloid notifiers mechanics somehow.
What is the best approach to orchestrating pipelines as groups of filters and queuing their input and output messages? My guess is that a filter is an actor and the pipeline a supervisor but I'm struggling to understand the mechanics of passing the messages around and the techniques to direct messages on to the next logical step in the pipeline.
Of course, I could just look at the pipeline as a single unit of work and pool at that level but I feel that is a missed opportunity.
Any suggestions would be gratefully received.
Thanks,
Ben