Improved Business Availability and Scalability with WSO2 ESB 4.9’s New Coordination Framework
-
Upload
wso2-inc -
Category
Technology
-
view
536 -
download
1
Transcript of Improved Business Availability and Scalability with WSO2 ESB 4.9’s New Coordination Framework
![Page 1: Improved Business Availability and Scalability with WSO2 ESB 4.9’s New Coordination Framework](https://reader034.fdocuments.net/reader034/viewer/2022051705/58a1334f1a28abd34f8b5c0b/html5/thumbnails/1.jpg)
Improved Business Availability and Scalability with WSO2 ESB 4.9.0’s New
Coordination Framework
Ravindra RanwalaSoftware Engineer
Nadeeshaan GunasingheSoftware Engineer
Nov 2015
![Page 2: Improved Business Availability and Scalability with WSO2 ESB 4.9’s New Coordination Framework](https://reader034.fdocuments.net/reader034/viewer/2022051705/58a1334f1a28abd34f8b5c0b/html5/thumbnails/2.jpg)
About the Presenters
● Ravindra Ranwala Software Engineer WSO2
● Nadeeshaan Gunasinghe Software Engineer WSO2
![Page 3: Improved Business Availability and Scalability with WSO2 ESB 4.9’s New Coordination Framework](https://reader034.fdocuments.net/reader034/viewer/2022051705/58a1334f1a28abd34f8b5c0b/html5/thumbnails/3.jpg)
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
![Page 4: Improved Business Availability and Scalability with WSO2 ESB 4.9’s New Coordination Framework](https://reader034.fdocuments.net/reader034/viewer/2022051705/58a1334f1a28abd34f8b5c0b/html5/thumbnails/4.jpg)
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
![Page 5: Improved Business Availability and Scalability with WSO2 ESB 4.9’s New Coordination Framework](https://reader034.fdocuments.net/reader034/viewer/2022051705/58a1334f1a28abd34f8b5c0b/html5/thumbnails/5.jpg)
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
![Page 6: Improved Business Availability and Scalability with WSO2 ESB 4.9’s New Coordination Framework](https://reader034.fdocuments.net/reader034/viewer/2022051705/58a1334f1a28abd34f8b5c0b/html5/thumbnails/6.jpg)
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
![Page 7: Improved Business Availability and Scalability with WSO2 ESB 4.9’s New Coordination Framework](https://reader034.fdocuments.net/reader034/viewer/2022051705/58a1334f1a28abd34f8b5c0b/html5/thumbnails/7.jpg)
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
![Page 8: Improved Business Availability and Scalability with WSO2 ESB 4.9’s New Coordination Framework](https://reader034.fdocuments.net/reader034/viewer/2022051705/58a1334f1a28abd34f8b5c0b/html5/thumbnails/8.jpg)
Store And Forward - Guaranteed Delivery
● Scheduled Message Forwarding Processor can be used.
![Page 9: Improved Business Availability and Scalability with WSO2 ESB 4.9’s New Coordination Framework](https://reader034.fdocuments.net/reader034/viewer/2022051705/58a1334f1a28abd34f8b5c0b/html5/thumbnails/9.jpg)
Store and Forward - Request Rate Matching
● Sampling Message Processor can be used.
![Page 10: Improved Business Availability and Scalability with WSO2 ESB 4.9’s New Coordination Framework](https://reader034.fdocuments.net/reader034/viewer/2022051705/58a1334f1a28abd34f8b5c0b/html5/thumbnails/10.jpg)
MP Coordination Support - Single Task
![Page 11: Improved Business Availability and Scalability with WSO2 ESB 4.9’s New Coordination Framework](https://reader034.fdocuments.net/reader034/viewer/2022051705/58a1334f1a28abd34f8b5c0b/html5/thumbnails/11.jpg)
MP Coordination Support - Multiple Tasks
![Page 12: Improved Business Availability and Scalability with WSO2 ESB 4.9’s New Coordination Framework](https://reader034.fdocuments.net/reader034/viewer/2022051705/58a1334f1a28abd34f8b5c0b/html5/thumbnails/12.jpg)
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
![Page 13: Improved Business Availability and Scalability with WSO2 ESB 4.9’s New Coordination Framework](https://reader034.fdocuments.net/reader034/viewer/2022051705/58a1334f1a28abd34f8b5c0b/html5/thumbnails/13.jpg)
Scheduled Tasks Ctd..● Writing own tasks with custom Java Classes implementing org.apache.synapse.startup.Task
Interface
![Page 14: Improved Business Availability and Scalability with WSO2 ESB 4.9’s New Coordination Framework](https://reader034.fdocuments.net/reader034/viewer/2022051705/58a1334f1a28abd34f8b5c0b/html5/thumbnails/14.jpg)
Scheduled Tasks Ctd..
![Page 15: Improved Business Availability and Scalability with WSO2 ESB 4.9’s New Coordination Framework](https://reader034.fdocuments.net/reader034/viewer/2022051705/58a1334f1a28abd34f8b5c0b/html5/thumbnails/15.jpg)
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>
![Page 16: Improved Business Availability and Scalability with WSO2 ESB 4.9’s New Coordination Framework](https://reader034.fdocuments.net/reader034/viewer/2022051705/58a1334f1a28abd34f8b5c0b/html5/thumbnails/16.jpg)
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>
![Page 17: Improved Business Availability and Scalability with WSO2 ESB 4.9’s New Coordination Framework](https://reader034.fdocuments.net/reader034/viewer/2022051705/58a1334f1a28abd34f8b5c0b/html5/thumbnails/17.jpg)
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>
![Page 18: Improved Business Availability and Scalability with WSO2 ESB 4.9’s New Coordination Framework](https://reader034.fdocuments.net/reader034/viewer/2022051705/58a1334f1a28abd34f8b5c0b/html5/thumbnails/18.jpg)
Scheduled Task Demo
![Page 19: Improved Business Availability and Scalability with WSO2 ESB 4.9’s New Coordination Framework](https://reader034.fdocuments.net/reader034/viewer/2022051705/58a1334f1a28abd34f8b5c0b/html5/thumbnails/19.jpg)
Q & A
![Page 20: Improved Business Availability and Scalability with WSO2 ESB 4.9’s New Coordination Framework](https://reader034.fdocuments.net/reader034/viewer/2022051705/58a1334f1a28abd34f8b5c0b/html5/thumbnails/20.jpg)
Thank You
![Page 21: Improved Business Availability and Scalability with WSO2 ESB 4.9’s New Coordination Framework](https://reader034.fdocuments.net/reader034/viewer/2022051705/58a1334f1a28abd34f8b5c0b/html5/thumbnails/21.jpg)
References● https://en.wikipedia.org/wiki/High_availability_software
● https://en.wikipedia.org/wiki/Scalability
● http://ravindraranwala.blogspot.com/2015/09/message-processor-coordination-support.html
● http://soatutorials.blogspot.com/2015/09/wso2-esb-490-released.html