You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@synapse.apache.org by Malith Dhanushka <mm...@gmail.com> on 2012/07/09 00:38:29 UTC

Re: Implement a Collection of Integration Patterns for Synapse : GSoC - 2012

Hi Folks,

Here is the progress update about the $Subject so far. (For more details
about the project approach refer [0])

I've attached the initial implementation of EIP library at [0].

As per the discussion, these are tasks I came across.

*Task 1*
Provided a patch [1] to define whether the template parameter is optional
or not and define parameter default value.

*Task 2*
As of now, following patterns are implemented.

- Recipient List
Forward the message to all channels associated with the defined set of
recipients.
parameters - recipient_list

- Callout Block
Blocks external service invocation during mediation. And useful in
scenarios such as service chaining. Here I had to write a class mediator
for the EIP library to support xpath for serviceURL in Callout mediator. As
default values are assigned to source & target xpaths, one can simply
utilize this pattern by just defining serviceURL.
parameters - service_URL
                   [action]
                   [source_xpath | source_key]
                   [target_xpath | target_key]

- Splitter
This break out the composite message into a series of individual messages.
parameters - iterate_exp
                   [attach_path]
                   endpoint_url
                   [attach_path_enabled]

- Aggregator
Builds a single message distilled from the individual messages.
parameters - aggregator_exp
                    oncomplete_seq_enabled]
                    [sequence_ref]

- SplitterAggregator
Provides the combined functionality of Splitter & Aggregator patterns.
parameters - iterate_exp
                   [attach_path]
                   endpoint_url
                   [attach_path_enabled]
                   aggregator_exp
                   [oncomplete_seq_enabled]
                   [sequence_ref]

*Task 3*
Created sample scenarios for all above patterns. Later those will be added
to the documentation.
ex:- Service Chaining via Callout block

*Task 4*
Wrote a test case for Recipient List lib pattern. Writing Test cases for
other patterns are in progress.

In further steps several other well known EIP ( Content-Based Router, Dead
Letter Channel, Wire Tap, Scatter-Gather, etc..) will be implemented. And
samples and Test integration into Synapse for EIP libraries will also be
added.

Feedback / Suggestions are much appreciated.

[0] https://issues.apache.org/jira/browse/SYNAPSE-745
[1] https://issues.apache.org/jira/browse/SYNAPSE-884

Thanks,
Malith

Re: Implement a Collection of Integration Patterns for Synapse : GSoC - 2012

Posted by Malith Dhanushka <mm...@gmail.com>.
Hi Folks,

Thanks Udayanga for your guidance & suggestions to make the mid evaluation
a success. Currently I am in the process of writing a test case for invoking
library functions in Synapse Libraries and test integration for implemented
patterns so far. I'll update with the progress.

Thanks,
Malith

On Thu, Jul 12, 2012 at 7:21 PM, Udayanga Wickramasinghe
<ud...@wso2.com>wrote:

> Hi Malith,
>
> Sorry for my late reply :)  Please find my comments inline.. Overall i am
> happy about the progress made. There are quite a few things left before we
> complete this project. Looking forward to your contributions in the future..
>
> On Mon, Jul 9, 2012 at 4:08 AM, Malith Dhanushka <mm...@gmail.com>wrote:
>
>> Hi Folks,
>>
>> Here is the progress update about the $Subject so far. (For more details
>> about the project approach refer [0])
>>
>> I've attached the initial implementation of EIP library at [0].
>>
> i went through this, looks good..I think It would be useful to enable
> dynamic expressions for default values.(ie:- to extract values from
> predefined location in the message/context not just plain static values)
>
>
>> As per the discussion, these are tasks I came across.
>>
>> *Task 1*
>> Provided a patch [1] to define whether the template parameter is optional
>> or not and define parameter default value.
>>
>> *Task 2*
>> As of now, following patterns are implemented.
>>
>> - Recipient List
>> Forward the message to all channels associated with the defined set of
>> recipients.
>> parameters - recipient_list
>>
>> - Callout Block
>> Blocks external service invocation during mediation. And useful in
>> scenarios such as service chaining. Here I had to write a class mediator
>> for the EIP library to support xpath for serviceURL in Callout mediator. As
>> default values are assigned to source & target xpaths, one can simply
>> utilize this pattern by just defining serviceURL.
>> parameters - service_URL
>>                    [action]
>>                    [source_xpath | source_key]
>>                    [target_xpath | target_key]
>>
>> This uses call-out mediator. Would be useful to write the non-blocking
> version as well..Lets schedule it to the next phase..
>
>
>> - Splitter
>> This break out the composite message into a series of individual messages.
>> parameters - iterate_exp
>>                    [attach_path]
>>                    endpoint_url
>>                    [attach_path_enabled]
>>
>> - Aggregator
>> Builds a single message distilled from the individual messages.
>> parameters - aggregator_exp
>>                     oncomplete_seq_enabled]
>>                     [sequence_ref]
>>
>> - SplitterAggregator
>> Provides the combined functionality of Splitter & Aggregator patterns.
>> parameters - iterate_exp
>>                    [attach_path]
>>                    endpoint_url
>>                    [attach_path_enabled]
>>                    aggregator_exp
>>                    [oncomplete_seq_enabled]
>>                    [sequence_ref]
>>
>> *Task 3*
>> Created sample scenarios for all above patterns. Later those will be
>> added to the documentation.
>> ex:- Service Chaining via Callout block
>>
>
> The way you have implemented patterns looks good and complete in
> functionality. However Samples for each pattern should be integrated into
> synapse samples and  test framework so that we can validate their
> functionality. I think location for synapse eip library code/configurations
> is yet to be decided..For the moment lets have them as test patches.
>
>
>>
>> *Task 4*
>> Wrote a test case for Recipient List lib pattern. Writing Test cases for
>> other patterns are in progress.
>>
>> In further steps several other well known EIP ( Content-Based Router,
>> Dead Letter Channel, Wire Tap, Scatter-Gather, etc..) will be implemented.
>> And samples and Test integration into Synapse for EIP libraries will
>> also be added.
>>
>> +1
> i have a few in mind will update [0] about them.
>
> Regards,
> udayanga
>
> Feedback / Suggestions are much appreciated.
>>
>> [0] https://issues.apache.org/jira/browse/SYNAPSE-745
>> [1] https://issues.apache.org/jira/browse/SYNAPSE-884
>>
>> Thanks,
>> Malith
>>
>>
>
>
> --
> *Udayanga Wickramasinghe*
> Software Engineer; WSO2 Inc.; http://wso2.com,
> *email: **udayanga@wso2.com* <ud...@wso2.com>* cell: +94 (77) 983-4365
> blog: **http://udayangawiki.blogspot.com*<http://udayangawiki.blogspot.com/>
> *
> twitter: **http://twitter.com/udayanga_wick*<http://twitter.com/udayanga_wick>
> *
> *
>



-- 
Undergraduate,
Department of Computer Science and Engineering,
University of Moratuwa,
Sri Lanka.
<Em...@gmail.com>

Re: Implement a Collection of Integration Patterns for Synapse : GSoC - 2012

Posted by Udayanga Wickramasinghe <ud...@wso2.com>.
Hi Malith,

Sorry for my late reply :)  Please find my comments inline.. Overall i am
happy about the progress made. There are quite a few things left before we
complete this project. Looking forward to your contributions in the future..

On Mon, Jul 9, 2012 at 4:08 AM, Malith Dhanushka <mm...@gmail.com> wrote:

> Hi Folks,
>
> Here is the progress update about the $Subject so far. (For more details
> about the project approach refer [0])
>
> I've attached the initial implementation of EIP library at [0].
>
i went through this, looks good..I think It would be useful to enable
dynamic expressions for default values.(ie:- to extract values from
predefined location in the message/context not just plain static values)


> As per the discussion, these are tasks I came across.
>
> *Task 1*
> Provided a patch [1] to define whether the template parameter is optional
> or not and define parameter default value.
>
> *Task 2*
> As of now, following patterns are implemented.
>
> - Recipient List
> Forward the message to all channels associated with the defined set of
> recipients.
> parameters - recipient_list
>
> - Callout Block
> Blocks external service invocation during mediation. And useful in
> scenarios such as service chaining. Here I had to write a class mediator
> for the EIP library to support xpath for serviceURL in Callout mediator. As
> default values are assigned to source & target xpaths, one can simply
> utilize this pattern by just defining serviceURL.
> parameters - service_URL
>                    [action]
>                    [source_xpath | source_key]
>                    [target_xpath | target_key]
>
> This uses call-out mediator. Would be useful to write the non-blocking
version as well..Lets schedule it to the next phase..


> - Splitter
> This break out the composite message into a series of individual messages.
> parameters - iterate_exp
>                    [attach_path]
>                    endpoint_url
>                    [attach_path_enabled]
>
> - Aggregator
> Builds a single message distilled from the individual messages.
> parameters - aggregator_exp
>                     oncomplete_seq_enabled]
>                     [sequence_ref]
>
> - SplitterAggregator
> Provides the combined functionality of Splitter & Aggregator patterns.
> parameters - iterate_exp
>                    [attach_path]
>                    endpoint_url
>                    [attach_path_enabled]
>                    aggregator_exp
>                    [oncomplete_seq_enabled]
>                    [sequence_ref]
>
> *Task 3*
> Created sample scenarios for all above patterns. Later those will be added
> to the documentation.
> ex:- Service Chaining via Callout block
>

The way you have implemented patterns looks good and complete in
functionality. However Samples for each pattern should be integrated into
synapse samples and  test framework so that we can validate their
functionality. I think location for synapse eip library code/configurations
is yet to be decided..For the moment lets have them as test patches.


>
> *Task 4*
> Wrote a test case for Recipient List lib pattern. Writing Test cases for
> other patterns are in progress.
>
> In further steps several other well known EIP ( Content-Based Router, Dead
> Letter Channel, Wire Tap, Scatter-Gather, etc..) will be implemented. And
> samples and Test integration into Synapse for EIP libraries will also be
> added.
>
> +1
i have a few in mind will update [0] about them.

Regards,
udayanga

Feedback / Suggestions are much appreciated.
>
> [0] https://issues.apache.org/jira/browse/SYNAPSE-745
> [1] https://issues.apache.org/jira/browse/SYNAPSE-884
>
> Thanks,
> Malith
>
>


-- 
*Udayanga Wickramasinghe*
Software Engineer; WSO2 Inc.; http://wso2.com,
*email: **udayanga@wso2.com* <ud...@wso2.com>* cell: +94 (77) 983-4365
blog: **http://udayangawiki.blogspot.com*<http://udayangawiki.blogspot.com/>
*
twitter: **http://twitter.com/udayanga_wick*<http://twitter.com/udayanga_wick>
*
*

Re: Implement a Collection of Integration Patterns for Synapse : GSoC - 2012

Posted by Udayanga Wickramasinghe <ma...@gmail.com>.
Hi Malith,
Thank you for your contribution and commitment made to synapse through GSoC
2012. With this project we have been able to further develop the newly
introduced synapse mediation library implementation and more specifically
improve its functionality and scope with working set of samples ,
documentation ,test cases and with related bug fixes (I have few
contributions you made pending to be committed , after some review will do
that in the near future..). I hope you will continue to contribute to this
project and synapse as a whole..

Thanks and Regards,
Udayanga

On Sun, Oct 14, 2012 at 11:55 PM, Malith Dhanushka <mm...@gmail.com>wrote:

>
> Hi Folks,
>
> Here is the progress update about final implementation of the $Subject.
> I've attached the final implementation of EIP library at [0].
>
> Following are the tasks I came across after initial implementation.
>
> Task 1
> Provided set of patches [1],[2],[3],[4] by addressing few issues
> encountered in Synapse during implementation of the library.
>
> Task 2
> Following are the newly added patterns with final implementation.
>
> - Content Based Router
> Route messages to an appropriate sequence, according to the message
> contents. Routing decision is taken by matching given Xpath expression and
> Regular Expression. Wrote a class mediator by including mediation logic.
> parameters - routing_exp
>                    match_content (refer[0] for more details about syntax)
>
> - The Scatter-Gather
> Broadcasts a message to multiple recipients and re-aggregates the
> responses back into a single message and send back to client or mediates to
> the defined target sequence.
> parameters - aggregator_exp
>                    [sequence_ref]
>                    [oncomplete_seq_enabled]
>
> - Dynamic Router
> Route a message consecutively through a series of condition steps, which
> is parsed by the conditions parameter. The list of sequences through which
> the message should pass is decided dynamically at run time.
> parameters - conditions (refer[0] for more details about syntax)
>
> - Wire Tap
> Enables route messages to a secondary channel while they are being
> forwarded to the main channel.
>  parameters - destination_uri
>                    wiretap_uri
>
> Task 3
> Provided samples to showcase each and every patterns added with Synapse
> EIP Library and included to the Synapse test automation framework as well.
>
> Task 4
> Provided documentation by addressing following areas.
> (All the work related to this GSOC project)
>
> - Synapse Template Libraries
>   Contains details about the structure of template library and how to
> utilize a template library.
>
> - Synapse Enterprise Integration Patterns library
>    Contains detailed description about each pattern in EIP library with
> describing their usage, functionality and configuration syntax.
>
> - Documentation related to added samples.
>
> That concludes my work related to the $Subject in last summer with
> Synapse. I wish to sincerely thank Udayanga for his great support. Your
> advice and experience has been tremendously helpful throughout the project.
> I really had a great time with the project, learned a lot and hope to see
> this work in action and it is with great pleasure i continue my
> contribution in future as well.
>
> Feedback / Suggestions are much appreciated.
>
> [0] https://issues.apache.org/jira/browse/SYNAPSE-745
> [1] https://issues.apache.org/jira/browse/SYNAPSE-898
> [2] https://issues.apache.org/jira/browse/SYNAPSE-897
> [3] https://issues.apache.org/jira/browse/SYNAPSE-899
> [4] https://issues.apache.org/jira/browse/SYNAPSE-901
>
> Thanks,
> Malith
>
> On Mon, Jul 9, 2012 at 4:08 AM, Malith Dhanushka <mm...@gmail.com>wrote:
>
>> Hi Folks,
>>
>> Here is the progress update about the $Subject so far. (For more details
>> about the project approach refer [0])
>>
>> I've attached the initial implementation of EIP library at [0].
>>
>> As per the discussion, these are tasks I came across.
>>
>> *Task 1*
>> Provided a patch [1] to define whether the template parameter is optional
>> or not and define parameter default value.
>>
>> *Task 2*
>> As of now, following patterns are implemented.
>>
>> - Recipient List
>> Forward the message to all channels associated with the defined set of
>> recipients.
>> parameters - recipient_list
>>
>> - Callout Block
>> Blocks external service invocation during mediation. And useful in
>> scenarios such as service chaining. Here I had to write a class mediator
>> for the EIP library to support xpath for serviceURL in Callout mediator. As
>> default values are assigned to source & target xpaths, one can simply
>> utilize this pattern by just defining serviceURL.
>> parameters - service_URL
>>                    [action]
>>                    [source_xpath | source_key]
>>                    [target_xpath | target_key]
>>
>> - Splitter
>> This break out the composite message into a series of individual messages.
>> parameters - iterate_exp
>>                    [attach_path]
>>                    endpoint_url
>>                    [attach_path_enabled]
>>
>> - Aggregator
>> Builds a single message distilled from the individual messages.
>> parameters - aggregator_exp
>>                     oncomplete_seq_enabled]
>>                     [sequence_ref]
>>
>> - SplitterAggregator
>> Provides the combined functionality of Splitter & Aggregator patterns.
>> parameters - iterate_exp
>>                    [attach_path]
>>                    endpoint_url
>>                    [attach_path_enabled]
>>                    aggregator_exp
>>                    [oncomplete_seq_enabled]
>>                    [sequence_ref]
>>
>> *Task 3*
>> Created sample scenarios for all above patterns. Later those will be
>> added to the documentation.
>> ex:- Service Chaining via Callout block
>>
>> *Task 4*
>> Wrote a test case for Recipient List lib pattern. Writing Test cases for
>> other patterns are in progress.
>>
>> In further steps several other well known EIP ( Content-Based Router,
>> Dead Letter Channel, Wire Tap, Scatter-Gather, etc..) will be implemented.
>> And samples and Test integration into Synapse for EIP libraries will
>> also be added.
>>
>> Feedback / Suggestions are much appreciated.
>>
>> [0] https://issues.apache.org/jira/browse/SYNAPSE-745
>> [1] https://issues.apache.org/jira/browse/SYNAPSE-884
>>
>> Thanks,
>> Malith
>>
>>
>
>
> --
> Undergraduate,
> Department of Computer Science and Engineering,
> University of Moratuwa,
> Sri Lanka.
> <Em...@gmail.com>
>
>
>


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

Re: Implement a Collection of Integration Patterns for Synapse : GSoC - 2012

Posted by Malith Dhanushka <mm...@gmail.com>.
Hi Folks,

Here is the progress update about final implementation of the $Subject.
I've attached the final implementation of EIP library at [0].

Following are the tasks I came across after initial implementation.

Task 1
Provided set of patches [1],[2],[3],[4] by addressing few issues
encountered in Synapse during implementation of the library.

Task 2
Following are the newly added patterns with final implementation.

- Content Based Router
Route messages to an appropriate sequence, according to the message
contents. Routing decision is taken by matching given Xpath expression and
Regular Expression. Wrote a class mediator by including mediation logic.
parameters - routing_exp
                   match_content (refer[0] for more details about syntax)

- The Scatter-Gather
Broadcasts a message to multiple recipients and re-aggregates the responses
back into a single message and send back to client or mediates to the
defined target sequence.
parameters - aggregator_exp
                   [sequence_ref]
                   [oncomplete_seq_enabled]

- Dynamic Router
Route a message consecutively through a series of condition steps, which is
parsed by the conditions parameter. The list of sequences through which the
message should pass is decided dynamically at run time.
parameters - conditions (refer[0] for more details about syntax)

- Wire Tap
Enables route messages to a secondary channel while they are being
forwarded to the main channel.
parameters - destination_uri
                   wiretap_uri

Task 3
Provided samples to showcase each and every patterns added with Synapse EIP
Library and included to the Synapse test automation framework as well.

Task 4
Provided documentation by addressing following areas.
(All the work related to this GSOC project)

- Synapse Template Libraries
  Contains details about the structure of template library and how to
utilize a template library.

- Synapse Enterprise Integration Patterns library
   Contains detailed description about each pattern in EIP library with
describing their usage, functionality and configuration syntax.

- Documentation related to added samples.

That concludes my work related to the $Subject in last summer with Synapse.
I wish to sincerely thank Udayanga for his great support. Your advice and
experience has been tremendously helpful throughout the project. I really
had a great time with the project, learned a lot and hope to see this work
in action and it is with great pleasure i continue my contribution in
future as well.

Feedback / Suggestions are much appreciated.

[0] https://issues.apache.org/jira/browse/SYNAPSE-745
[1] https://issues.apache.org/jira/browse/SYNAPSE-898
[2] https://issues.apache.org/jira/browse/SYNAPSE-897
[3] https://issues.apache.org/jira/browse/SYNAPSE-899
[4] https://issues.apache.org/jira/browse/SYNAPSE-901

Thanks,
Malith

On Mon, Jul 9, 2012 at 4:08 AM, Malith Dhanushka <mm...@gmail.com> wrote:

> Hi Folks,
>
> Here is the progress update about the $Subject so far. (For more details
> about the project approach refer [0])
>
> I've attached the initial implementation of EIP library at [0].
>
> As per the discussion, these are tasks I came across.
>
> *Task 1*
> Provided a patch [1] to define whether the template parameter is optional
> or not and define parameter default value.
>
> *Task 2*
> As of now, following patterns are implemented.
>
> - Recipient List
> Forward the message to all channels associated with the defined set of
> recipients.
> parameters - recipient_list
>
> - Callout Block
> Blocks external service invocation during mediation. And useful in
> scenarios such as service chaining. Here I had to write a class mediator
> for the EIP library to support xpath for serviceURL in Callout mediator. As
> default values are assigned to source & target xpaths, one can simply
> utilize this pattern by just defining serviceURL.
> parameters - service_URL
>                    [action]
>                    [source_xpath | source_key]
>                    [target_xpath | target_key]
>
> - Splitter
> This break out the composite message into a series of individual messages.
> parameters - iterate_exp
>                    [attach_path]
>                    endpoint_url
>                    [attach_path_enabled]
>
> - Aggregator
> Builds a single message distilled from the individual messages.
> parameters - aggregator_exp
>                     oncomplete_seq_enabled]
>                     [sequence_ref]
>
> - SplitterAggregator
> Provides the combined functionality of Splitter & Aggregator patterns.
> parameters - iterate_exp
>                    [attach_path]
>                    endpoint_url
>                    [attach_path_enabled]
>                    aggregator_exp
>                    [oncomplete_seq_enabled]
>                    [sequence_ref]
>
> *Task 3*
> Created sample scenarios for all above patterns. Later those will be added
> to the documentation.
> ex:- Service Chaining via Callout block
>
> *Task 4*
> Wrote a test case for Recipient List lib pattern. Writing Test cases for
> other patterns are in progress.
>
> In further steps several other well known EIP ( Content-Based Router, Dead
> Letter Channel, Wire Tap, Scatter-Gather, etc..) will be implemented. And
> samples and Test integration into Synapse for EIP libraries will also be
> added.
>
> Feedback / Suggestions are much appreciated.
>
> [0] https://issues.apache.org/jira/browse/SYNAPSE-745
> [1] https://issues.apache.org/jira/browse/SYNAPSE-884
>
> Thanks,
> Malith
>
>


-- 
Undergraduate,
Department of Computer Science and Engineering,
University of Moratuwa,
Sri Lanka.
<Em...@gmail.com>