22
Improved Business Availability and Scalability with WSO2 ESB 4.9.0’s New Coordination Framework Ravindra Ranwala Software Engineer Nadeeshaan Gunasinghe Software Engineer Nov 2015

Improved Business Availability and Scalability with WSO2 ESB 4.9’s New Coordination Framework

Embed Size (px)

Citation preview

Improved Business Availability and Scalability with WSO2 ESB 4.9.0’s New

Coordination Framework

Ravindra RanwalaSoftware Engineer

Nadeeshaan GunasingheSoftware Engineer

Nov 2015

About the Presenters

● Ravindra Ranwala Software Engineer WSO2

● Nadeeshaan Gunasinghe Software Engineer WSO2

Outline● Business Availability

● Business Scalability

● Coordination Support in WSO2 ESB

○ Message Processor

○ Scheduled Tasks

● Demonstration on Tasks and Message Processor in a Clustered Environment

● Conclusion

● Q&A

Business Availability

● Ensure your systems run most of the time without interruptions

● How to Achieve

○ Avoiding Single point of failures

● Real world Implementation

○ Clusters of Service Nodes

Business Scalability

● Definition: Accepts increased traffic in graceful and controlled manner

● How to Achieve

○ By adding more nodes to a system

● Real World Implementation

○ Clustering the Nodes

Task Coordination Support in WSO2 ESB

● Using the much faster coordination support of the Carbon framework

● Scheduled Tasks and Message Processors

○ Deploying in the clusters and coordination across the nodes

○ Continuously running as long as there is at least one node is up and

running

Message Processor● Guaranteed delivery with store and forward mechanism

● Rate matching/ Throttling can be done by using the Sampling Processor

● JMS Message broker as the persistence store – WSO2 MB, Apache ActiveMQ etc.

● MP Coordination support - Clustered Environment

○ Yields high Availability and Scalability

Store And Forward - Guaranteed Delivery

● Scheduled Message Forwarding Processor can be used.

Store and Forward - Request Rate Matching

● Sampling Message Processor can be used.

MP Coordination Support - Single Task

MP Coordination Support - Multiple Tasks

Scheduled Tasks● Facilitate to run a job triggered by a timer

● WSO2 ESB has it’s inbuilt task support to allow injecting messages to ESB in scheduled

intervals

● Task Trigger types

○ Specifying the count and interval

○ Cron expressions

○ Making the task run only once with the once atribute

Scheduled Tasks Ctd..● Writing own tasks with custom Java Classes implementing org.apache.synapse.startup.Task

Interface

Scheduled Tasks Ctd..

Scheduled Tasks Ctd..

● Source Configuration for scheduling the task

<task class="org.apache.synapse.startup.tasks.MessageInjector" group="synapse.simple.quartz" name="SimpleStockQuoteTask">

<trigger count="12" interval="60"/>

</task>

Scheduled Tasks Ctd..

● Injecting a Message to a Specified Sequence through a task

<task name="SampleInjectToSequenceTask" class="org.apache.synapse.startup.tasks.MessageInjector" roup="synapse.simple.quartz">

<trigger count="2" interval="5"/>

<property xmlns:task="http://www.wso2.org/products/wso2commons/tasks" name="injectTo" value="sequence"/>

<property xmlns:task="http://www.wso2.org/products/wso2commons/tasks" name="message">

<m0:getQuote xmlns:m0="http://services.samples">

<m0:request>

<m0:symbol>IBM</m0:symbol>

</m0:request>

</m0:getQuote>

</property>

<property xmlns:task="http://www.wso2.org/products/wso2commons/tasks" name="sequenceName" value="SampleSequence"/>

</task>

Scheduled Tasks Ctd..

● Injecting a Message to a Specified proxy service through a task

<task name="SampleInjectToProxyTask" class="org.apache.synapse.startup.tasks.MessageInjector" group="synapse.simple.quartz">

<trigger count="2" interval="5"/>

<property xmlns:task="http://www.wso2.org/products/wso2commons/tasks" name="message">

<m0:getQuote xmlns:m0="http://services.samples">

<m0:request>

<m0:symbol>IBM</m0:symbol>

</m0:request>

</m0:getQuote>

</property>

<property xmlns:task="http://www.wso2.org/products/wso2commons/tasks" name="proxyName" value="SampleProxy"/>

<property xmlns:task="http://www.wso2.org/products/wso2commons/tasks" name="injectTo" value="proxy"/>

</task>

Scheduled Task Demo

Q & A

Thank You