Yes, with some proper design this can work across distributed systems.  The
tricky part would be identifying which task a newly arriving message should
go to.  Ideally, you don't want the message to carry state information, but
I think that will be unavoidable.  Say the workflow for a particular message
goes through tasks A-1, B-2, A-3 and B-4 (where A and B are different
servers per your example.)  If no state is carried with the message, then
when B sees the message, it won't know whether the message should go to task
2 or task 4.  I think the only state you need is the target task. (or
perhaps the last task completed).  If a message arrives with target task =
null, as it would at A the first time, that is an indication that workflow
has not started yet, so A should process the message at the start of its
workflow.

----- Original Message -----
From: "Dmitri Colebatch" <[EMAIL PROTECTED]>
To: "Guy Rouillier" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Tuesday, October 23, 2001 1:25 AM
Subject: Re: [JBoss-user] MDB dispatcher pattern - opinions




> On Tue, 23 Oct 2001, Guy Rouillier wrote:
>
> > I think the list of tasks and their order should be done external to
both
> > the messages themselves and to the individual tasks, i.e., in a config
file
> > somewhere/somehow.  That way tasks can be added, removed or reordered
> > without changing anything other than the config file.  Makes the
individual
> > tasks and messages more autonomous and therefore easier to write, and
also
> > makes the workflow easier to manage.
>
> so something like the struts workflow
> (http://jakarta.apache.org/struts/proposal-workflow.html)?  yeah, that
> makes sense.  what about if you wanted the message to go from one server
> to another?  for instance, have JBoss instances A & B, A has X and Y on it
> and B has Z.  Now a message is sent to instance A, which then (from the
> config file) creates the list of tasks and sends the message off for the
> first task - X@A.  So instance A gets the message, does task A, finds the
> next task is Y@B and sends it to B... etc..  I know this isn't quite what
> you said (I assume what you mean is that the dispatcher will read the list
> of tasks and then execute each one in a loop fashion), but the (currently
> hypothetical) requirement I have been given (yes, hypothetical && given)
> is that the system needs to be able to be distributed.
>
> thoughts?
>
> cheers
> dim
>


_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to