From dev-return-16372-apmail-synapse-dev-archive=synapse.apache.org@synapse.apache.org Tue Aug 20 13:26:32 2013 Return-Path: X-Original-To: apmail-synapse-dev-archive@www.apache.org Delivered-To: apmail-synapse-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 1B098102C4 for ; Tue, 20 Aug 2013 13:26:32 +0000 (UTC) Received: (qmail 69602 invoked by uid 500); 20 Aug 2013 13:26:32 -0000 Delivered-To: apmail-synapse-dev-archive@synapse.apache.org Received: (qmail 69372 invoked by uid 500); 20 Aug 2013 13:26:31 -0000 Mailing-List: contact dev-help@synapse.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@synapse.apache.org Delivered-To: mailing list dev@synapse.apache.org Received: (qmail 69365 invoked by uid 99); 20 Aug 2013 13:26:30 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 20 Aug 2013 13:26:30 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of isudana@gmail.com designates 74.125.82.169 as permitted sender) Received: from [74.125.82.169] (HELO mail-we0-f169.google.com) (74.125.82.169) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 20 Aug 2013 13:26:24 +0000 Received: by mail-we0-f169.google.com with SMTP id t61so397057wes.28 for ; Tue, 20 Aug 2013 06:26:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=sP2j/WeIw5L6twQjIFOe3k0H5ue+Li5A1J2f4SM5g/s=; b=D1x+HP+CMrcS2ahY7Fr2EEXuHt3fAQy37HRpFpO1ORs0wfPYpNa9xjzod9auP/V9UQ SdVkxY6TgeWtsokt2P4huFZvn3sb/Bd7nZ90Dk8Cge6/Qt0K6A5pvizu4nUOmTlaPlqA 491c9aR8bi3NOg5ZaAQ/lwBMso81CEELgK7IH0cL0EDD/QSYrMsrZ3Id7rv+sZmjfU+Y vGBnWXo3eswNsTTeXQ1z15e7oR2a9pytSMxeq3eyjyF6Rh+wS+Oxmm5aWy8cofLLmy2M FnQVj9BkmttMTCTbJvsrhKmKcrHJRdvDXoXuz+zmfM5AkM5fgmhhOaNBXJGf14VAj6C+ GfcA== X-Received: by 10.194.93.135 with SMTP id cu7mr72114wjb.73.1377005164662; Tue, 20 Aug 2013 06:26:04 -0700 (PDT) MIME-Version: 1.0 Received: by 10.217.39.201 with HTTP; Tue, 20 Aug 2013 06:25:44 -0700 (PDT) In-Reply-To: References: <81005816-C52C-4B39-98F4-E3542CE17B4D@gmail.com> From: Isuru Udana Date: Tue, 20 Aug 2013 18:55:44 +0530 Message-ID: Subject: Re: New Blocking Sender implementation To: dev@synapse.apache.org Content-Type: multipart/alternative; boundary=047d7bb03eb6b1a2b204e460ff37 X-Virus-Checked: Checked by ClamAV on apache.org --047d7bb03eb6b1a2b204e460ff37 Content-Type: text/plain; charset=ISO-8859-1 Hi Hiranya, I have attach a patch to [1] with suggested modifications. A sample and an integration test is also attached to [2]. [1] https://issues.apache.org/jira/browse/SYNAPSE-969 [2] https://issues.apache.org/jira/browse/SYNAPSE-970 Thanks. On Tue, Aug 20, 2013 at 8:14 AM, Isuru Udana wrote: > > > > On Tue, Aug 20, 2013 at 12:13 AM, Hiranya Jayathilaka < > hiranya911@gmail.com> wrote: > >> And one more thing. >> >> I noticed that when the callout mediator is configured with an >> endpointKey, the key is resolved only once (at the first message). Try to >> make it so that the mediator will resolve the key on each message. That way >> the callout mediator can take advantage of the underlying caching + dynamic >> endpoint update system. >> > I will do this modification along with the inline endpoint support. > > Thanks. > >> >> Thanks, >> Hiranya >> >> On Aug 19, 2013, at 8:21 AM, Isuru Udana wrote: >> >> Hi Udayanga, >> >> On Mon, Aug 19, 2013 at 7:01 PM, Udayanga Wickramasinghe < >> mastershield2007@gmail.com> wrote: >> >>> >>> >>> >>> On Sun, Aug 18, 2013 at 9:58 AM, Isuru Udana wrote: >>> >>>> Hi All, >>>> >>>> Currently we have following two main places we use a blocking client to >>>> invoke services. >>>> 1. Callout Mediator >>>> 2. Forwarding Message Processor >>>> >>>> Both these components use the axis2 service client to invoke services >>>> in a blocking manner. >>>> Since the implementation is very simple, provided functionality is very >>>> limited. >>>> >>>> Currently we have following major limitations. >>>> >>>> * Supports only SOAP >>>> * Message format conversion is not supported >>>> * QOS functionality (WS-Security, etc.) are not supported >>>> * Cannot specify an endpoint as the service endpoint reference (In >>>> message processors we can specify an Address endpoint. But none of the >>>> other endpoint types and other endpoint functionality is supported) >>>> >>>> I have implemented a new blocking client which can be used as a common >>>> blocking sender for both above components. >>>> This new implementation will provide the following functionality. >>>> >>>> * Support all leaf endpoint types >>>> * Support for REST >>>> * Support Endpoint functionality. >>>> - Endpoint format conversions (soap11,soap12,pox, etc.) >>>> - WS-Security, WS-A >>>> - Endpoint Timeout (nhttp transport specific functionality is not >>>> supported) >>>> * message format conversions (ability to use messageType/ContentType >>>> properties) >>>> >>>> I have attached this implementation as patch to SYNAPSE-966 [1]. >>>> I have also attached a patch[2] to migrate the Callout mediator to this >>>> implementation. >>>> A sample with documentation and an integration test is also attached at >>>> [3]. >>>> >>> >>> +1 >>> This would be a great addition. I think synapse library support for a >>> blocking client would also be a good idea. Specially because many users >>> tend to create complex workflows with Synapse using either service chaining >>> ,etc without any obvious high performance requirement (leveraging >>> asynchronous non blocking capability of Synapse). I think a synapse library >>> would provide a high level abstraction as well as portability for easily >>> creating such workflows. >>> >> >> I think those service chaining workflows can be simplified by introducing >> a Callout like behavior for the send mediator. >> It will make the service chaining scenarios much simpler and we will able >> to leverage asynchronous non blocking transports as well. >> I have already done significant amount of work on implementing this >> feature. >> If I get enough time to test the implementation completely before this >> release, I will provide a patch to review. >> >> Thanks. >> >>> >>>> If others interested, I can provide patches to migrate Message >>>> processor to this implementation and more samples. >>>> >>>> [1] https://issues.apache.org/jira/browse/SYNAPSE-966 >>>> [2] https://issues.apache.org/jira/browse/SYNAPSE-967 >>>> [3] https://issues.apache.org/jira/browse/SYNAPSE-968 >>>> >>>> Thanks. >>>> Isuru >>>> >>>> -- >>>> *Isuru Udana* >>>> * >>>> * >>>> * >>>> Senior >>>> ** >>>> Software Engineer; WSO2 Inc.; http://wso2.com >>>> >>>> email: isudana@gmail.com >>>> blog: http://mytecheye.blogspot.com/ >>>> twitter: http://twitter.com/isudana >>>> * >>>> >>>> >>>> >>>> >>> >>> >>> -- >>> http://www.udayangawiki.blogspot.com >>> >> >> >> >> -- >> *Isuru Udana* >> * >> * >> * >> Senior >> **Software Engineer; WSO2 Inc.; http://wso2.com >> >> email: isudana@gmail.com >> blog: http://mytecheye.blogspot.com/ >> twitter: http://twitter.com/isudana >> * >> >> >> >> >> -- >> Hiranya Jayathilaka >> Mayhem Lab/RACE Lab; >> Dept. of Computer Science, UCSB; http://cs.ucsb.edu >> E-mail: hiranya@cs.ucsb.edu ; Mobile: +1 (805) >> 895-7443 >> Blog: http://techfeast-hiranya.**blogspot.com >> >> > > > -- > *Isuru Udana* > * > * > * > Senior > ** > Software Engineer; WSO2 Inc.; http://wso2.com > > email: isudana@gmail.com > blog: http://mytecheye.blogspot.com/ > twitter: http://twitter.com/isudana > * > > > > -- *Isuru Udana* * * * Senior ** Software Engineer; WSO2 Inc.; http://wso2.com email: isudana@gmail.com blog: http://mytecheye.blogspot.com/ twitter: http://twitter.com/isudana * --047d7bb03eb6b1a2b204e460ff37 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Hi Hiranya,

I have attach a patch= to [1] with suggested modifications. A sample and an integration test is a= lso attached to [2].


Thanks.



On Tue, Aug 20, 2013 at 8:14 AM, Isuru U= dana <isudana@gmail.com> wrote:



On Tue, Aug 20, 2013 at 12:13 AM, Hiranya Jayathi= laka <hiranya911@gmail.com> wrote:
And one = more thing.=A0

I noticed that when the callout mediator = is configured with an endpointKey, the key is resolved only once (at the fi= rst message). Try to make it so that the mediator will resolve the key on e= ach message. That way the callout mediator can take advantage of the underl= ying caching + dynamic endpoint update system.
I will do this modification along with the in= line endpoint support.

Thanks.=A0

Thanks,
<= div>Hiranya
=A0
On Aug 19, 2013, at 8:21 A= M, Isuru Udana <i= sudana@gmail.com> wrote:

Hi Udayanga,

On Mon, Aug 19, 2013 at 7:0= 1 PM, Udayanga Wickramasinghe <mastershield2007@gmail.com>= wrote:



On Sun, Aug 18, 2013 at 9:58 AM, Isuru Udana <isudana@gmail.com&g= t; wrote:
Hi All,

Cur= rently we have following two main places we use a blocking client to invoke= services.=A0
1. Callout Mediator=A0
2. Forwarding Message Processor=A0

Both these components use the axis2 service client to i= nvoke services in a blocking manner.=A0
Since the implementation = is very simple, provided functionality is very limited.=A0

Currently we have following major limitations.=A0

=
* Supports only SOAP=A0
* Message format conversion is not s= upported=A0
* QOS functionality (WS-Security, etc.) are not suppo= rted=A0
* Cannot specify an endpoint as the service endpoint reference (In mes= sage processors we can specify an Address endpoint. But none of the other e= ndpoint types and other endpoint functionality is supported)=A0

I have implemented a new blocking client which can be used a= s a common blocking sender for both above components.=A0
This new= implementation will provide the following functionality.=A0

* Support all leaf endpoint types=A0
* Support for RES= T=A0
* Support Endpoint functionality.=A0
=A0 =A0 =A0 -= Endpoint format conversions (soap11,soap12,pox, etc.)=A0
=A0 =A0= =A0 - WS-Security, WS-A=A0
=A0 =A0 =A0 - Endpoint Timeout (nhttp transport specific functionality= is not supported)=A0
* message format conversions (ability to us= e messageType/ContentType properties)=A0

I have at= tached this implementation as patch to SYNAPSE-966 [1].
I have also attached a patch[2] to migrate the Callout mediator to thi= s implementation.
A sample with documentation and an integration = test is also attached at [3].

+1=A0
This would be a great addition. I think synapse library sup= port for a blocking client would also be a good idea. Specially because man= y users tend to create complex workflows with Synapse using either service = chaining ,etc without any obvious high performance requirement (leveraging = asynchronous non blocking capability of Synapse). I think a synapse library= would provide a high level abstraction as well as portability for easily c= reating such workflows.=A0

I think those service=A0= chaining=A0workflows can be simplified by introducing a Callout like=A0beha= vior=A0for the send mediator.
It will make the service=A0chai= ning=A0scenarios much simpler and we will able to leverage asynchronous non= blocking=A0transports as well.
I have already done significant amount of work on implementing this fe= ature.=A0
If I get enough time to test the implementation com= pletely before this release, I will provide a patch to review.=A0

Thanks.

If others interested,= I can provide patches to migrate Message processor to this=A0implementatio= n=A0and more samples.


Thanks. =A0 =A0 =A0 = =A0
Isuru

--
Isuru Udana
Senior=A0






--
http://www.udayangawiki.blogspot.com



--
Isuru Udana
Senior=A0
S= oftware Engineer; WSO2 Inc.; http://wso2.com

email: isudana@g= mail.com
blog: http://mytecheye.blogspot.com/
twitter: http://twitter.com/isudana
=





--
Hiranya Jayathilaka
Mayhem Lab/RACE Lab;=
Dept. of Computer Science, UCSB;=A0=A0http://cs.ucsb.edu
E-mail:=A0hiranya@cs.ucsb.edu;=A0 Mobile:=A0+1 (805)= 895-7443
Blog:=A0http://techfeast-hiranya.blogspot.com




--
Isuru Udana
Senior=A0






--
Isuru Udana
Senior=A0



--047d7bb03eb6b1a2b204e460ff37--