87
Leveraging Open Source Integration with WSO2 Enterprise Service Bus Sumedha Rubasinghe 2009 Air Force Information Technology Conference Montgomery, Atlanta

Open Source Integration with WSO2 Enterprise Service Bus

Embed Size (px)

DESCRIPTION

Open Source Integration with WSO2 Enterprise Service Bus

Citation preview

Page 1: Open Source Integration  with  WSO2 Enterprise Service Bus

Leveraging Open Source Integration with

WSO2 Enterprise Service Bus

Sumedha Rubasinghe2009 Air Force Information Technology Conference

Montgomery, Atlanta

Page 2: Open Source Integration  with  WSO2 Enterprise Service Bus

2

The Need Introduction Features Important Concepts Extendibility Performance Use cases Getting started & Help

Agenda

Page 3: Open Source Integration  with  WSO2 Enterprise Service Bus

3

Page 4: Open Source Integration  with  WSO2 Enterprise Service Bus

4

Page 5: Open Source Integration  with  WSO2 Enterprise Service Bus

5

Page 6: Open Source Integration  with  WSO2 Enterprise Service Bus

6

Page 7: Open Source Integration  with  WSO2 Enterprise Service Bus

7

Page 8: Open Source Integration  with  WSO2 Enterprise Service Bus

8

Busbar

Page 9: Open Source Integration  with  WSO2 Enterprise Service Bus

9

Page 10: Open Source Integration  with  WSO2 Enterprise Service Bus

10

Introducing Mattson ...

Hi.. Mattson here.. I am an architect

Page 11: Open Source Integration  with  WSO2 Enterprise Service Bus

11

So.. What is WSO2 ESB?

Page 12: Open Source Integration  with  WSO2 Enterprise Service Bus

12

WSO2 Enterprise Service Bus

A fast,Light weight, easy-to-use Enterprise Service Bus product

Open source product with commercial support (if required)

Released with business friendly Apache License 2.0

Based on Apache Synapse Customizable to match the needs of your

Enterprise

Page 13: Open Source Integration  with  WSO2 Enterprise Service Bus

13

wait..What is Apache Synapse?How is it related to WSO2ESB?

Page 14: Open Source Integration  with  WSO2 Enterprise Service Bus

14

Apache Synapse & WSO2 ESB

Leading project developed by Apache community

Some of the key committers with in WSO2 WSO2 ESB is built on top of Apache Synapse Synapse provides the core mediation

capabilities WSO2 ESB uses Synapse's configuration

language

Page 15: Open Source Integration  with  WSO2 Enterprise Service Bus

15

Screenshots

Page 16: Open Source Integration  with  WSO2 Enterprise Service Bus

16

Screen shots

Page 17: Open Source Integration  with  WSO2 Enterprise Service Bus

17

Screen shots

Page 18: Open Source Integration  with  WSO2 Enterprise Service Bus

18

In what type of scenariosCan I use WSO2 ESB?

Page 19: Open Source Integration  with  WSO2 Enterprise Service Bus

19

Usage scenarios

Link legacy files to messaging based systems Transform CSV or EDI formats to XML Act as a high-performance XML Gateway Content-based routing and creating virtual

services Integrate FIX based trading systems with XML

and non-XML backends Log, trace and audit live systems

Page 20: Open Source Integration  with  WSO2 Enterprise Service Bus

20

Tell me some of the main features of WSO2 ESB

Page 21: Open Source Integration  with  WSO2 Enterprise Service Bus

21

WSO2 ESB Features

Message Routing Message Transformation & Mapping Scheduled Tasks Orchestration Protocol Switching Transaction Support Eventing

Page 22: Open Source Integration  with  WSO2 Enterprise Service Bus

22

Message Routing

Act as a simple Proxy

Page 23: Open Source Integration  with  WSO2 Enterprise Service Bus

23

Message Routing

Content based routing

Page 24: Open Source Integration  with  WSO2 Enterprise Service Bus

24

Message Transformation & Mapping

XSLT

Page 25: Open Source Integration  with  WSO2 Enterprise Service Bus

25

Message Transformation & Mapping

XQuery

Page 26: Open Source Integration  with  WSO2 Enterprise Service Bus

26

Message Transformation & Mapping

E4X

Page 27: Open Source Integration  with  WSO2 Enterprise Service Bus

27

Message Transformation & Mapping

Support for different file formats– EDI

– flat files

– CSV

– COBOL/Record

Page 28: Open Source Integration  with  WSO2 Enterprise Service Bus

28

Tasks

Allow the ESB to initiate work on a timed basis Cron/simple interval Write your own tasks

Page 29: Open Source Integration  with  WSO2 Enterprise Service Bus

29

Orchestration

Aggregate

Page 30: Open Source Integration  with  WSO2 Enterprise Service Bus

30

Orchestration

Disaggregate

Page 31: Open Source Integration  with  WSO2 Enterprise Service Bus

31

Orchestration

Callout

Page 32: Open Source Integration  with  WSO2 Enterprise Service Bus

32

Orchestration

If/Then/Else

Page 33: Open Source Integration  with  WSO2 Enterprise Service Bus

33

Orchestration

BPEL Feature plug-in– Adds BPS capabilities into ESB

Page 34: Open Source Integration  with  WSO2 Enterprise Service Bus

34

interesting...

Page 35: Open Source Integration  with  WSO2 Enterprise Service Bus

35

Protocol Support

Page 36: Open Source Integration  with  WSO2 Enterprise Service Bus

36

Protocol Support

File, (S)FTP, HTTP(S), REST, Hessian, JSON SOAP JMS

– MQSeries, AMQP/ Apache Qpid,Apache ActiveMQ

– Transactional support Email, XMPP,FIX,TCP

Page 37: Open Source Integration  with  WSO2 Enterprise Service Bus

37

Rule based Mediation Drools

Page 38: Open Source Integration  with  WSO2 Enterprise Service Bus

38

Many more features ... Load balancing Fail-over handling Caching / Throttling Registry based Clustering WS-Reliable Messaging FIX CEP (Complex Event Processing) and many more....

Page 39: Open Source Integration  with  WSO2 Enterprise Service Bus

39

What if I want more? Can I extend WSO2 ESB?What if I want more? Can I extend WSO2 ESB?

Yes.. you can..Just write a mediator..

Page 40: Open Source Integration  with  WSO2 Enterprise Service Bus

40

Mediator ..!!what is that?

Page 41: Open Source Integration  with  WSO2 Enterprise Service Bus

41

Important concept - Mediator• Basic component of ESB

• Mediates messages going through

• Core mediators

– Send, Drop, Log, Property

• Filter mediators– Filter, Switch, Validate, Throttle, In, Out

• Transformation mediators– XSLT, Header, Fault, XQuery

• Advanced mediators– Clone, Cache, Aggregate, DBLookup, Callout

Page 42: Open Source Integration  with  WSO2 Enterprise Service Bus

42

Important concept – Send Mediator

• Used to send out the messages

• Used in almost all the cases

• Wrapped an endpoint– if no endpoint is specified, anonymous 'To'

address will be taken as the EPR

Page 43: Open Source Integration  with  WSO2 Enterprise Service Bus

43

Important concept – Sequence

• Special mediator– List of mediators to be executed in an order

• Pipeline pattern

• Special sequences– main

– fault

Page 44: Open Source Integration  with  WSO2 Enterprise Service Bus

44

Important concept – operation modes

• Act as a proxy

• Main Sequence– If none of the proxy services matches the

request pattern

Page 45: Open Source Integration  with  WSO2 Enterprise Service Bus

45

I would like to have fewmore mediator examples..

Page 46: Open Source Integration  with  WSO2 Enterprise Service Bus

46

Extendibility – Java Mediator

• Class implementing the Mediator interface– Or AbstractMediator class

– Custom mediator is executed through the ClassMediator in ESB

– Corresponding setter methods in the custom class will be set before executing the custom mediator if any properties are specified

Page 47: Open Source Integration  with  WSO2 Enterprise Service Bus

47

Extendibility - POJOCommand

• Extends the mediation capabilities using the well known command pattern

– Class implementing the Command interface or a POJO with a void execute() method

– execute() method will be invoked using the Command interface or by using reflection

– Sets the properties before execution and retrieves the properties after execution

Page 48: Open Source Integration  with  WSO2 Enterprise Service Bus

48

Extendibility – Script Mediator

• Enables scripting for extending mediation

• Supports all the Apache BSF scripting languages

– JRuby, Jython, Groovy, Java Script

• Embed the script inline or can be referred to a separate script file with the function name to be executed

Page 49: Open Source Integration  with  WSO2 Enterprise Service Bus

49

Extendibility – Spring Mediator

• Spring configurations to extend the mediation

• Spring bean must implement the Mediator interface

• Refer to the spring application context using the key

• The Spring bean is managed by the spring context at mediation time

Page 50: Open Source Integration  with  WSO2 Enterprise Service Bus

50

Extending WSO2 ESB

Registry as a repository– Loading configuration from external registry

New Transports

Page 51: Open Source Integration  with  WSO2 Enterprise Service Bus

51

So how does all of these fittogether?...What happens with-in WSO2ESB?

Page 52: Open Source Integration  with  WSO2 Enterprise Service Bus

52

Architecture

Page 53: Open Source Integration  with  WSO2 Enterprise Service Bus

53

Runtime

Page 54: Open Source Integration  with  WSO2 Enterprise Service Bus

54

Deployment

Page 55: Open Source Integration  with  WSO2 Enterprise Service Bus

55

Performance Completely asynchronous architecture internally Streaming support for messages 100% error free and zero memory leaks under heavy load Up to 4500tps out-of-the-box for proxying

– Intel(R) Xeon(TM) 3.20GHz 2MB Cache

– Dual Core - 2 CPU system

– 2GB RAM

– 1Gb Ethernet

http://wso2.org/library/3740

Page 56: Open Source Integration  with  WSO2 Enterprise Service Bus

56

Performance http://wso2.org/library/3740

Page 57: Open Source Integration  with  WSO2 Enterprise Service Bus

57

Non-Blocking IO

Thread2

Incoming req

Sock

et o

pen

Thread1 Socke

t op

en

Requestprocessing

Responseprocessing

Outgoing resp

Outgoing req

Incoming resp

Synapse

TIME

TIME

TIME

TIME

This model means:1. Synapse threads never blocked during normal processing2. Number of sockets open >> number of threads

Page 58: Open Source Integration  with  WSO2 Enterprise Service Bus

58

Monitoring

Monitor System statistics Running logs Message Tracing Dynamically configurable Logger Exposes statistics via JMX Dashboard – Google Gadgets

Page 59: Open Source Integration  with  WSO2 Enterprise Service Bus

59

I would like to see someUse cases where all of these are applied...

Page 60: Open Source Integration  with  WSO2 Enterprise Service Bus

60

Use Case 1 • Problem– I want to send a notification email whenever there

is a request to a particular service which satisfies a set of conditions over the request

• Solution– Filter the messages over the request and evaluate

the conditions

– If the conditions evaluate to true then clone the message

– Send the request to the desired endpoint while forwarding a copy (may be after transformation) through the mail transport

Page 61: Open Source Integration  with  WSO2 Enterprise Service Bus

61

Use Case 1

Page 62: Open Source Integration  with  WSO2 Enterprise Service Bus

62

Use Case 1 - configuration

Page 63: Open Source Integration  with  WSO2 Enterprise Service Bus

63

Use Case 2• Problem– I have a service exposed over HTTP transport and

now I want the same service to be accessed through JMS

• Solution– Expose a proxy service with JMS (and what ever

transport) and switch the transport to HTTP (if not http)

– Invoke the actual service with HTTP transport

– Switch the transport back to JMS of the response message

Page 64: Open Source Integration  with  WSO2 Enterprise Service Bus

64

Use Case 2

Page 65: Open Source Integration  with  WSO2 Enterprise Service Bus

65

Use Case 2 - Configuration

Page 66: Open Source Integration  with  WSO2 Enterprise Service Bus

66

Use Case 3• Problem– I want the ESB to invoke several services of the

same type for a request, evaluate all the responses and respond me with the best one

• Solution– Clone the message and send the requests to

different endpoints

– Get the responses from all services and aggregate the responses

– Select the best out of the aggregated responses and respond to the client

Page 67: Open Source Integration  with  WSO2 Enterprise Service Bus

67

Use Case 3

Page 68: Open Source Integration  with  WSO2 Enterprise Service Bus

68

Use Case 3 - Configuration

Page 69: Open Source Integration  with  WSO2 Enterprise Service Bus

69

Use Case 3 - Configuration

Page 70: Open Source Integration  with  WSO2 Enterprise Service Bus

70

Use Case 3 - Configuration

Page 71: Open Source Integration  with  WSO2 Enterprise Service Bus

71

Use Case 3 - Configuration

Page 72: Open Source Integration  with  WSO2 Enterprise Service Bus

72

Use Case 3 - Configuration

Page 73: Open Source Integration  with  WSO2 Enterprise Service Bus

73

Use Case 4• Problem– I have a non secure service and now I want to

expose this service with security

• Solution– Expose a proxy service

– Add security to that proxy service and specify the policy on which you want to enforce security

– Invoke the actual service without security by removing security headers in the request comes to the proxy

– Add security for responses from the actual service to client

Page 74: Open Source Integration  with  WSO2 Enterprise Service Bus

74

Use Case 4

Page 75: Open Source Integration  with  WSO2 Enterprise Service Bus

75

Use Case 4 - Configuration

Page 76: Open Source Integration  with  WSO2 Enterprise Service Bus

76

Use Case 5 - FIX to HTTP transport

http://wso2.org/library/3837

Page 77: Open Source Integration  with  WSO2 Enterprise Service Bus

77

Use Case 6 - Eventing

•http://wso2.org/library/articles/fusion-eventing-soa•http://wso2.org/library/articles/fusion-eventing-soa-part-2-eventing-using-synapse-wso2esb

Page 78: Open Source Integration  with  WSO2 Enterprise Service Bus

78

Use Case 7

Page 79: Open Source Integration  with  WSO2 Enterprise Service Bus

79

WSO2 Product Platform

Page 80: Open Source Integration  with  WSO2 Enterprise Service Bus

80

That's lot of information...Now I would like to try these out myself. How do I get started?

Page 81: Open Source Integration  with  WSO2 Enterprise Service Bus

81

How to get started?

Download binary distribution from http://wso2.org/projects/esb/java

Latest is v2.1.0 Unzip

• Run bin/wso2server.sh (on Unix) or bin/wso2server.bat (on Windows)

• Management console– https://localhost:9443/carbon

– admin/admin

Page 82: Open Source Integration  with  WSO2 Enterprise Service Bus

82

Help.. I messed it up...

Page 83: Open Source Integration  with  WSO2 Enterprise Service Bus

83

How to get help?

Online forum Active community of external users Ample free documentation on wso2.org If needed, we provided commercial support on

– Getting started

– Deployment

– Custom development

– Production support

Page 84: Open Source Integration  with  WSO2 Enterprise Service Bus

84

I would like to have some URLs for reference.

Page 85: Open Source Integration  with  WSO2 Enterprise Service Bus

85

Useful references

WSO2 Oxygen Tank for Web Service Developers

– http://wso2.org WSO2 ESB project page

– http://wso2.org/projects/esb Performance testing

– http://wso2.org/library/3740

– http://wso2.org/library/2259

– http://wso2.org/library/1721 Apache Synapse

– http://synapse.apache.org

Page 86: Open Source Integration  with  WSO2 Enterprise Service Bus

86

Summary

•Hypothetical Enterprise•Brief Introduction on WSO2 ESB•Features•Important concepts– Mediators– Sequence

•Extendibility•Use cases•Getting started & Help

Page 87: Open Source Integration  with  WSO2 Enterprise Service Bus

87

Thank [email protected]

(on behalf of WSO2 ESB team)