synapse-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ruwan Linton <ruwan.lin...@gmail.com>
Subject Re: Shall we make the iteration run in a single thread?
Date Sun, 19 Sep 2010 09:25:32 GMT
So, I was thinking on the general iteration semantics, but I guess it is OK
to keep it act asynchronously by default. Back ward compatibility is a fair
point. I too am OK with the attribute name, but I remember there is some
attribute in some place in the configuration for the same purpose with the
name "asynchronous" and that is why I proposed it, just to be consistent.

Ruwan

On Sun, Sep 19, 2010 at 12:43 AM, Hiranya Jayathilaka
<hiranya911@gmail.com>wrote:

> On Sat, Sep 18, 2010 at 10:16 PM, Supun Kamburugamuva <supun06@gmail.com>
> wrote:
> > I still like the name "sequential" more because it is a word
> understandable
> > by the common user.
>
> Looking at the original problem (iterate mediator) I too prefer the
> word 'sequential'. It is really a matter of executing iterator targets
> sequentially or not. But 'asynchronous' is ok too.
>
> Thanks,
> Hiranya
>
> But I'm ok with asynchronous as well.
> > Thanks,
> > Supun..
> >
> > On Sat, Sep 18, 2010 at 9:59 PM, Hiranya Jayathilaka <
> hiranya911@gmail.com>
> > wrote:
> >>
> >> On Sat, Sep 18, 2010 at 9:32 PM, Supun Kamburugamuva <supun06@gmail.com
> >
> >> wrote:
> >> > On Sat, Sep 18, 2010 at 2:20 PM, Ruwan Linton <ruwan.linton@gmail.com
> >
> >> > wrote:
> >> >>
> >> >> Sorry for being late, but I think the right attribute should be
> >> >> asynchronous and by default it is false, meaning that the iterator
is
> >> >> sequential by default which is the general case I guess, and let the
> >> >> user
> >> >> specify if he can execute in parallel.
> >>
> >> +1 for the attribute name but why do you think we should change the
> >> default behavior? IMO most of the time users will want message
> >> fragments to be processed in parallel. Most practical scenarios are
> >> like that, isn't it? A message contains one or more similar elements
> >> that needs to be broken up and processed in parallel.
> >>
> >> Thanks,
> >> Hiranya
> >>
> >> >
> >> >
> >> > If we use the send mediator with a sequence iteration there is no
> >> > guarantee
> >> > of sequential operation. Sequence operation is guaranteed only if a
> >> > callout
> >> > mediator is used. So it is an edge case.
> >> > Also we need to think about the backward compatibility. Those were the
> >> > two
> >> > motivation factors behind the attribute name and default value.
> >> > Thanks,
> >> > Supun..
> >> >
> >> >>
> >> >> Ruwan
> >> >>
> >> >> On Thu, Sep 16, 2010 at 9:22 AM, Supun Kamburugamuva
> >> >> <supun06@gmail.com>
> >> >> wrote:
> >> >>>
> >> >>> I have done this as
> >> >>> <iterate>
> >> >>>      <target sequential="true|false">
> >> >>> </iterate>
> >> >>> By default sequential is false.
> >> >>> Thanks,
> >> >>> Supun..
> >> >>> On Thu, Sep 16, 2010 at 9:19 AM, Hiranya Jayathilaka
> >> >>> <hiranya911@gmail.com> wrote:
> >> >>>>
> >> >>>> On Thu, Sep 16, 2010 at 9:14 AM, Supun Kamburugamuva
> >> >>>> <supun06@gmail.com>
> >> >>>> wrote:
> >> >>>> >
> >> >>>> >
> >> >>>> > On Wed, Sep 15, 2010 at 7:00 PM, Hiranya Jayathilaka
> >> >>>> > <hiranya911@gmail.com>
> >> >>>> > wrote:
> >> >>>> >>
> >> >>>> >> On Wed, Sep 15, 2010 at 6:51 PM, Supun Kamburugamuva
> >> >>>> >> <supun06@gmail.com>
> >> >>>> >> wrote:
> >> >>>> >> > Right now synapse iterate mediator create a new
thread for
> each
> >> >>>> >> > iteration.
> >> >>>> >> > Shall we make it possible to iterate without
creating
> >> >>>> >> > a separate thread?
> >> >>>> >> > For example lets say we want to iterate over
a message and do
> >> >>>> >> > several
> >> >>>> >> > calls.
> >> >>>> >> > But these calls have to be done in order. In
this case this
> will
> >> >>>> >> > be
> >> >>>> >> > useful.
> >> >>>> >>
> >> >>>> >> I'm +1 for this. While implementing certain scenarios
I have
> felt
> >> >>>> >> the
> >> >>>> >> requirement of this feature. But it must be implemented
as an
> >> >>>> >> optional
> >> >>>> >> mode of operation (say sequential mode) of the mediator.
By
> >> >>>> >> default
> >> >>>> >> the iterate mediator should use multiple threads to
process
> >> >>>> >> message
> >> >>>> >> fragments as it does now.
> >> >>>> >
> >> >>>> > +1, this was the exact idea in my mind as well.
> >> >>>> > How about saying <iterate sequential="true"/>?
> >> >>>>
> >> >>>> +1
> >> >>>>
> >> >>>> Thanks,
> >> >>>> Hiranya
> >> >>>>
> >> >>>> > Thanks,
> >> >>>> > Supun..
> >> >>>> >>
> >> >>>> >> eg:
> >> >>>> >>
> >> >>>> >> <iterate ..... sequentialMode="true">
> >> >>>> >> ....
> >> >>>> >> </iterate>
> >> >>>> >>
> >> >>>> >> By default the sequential mode should be turned off.
> >> >>>> >>
> >> >>>> >> Thanks,
> >> >>>> >> Hiranya
> >> >>>> >>
> >> >>>> >> >
> >> >>>> >> > Thanks,
> >> >>>> >> > Supun..
> >> >>>> >> >
> >> >>>> >> > --
> >> >>>> >> > Tech Lead, WSO2 Inc
> >> >>>> >> > http://wso2.org
> >> >>>> >> > supunk.blogspot.com
> >> >>>> >> >
> >> >>>> >> >
> >> >>>> >> >
> >> >>>> >>
> >> >>>> >>
> >> >>>> >>
> >> >>>> >> --
> >> >>>> >> Hiranya Jayathilaka
> >> >>>> >> Senior Software Engineer;
> >> >>>> >> WSO2 Inc.;  http://wso2.org
> >> >>>> >> E-mail: hiranya@wso2.com;  Mobile: +94 77 633 3491
> >> >>>> >> Blog: http://techfeast-hiranya.blogspot.com
> >> >>>> >>
> >> >>>> >>
> >> >>>> >>
> ---------------------------------------------------------------------
> >> >>>> >> To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
> >> >>>> >> For additional commands, e-mail: dev-help@synapse.apache.org
> >> >>>> >>
> >> >>>> >
> >> >>>> >
> >> >>>> >
> >> >>>> > --
> >> >>>> > Tech Lead, WSO2 Inc
> >> >>>> > http://wso2.org
> >> >>>> > supunk.blogspot.com
> >> >>>> >
> >> >>>> >
> >> >>>> >
> >> >>>>
> >> >>>>
> >> >>>>
> >> >>>> --
> >> >>>> Hiranya Jayathilaka
> >> >>>> Senior Software Engineer;
> >> >>>> WSO2 Inc.;  http://wso2.org
> >> >>>> E-mail: hiranya@wso2.com;  Mobile: +94 77 633 3491
> >> >>>> Blog: http://techfeast-hiranya.blogspot.com
> >> >>>>
> >> >>>>
> ---------------------------------------------------------------------
> >> >>>> To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
> >> >>>> For additional commands, e-mail: dev-help@synapse.apache.org
> >> >>>>
> >> >>>
> >> >>>
> >> >>>
> >> >>> --
> >> >>> Tech Lead, WSO2 Inc
> >> >>> http://wso2.org
> >> >>> supunk.blogspot.com
> >> >>>
> >> >>>
> >> >>
> >> >>
> >> >>
> >> >> --
> >> >> Ruwan Linton
> >> >> Software Architect & Product Manager, WSO2 ESB; http://wso2.org/esb
> >> >> WSO2 Inc.; http://wso2.org
> >> >>
> >> >> Lean . Enterprise . Middleware
> >> >>
> >> >> phone: +1 408 754 7388 ext 51789
> >> >> email: ruwan@wso2.com; cell: +94 77 341 3097
> >> >> blog: http://blog.ruwan.org
> >> >> linkedin: http://www.linkedin.com/in/ruwanlinton
> >> >> google: http://www.google.com/profiles/ruwan.linton
> >> >> tweet: http://twitter.com/ruwanlinton
> >> >
> >> >
> >> >
> >> > --
> >> > Tech Lead, WSO2 Inc
> >> > http://wso2.org
> >> > supunk.blogspot.com
> >> >
> >> >
> >> >
> >>
> >>
> >>
> >> --
> >> Hiranya Jayathilaka
> >> Senior Software Engineer;
> >> WSO2 Inc.;  http://wso2.org
> >> E-mail: hiranya@wso2.com;  Mobile: +94 77 633 3491
> >> Blog: http://techfeast-hiranya.blogspot.com
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
> >> For additional commands, e-mail: dev-help@synapse.apache.org
> >>
> >
> >
> >
> > --
> > Tech Lead, WSO2 Inc
> > http://wso2.org
> > supunk.blogspot.com
> >
> >
> >
>
>
>
> --
> Hiranya Jayathilaka
> Senior Software Engineer;
> WSO2 Inc.;  http://wso2.org
> E-mail: hiranya@wso2.com;  Mobile: +94 77 633 3491
> Blog: http://techfeast-hiranya.blogspot.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
> For additional commands, e-mail: dev-help@synapse.apache.org
>
>


-- 
Ruwan Linton
Software Architect & Product Manager, WSO2 ESB; http://wso2.org/esb
WSO2 Inc.; http://wso2.org

Lean . Enterprise . Middleware

phone: +1 408 754 7388 ext 51789
email: ruwan@wso2.com; cell: +94 77 341 3097
blog: http://blog.ruwan.org
linkedin: http://www.linkedin.com/in/ruwanlinton
google: http://www.google.com/profiles/ruwan.linton
tweet: http://twitter.com/ruwanlinton

Mime
View raw message