Intelligent integration with WSO2 ESB & WSO2 CEP

46
Intelligent Integration with WSO2 ESB and WSO2 CEP Sriskandarajah Suhothayan (Suho) Technical Lead WSO2 Inc.

description

At WSO2Con Europe 2014

Transcript of Intelligent integration with WSO2 ESB & WSO2 CEP

Page 1: Intelligent integration with WSO2 ESB & WSO2 CEP

Intelligent  Integration    with  WSO2  ESB  and  WSO2  CEP

Sriskandarajah  Suhothayan  (Suho)Technical  Lead  

WSO2  Inc.              

Page 2: Intelligent integration with WSO2 ESB & WSO2 CEP

Connected  Business  !

Page 3: Intelligent integration with WSO2 ESB & WSO2 CEP

Connected  Business  !

Page 4: Intelligent integration with WSO2 ESB & WSO2 CEP

Connected  Business  !

Page 5: Intelligent integration with WSO2 ESB & WSO2 CEP

Connected  Business  !

To identity threats &

opportunities

Page 6: Intelligent integration with WSO2 ESB & WSO2 CEP

What  to  integrate  ?

In the line of Connected Business there will be many software systems

•Enterprise Resource Planning systems (ERP) •Management Information Systems (MIS) •Decision Support Systems (DSS) •Data stores • Legacy systems

Page 7: Intelligent integration with WSO2 ESB & WSO2 CEP

Issues  in  integration

But integrating a multitude of complex software applications is not an easy task … • Disparate Systems, Services, Protocols • Diverse and dynamic business requirements • No single vendor/solution • On premise/Cloud solutions • Different QoS requirements • Not everyone adhere to standards

Page 8: Intelligent integration with WSO2 ESB & WSO2 CEP

How  could  we  integrate  ?

Page 9: Intelligent integration with WSO2 ESB & WSO2 CEP

How  could  we  integrate  ?

Point to point connections ?

Page 10: Intelligent integration with WSO2 ESB & WSO2 CEP

How  could  we  integrate  ?

Page 11: Intelligent integration with WSO2 ESB & WSO2 CEP

How  could  we  integrate  ?

Page 12: Intelligent integration with WSO2 ESB & WSO2 CEP

• Scalability, maintainability, troubleshooting nightmares.

How  could  we  integrate  ?

Page 13: Intelligent integration with WSO2 ESB & WSO2 CEP

Solution  …  Bus  !

Page 14: Intelligent integration with WSO2 ESB & WSO2 CEP

Solution  …  Bus  !

Page 15: Intelligent integration with WSO2 ESB & WSO2 CEP

Integration  Platform  Contains  …

• WSO2 ESB – Connects anything with every thing

• WSO2 DSS, WSO2 GReg – Expose data as a service, Repository and governance

• WSO2 MB – Guaranteed messaging

• WSO2 IS – Security, SSO, Role based access control

Page 16: Intelligent integration with WSO2 ESB & WSO2 CEP

Integration  

!!!!! Cloud On-premise ! Hybrid

Page 17: Intelligent integration with WSO2 ESB & WSO2 CEP

Job  Done  :)

Page 18: Intelligent integration with WSO2 ESB & WSO2 CEP

Oops  !

http://islamgreatreligion.files.wordpress.com/2012/11/gaza-16-nov.jpg

Page 19: Intelligent integration with WSO2 ESB & WSO2 CEP

The  Prevention  …  ?

• Monitor ! • Monitor ! • Monitor !

Page 20: Intelligent integration with WSO2 ESB & WSO2 CEP

The  next  mile  ...  !

Monitor and … • Take reactive action • Predict future & take preventive measures • Auto recovery at failure • Optimum resource utilisation • Ensure security & QoS • Alerts

Page 21: Intelligent integration with WSO2 ESB & WSO2 CEP

Is  it  working  as  expected  ?

• The load of the system

Page 22: Intelligent integration with WSO2 ESB & WSO2 CEP

! It can be

The  solution  should  be

• A realtime system • Capable of processing data on the fly • Notify alerts in various forms • Enable enterprise integration

Page 23: Intelligent integration with WSO2 ESB & WSO2 CEP

What  is                                                                                ?

Page 24: Intelligent integration with WSO2 ESB & WSO2 CEP

How  ESB  integrates  with  CEP?

Page 25: Intelligent integration with WSO2 ESB & WSO2 CEP

How  CEP  integrates  with  ESB?

Page 26: Intelligent integration with WSO2 ESB & WSO2 CEP

Patterns  

• Monitoring Proxy service/API : QoS (E.g Response time) • In Message Store & forward : Managing the Queue • Monitoring Routing : Scaling, Throttling, Blacklisting

Page 27: Intelligent integration with WSO2 ESB & WSO2 CEP

Monitoring  QoS  on  Proxy  Services  &  APIs  

Monitoring response time

Page 28: Intelligent integration with WSO2 ESB & WSO2 CEP

define stream ResponseTimeStream ( !! arrivalTime long, departureTime long, !! correlationID string, serviceID string, … ) ;!!from ResponseTimeStream!! [departureTime - arrivalTime > 2 min]!select correlationID, serviceID!insert into NotificationStream ;

Monitoring  QoS  on  Proxy  Services  &  APIs  

Page 29: Intelligent integration with WSO2 ESB & WSO2 CEP

Tuning  Message  Store  and  Forward  

• Monitoring the Message Queue

Page 30: Intelligent integration with WSO2 ESB & WSO2 CEP

Tuning  Message  Store  and  Forward  

define stream QueueStatStream ( queueID string, size long ) ;!!define partition QueuePartition QueueStatStream.queueID;!!from a1 = QueueStatStream, ! a2 = QueueStatStream[size >a1. size]+!within 2 min!select a1. queueID as queueID, !! a1. size as firstSize,!! a2[last]. size as lastSize!insert into AdjustForwardingProcessStream!partition by QueuePartition;

Page 31: Intelligent integration with WSO2 ESB & WSO2 CEP

Monitoring  ESB  routing  and  Scaling

Page 32: Intelligent integration with WSO2 ESB & WSO2 CEP

Monitoring  ESB  routing  and  Scaling

define stream RequestStream ( ! !! correlationID string, serviceID string, !! endpointID string, … ) ;!!from RequestStream!select count(correlationID) as requestCount, !! serviceID, true as scaleUp!group by endpointID!having up requestCount > 90!insert into ScaleUpStream ;

Page 33: Intelligent integration with WSO2 ESB & WSO2 CEP

Intelligent  Scaling  on

Page 34: Intelligent integration with WSO2 ESB & WSO2 CEP

Throttling  &  Blacklisting  users

Page 35: Intelligent integration with WSO2 ESB & WSO2 CEP

Throttling  &  Blacklisting  usersdefine stream RequestStream ( correlationID string, serviceID string, !

! ! userID string, tear string, requestTime long, … ) ;!!define table BlacklistedUserTable(userID string,!! ! ! ! time long,requestCount long); !

Page 36: Intelligent integration with WSO2 ESB & WSO2 CEP

Throttling  &  Blacklisting  usersdefine stream RequestStream ( correlationID string, serviceID string, !

! ! userID string, tear string, requestTime long, … ) ;!!define table BlacklistedUserTable(userID string,!! ! ! ! time long,requestCount long); !!from RequestStream[tear==‘BRONZE’]#window.time(1 min)!

select userID, requestTime as time, !

! count(correlationID) as requestCount!

group by userID!

having up requestCount > 5!insert into BlacklistedUserTable ;!!

Page 37: Intelligent integration with WSO2 ESB & WSO2 CEP

Throttling  &  Blacklisting  usersdefine stream RequestStream ( correlationID string, serviceID string, !

! ! userID string, tear string, requestTime long, … ) ;!!define table BlacklistedUserTable(userID string,!! ! ! ! time long,requestCount long); !!from RequestStream[tear==‘BRONZE’]#window.time(1 min)!

select userID, requestTime as time, !

! count(correlationID) as requestCount!

group by userID!

having up requestCount > 5!insert into BlacklistedUserTable ;!!from RequestStream[not(userID in BlacklistedUserTable. userID)] !select *!insert into ApprovedRequestStream ;

Page 38: Intelligent integration with WSO2 ESB & WSO2 CEP

Patterns  

• Monitoring Proxy service/API : QoS (E.g Response time) • In Message Store & forward : Managing the Queue • Monitoring Routing : Scaling, Throttling, Blacklisting !

• In Load balancing : Fix out of order arrivals • Rules : Temporal

Page 39: Intelligent integration with WSO2 ESB & WSO2 CEP

Patterns  

• Monitoring Proxy service/API : QoS (E.g Response time) • In Message Store & forward : Managing the Queue • Monitoring Routing : Scaling, Throttling, Blacklisting !

• In Load balancing : Fix out of order arrivals • Rules : Temporal !

• For Business Decisions : KPIs, Usage patterns, Waiting for the right time.. to trigger

• Monitoring for Security : Detect Attacks, Credit card fraud, Login patterns, Blacklisting

Page 40: Intelligent integration with WSO2 ESB & WSO2 CEP

Waiting  for  the  right  time  …  to  pull  trigger

Page 41: Intelligent integration with WSO2 ESB & WSO2 CEP

Waiting  for  the  right  time  …  to  pull  triggerdefine stream StockOrderRequest ( symbol string, !

! ! ! ! action string ) ;!

define stream StockStream ( symbol string, price double, … ) ;!

!define partition Stocks StockStream.symbol, ! ! !

! ! ! StockOrderRequest.symbol ;!

!from a1 = StockOrderRequest[action==‘buy’],!

! b1 = StockStream[price<a1.price]+,!

! b2 = StockStream[price>b1.price]!select a1.symbol as symbol, !! b1[0].price as firstPrice, !! b2.price as orderPrice!insert into PurchaseOrder;!

partition by Stocks

Page 42: Intelligent integration with WSO2 ESB & WSO2 CEP

Fixing  Security  Vulnerabilities  

• Identify Dos attacks • Analyse login patterns • Detect credit card fraud • Blacklisting

Page 43: Intelligent integration with WSO2 ESB & WSO2 CEP

Fixing  Security  Vulnerabilities  

Page 44: Intelligent integration with WSO2 ESB & WSO2 CEP

Fixing  Security  Vulnerabilities  

define stream PasswordChangeStream (userId string, time long); !!define stream TransactionStream (userId string, ! amount double, … ); !!from every (a1 = PasswordChangeStream) -> ! a2 = TransactionStream[amount >10000] !within 1 hour!select a1.userId as userId, a2. amount as amount!insert into PotentialFraud ;

Page 45: Intelligent integration with WSO2 ESB & WSO2 CEP

!Better three hours too soon, than one minute too late. !!! William Shakespeare

Page 46: Intelligent integration with WSO2 ESB & WSO2 CEP

Thank  You  

             Questions ?