Hi Marc,

thanks for your remarks about the documentation. Any help/feedback is
welcome. There is no clear solution... We cannot take architectural
decisions for all the readers... Users know better than me how to walk
their last mile.


1) block participant

engine.register_participant :process_file do |workitem|
  Lib.process_file(workitem.attributes[:filepath])
end

+ simple
- what if it fails ? (stalled expression issue)
- may slow down the whole engine


2) via a 'worklist'

engine fires workitem to database (see ar_participant), where it's
picked by another process with does the process_file. When done, the
other process removes the workitem from the db and pings back the
engine (HTTP, file or socket listener, ...)

+ separates engine from agent
+/- many agents may read db, have to arbitrate which one picks the workitem
- requires setting up and maintaining db

  
http://github.com/jmettraux/ruote/blob/master/lib/openwfe/extras/participants/ar_participants.rb
  
http://github.com/jmettraux/ruote/blob/master/lib/openwfe/listeners/listeners.rb


3) via XMPP, AMQP or SQS (queue)

engine and other process communicate via a queue.

+ separates engine from agent
+ many agents may read the queue
- requires setting up and maintaining queue

  
http://github.com/jmettraux/ruote/blob/master/lib/openwfe/extras/participants/jabber_participants.rb
  
http://github.com/jmettraux/ruote/blob/master/lib/openwfe/extras/participants/sqs_participants.rb

  
http://github.com/jmettraux/ruote/blob/master/lib/openwfe/extras/listeners/jabber_listeners.rb
  
http://github.com/jmettraux/ruote/blob/master/lib/openwfe/extras/listeners/sqs_listeners.rb


4) web service

+ separates engine from agent
+ other application may use agent
- maybe have to secure agent

engine posts job to agent via HTTP, agent replies via HTTP when job is done.

I wouldn't go with 1. Block participants are meant for simple,
one-shot participants. Having a separate agent/process or set of
processes.

I would go with one solution and then after a while refine it. It's
just ruby code in the end, easy to throw away / rewrite and so on.


I've just seen Kenneth's reply, it's excellent. Thanks Kenneth ! Maybe
this requirement of Marc needs to be considered as a single step in
some bigger "business process" and the details of it abstracted away
from the engine.


Best regards,

-- 
John Mettraux   -   http://jmettraux.wordpress.com

--~--~---------~--~----~------------~-------~--~----~
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