Hi folks,

I'm trying to fix some bugs we're encountering due to our (ab)use of
notifiers. First, let me say what I understand the state of Ruote's
message subscription model is, to see if I'm understanding it
correctly: Ruote notifiers (ie. added with Engine#add_service('foo',
'notifiers'...)) are only notified of messages that are processed by
the worker in their thread/process. In contrast, a pub/sub
implementation would notify all listeners on the queue, regardless of
the thread/process they're in. Ruote primarily uses the message queue
for performing work, and it assumes that it doesn't matter which
worker processes a message, nor which worker's subscribers are
notified of the message. Is that correct?

This is a problem for us, because we have several worker processes/
threads: some are dedicated worker processes, and some are actually
threads running inside a web service process (Unicorn). We incorrectly
assume that a notifier listening in one of the web service processes
will be notified of every Ruote message. But this is the case only if
the web service's worker happens to be the one that takes the message
off of the queue. If another worker pulls the message off of the
queue, the originating process will have no way of being notified of
the message. The reason we're doing this wackiness is so that we can
interact with the end user based on the Ruote messages--basically give
them confirmation of their work.

I see a two basic ways to work around this: create a notifier that
publishes all Ruote messages to something like AMQP so arbitrary
processes can listen to what's going on "inside" Ruote, thereby
implementing true pub/sub; or find a way to remove the dependency on
pushing the messages to the process that is servicing the end user. Is
there maybe a simpler way I'm overlooking that would use Ruote's built-
in capabilities?

Thanks for any insight you can offer.
-Ian

-- 
you received this message because you are subscribed to the "ruote users" group.
to post : send email to [email protected]
to unsubscribe : send email to [email protected]
more options : http://groups.google.com/group/openwferu-users?hl=en

Reply via email to