ode-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Boisvert <boisv...@intalio.com>
Subject Re: Problem with flow and extension activities
Date Fri, 27 Mar 2009 15:11:25 GMT
How long are your invokes?  Sub-second or greater than a few seconds?  I
suggest you try for yourself with invokes that take more than a few seconds.

I'd be happy to review the evidence that supports your proof. :)

alex


On Fri, Mar 27, 2009 at 8:06 AM, <Daniel.Stucky@empolis.com> wrote:

> Hi Alex,
>
> as far I understand your answer you are saying that the two invokes from my
> example should be executed concurrently.
> My tests however prove that both are executed in sequence.
>
> I've read the Jacob tutorial but found it not really helpful to my problem.
> My use case is really simple:
> I want to call two webservices (or extension activities), each executing a
> search (running few seconds). In order to reduce runtime I want them to be
> called concurrently, so that the runtime is MAX(T1, T2). At the moment the
> runtime is T1+T2.
>
> Has no one else had a similar use case ?
>
> Bye,
> Daniel
>
> > -----Ursprüngliche Nachricht-----
> > Von: Alex Boisvert [mailto:boisvert@intalio.com]
> > Gesendet: Dienstag, 24. März 2009 14:55
> > An: user@ode.apache.org
> > Betreff: Re: Problem with flow and extension activities
> >
> > You may want to go through our Jacob tutorial to understand the
> > concurrency
> > semantics,
> > http://ode.apache.org/jacob.html
> >
> > Essentially, inside the engine all process instances operations are
> > serialized (through Jacob and the instance lock) to avoid concurrency
> > issues.    Activities that may block or take a long time are designed
> > in
> > such a way that they do not block inside the engine, instead they
> > register a
> > channel and use it for callback when the asynchronous response/event
> > occurs.
> >
> > The invoke activity is a good example of that.   Only one invoke will
> > be
> > initiated at once, although multiple invokes can be pending and
> > executed
> > concurrently.   So in effect, the serialization only applies to the
> > engine
> > reaching out to the integration layer and requesting to perform an
> > invoke.    The invokes are handled concurrency by the integration layer
> > in a
> > different thread.
> >
> > In your case, you'd see something like,
> >
> > [Thread 1: operations are serialized]
> > T1 start flow
> > T1 start invoke 1
> > T1 start invoke 2
> > T1 commit
> >
> > [Thread 2 and 3: invokes happen concurrently]
> > T2 perform invoke 2
> > T3 perform invoke 2
> >
> > T2 receives response, updates message exchange
> > T2 enters the engine, obtains instance lock
> > T2 updates instance state
> > T2 commit
> >
> > T3 receives response, updates message exchange
> > T3 enters the engine, obtains instance lock
> > T3 updates instance state
> > T3 if there's something else to do after the flow, do it
> > T3 ... runs until some activity require async response/event
> > T3 commit
> >
> > Hope this helps,
> > alex
> >
> > On Tue, Mar 24, 2009 at 3:43 AM, <Daniel.Stucky@empolis.com> wrote:
> >
> > > Hi all,
> > >
> > > the problem seems not to be related to extension activities only. I
> > did a
> > > test invoking webservices:
> > >
> > >  ...
> > >  <flow>
> > >     <invoke name="sayHi" partnerLink="HelloWorld"
> > >  portType="hw:HelloWorld" operation="sayHi" inputVariable="hi"
> > >         outputVariable="response">
> > >     </invoke>
> > >
> > >     <invoke name="sayHo" partnerLink="HelloWorld"
> > >  portType="hw:HelloWorld" operation="sayHi" inputVariable="ho"
> > >         outputVariable="response2">
> > >     </invoke>
> > >  </flow>
> > >  ...
> > >
> > >  The two invoke elements are executed in random order. However the
> > second
> > > invoke call is not executed until the first invoke returns. It seems
> > that
> > > the same Thread is used to execute the invoke calls. We use the
> > integrated
> > > SimpleScheduler.
> > >
> > >  Anyone any ideas what's going wrong here ?
> > >
> > >  Bye,
> > >  Daniel
> > >
> > >
> > > > -----Ursprüngliche Nachricht-----
> > > > Von: Daniel.Stucky@empolis.com [mailto:Daniel.Stucky@empolis.com]
> > > > Gesendet: Montag, 23. März 2009 18:32
> > > > An: user@ode.apache.org
> > > > Betreff: Problem with flow and extension activities
> > > >
> > > > Hi all,
> > > >
> > > > in the SMILA project we are using extension activities to execute
> > > java
> > > > code in BPEL. This works without any problems.
> > > >
> > > > Now I tried to execute two extension activities concurrently within
> > a
> > > > <flow> (see attachment). The execution still works, but the
> > extension
> > > > activities are not executed concurrently but in sequence. I
> > debugged
> > > > and
> > > > found that the extension activities are executed by the same
> > thread.
> > > >
> > > > We currently use ODE 2.0.
> > > >
> > > > Is there any error on my bpel workflow ? Or is there a ThreadPool
> > > > that's
> > > > size needs to be increased ? Or some other configuration option ?
> > > >
> > > > Thanks for your help!
> > > >
> > > > Bye,
> > > > Daniel
> > >
> > >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message