deep-dive into wso2 esb 5.0
TRANSCRIPT
Deep-diveintoWSO2ESB5.0
KasunIndrasiriDirector,Integra;onTechnologiesWSO2 Oct2016
WSO2Workshop,MountainView,CA
Agenda
o Introduc;ontoWSO2PlaKormo WSO2ESBinanutshello WhatWSO2ESB5?o DataMappero Media;onDebuggero ESBAnaly;cso WebSocketssupporto JMS2.0o FutureofEnterpriseIntegra;on
Image: thinkpublic/photopin cc
WSO2ESBinanutshell
o Alightweight,highperformanceESB
o ComprehensiveREST,SOAP,WS-*support
o SAP,FIX,HL7-Domainspecificsolu;ons
o ZeroCode/Configura;ondriven
o ExtensibleandScalable
o 100%coverageofallEIPs
Image: thinkpublic/photopin cc
UnderstandingESBMessageFlow
o Messageentrypoints,messageprocessingandmessageexitpoints.
Image: thinkpublic/photopin cc
WhyWSO2ESB5.0?
o Enhanced Developer experience o Data Mapper
o Mediation Debugger
o Analytics o Mediation Statistics
o Message Tracing
o Expanding Integration capabilities o WebSockets
o JMS 2.0
o Product = Runtime + Tooling + Analytics o Out-of-the box, seamless integration between these components.
Image: thinkpublic/photopin cc
DataMapper
o Visual message transformation between two message formats.
o Supported message formats : JSON, XML, CSV
o Data mapping operations o Common - constants, properties, compare etc.
o String - concat, split, replace etc.
o Arithmetic - add, subtract, multiply, floor, round etc.
o Boolean - and, or, not
o Conditional - if/else
o Type conversion - stringToBoolean, stringToNumber, toString
Image: thinkpublic/photopin cc
UnderstandingDataMapper
o UsingDataMapper
o DraganddropDataMappermediatortomessagesequence.
o Providesampleinputandoutputformats:Toolcreatethevisualstructureofthemessage.
o Usedatamappingopera;onstomapinputmessageformattotheoutputmessageformat.
o Input/outputschemadefinesthestructureofinput/outputmessageformats.
o Input/outputtype:Youneedtodefinethemessageformattypeofinput/outputmessages(e.g:applica;on/json)
o Mappingconfigura;onisautoma;callycreatedbasedontheopera;onsandmappingthatyouvisuallyconfigure
Image: thinkpublic/photopin cc
Media7onDebugger
o Mediation Debugger allows you to remote debug your message mediation flows.
Image: thinkpublic/photopin cc
Media7onDebugger–Features
o Set breakpoints and pause message flow.
o Inspecting message headers, payloads and properties.
o Change the message properties on-the-fly and test integration scenarios.
o Inspect transport wire-logs from the debugger.
Image: thinkpublic/photopin cc
ConfiguringMedia7onDebugger
o StartESBwith:shwso2server.sh-Desb.debug
o Run>Debugconfigura=ons>ESBMedia=onDebugger
ESBAnaly7cs
o Media7onSta7s7cs-Coarse-grainandfine-grainsta;s;csofyourintegra;on/media;onflow.
o MessageTracing–Enabletracingforaselectedmessageflowandtracethroughthemessagepath.
Image: thinkpublic/photopin cc
ESBAnaly7cs–Media7onSta7s7cs
o Overviewsec7on:Noofrequests,TPS,successfulandfailedrequests,ar;factlevelsta;s;cs.
Image: thinkpublic/photopin cc
ESBAnaly7cs–Media7onSta7s7cs
o Drill-downbasedonar7facttype:ProxyServices,RESTAPIs,SequencesandEndpoints
Image: thinkpublic/photopin cc
ESBAnaly7cs–Media7onSta7s7cs
o Fine-grainedsta7s7csofmedia7onflows:Profilingyourmedia;onflowstoiden;fypossibleboilenecks.
Image: thinkpublic/photopin cc
ESBAnaly7cs–MessageTracing
o Enablemessagetracingforselectedmessageflowsandtracetheen;remessagepath
Image: thinkpublic/photopin cc
ESBAnaly;cs–MessageTracing
o Enablemessagetracingforselectedmessageflowsandtracetheen;remessagepath
Image: thinkpublic/photopin cc
ESBAnaly7cs–ConfiguringAnaly7cs
o Enablingdatacollec;onatESBrun;me:Enablefollowinginsynapse.proper;es:
o mediation.flow.statistics.enable=true
o mediation.flow.statistics.tracer.collect.payloads=true
o mediation.flow.statistics.tracer.collect.properties=true
o Enablingsta;s;csandtracingattheeachar;factlevel.
o Configureconnec;vitybetweenESBrun;meandanaly;csservervia:o <ESB_HOME>/repository/deployment/server/eventpublishers/
MessageFlowConfigurationPublisher.xml.
Image: thinkpublic/photopin cc
WebSocketsIntegra7on
o WhyWebSockets?o What’swrongwithPolling,LongPolling,Streaming?
o Offersconnec;onsthatarebothpersistent("long-lived")andbi-direc;onal("full-duplex")
o FullDuplexCommunica;onModelfortheWeb
o IncreasedClientandServerCommunica;onEfficiency
o Commonusage:Socialfeeds,Mul;playergames,Collabora;veedi;ng/coding,Clickstreamdataetc[1].
Image: thinkpublic/photopin cc
[1]hip://www.infoworld.com/ar;cle/2609720/applica;on-development/9-killer-uses-for-websockets.html
WebSocketsIntegra;on
o WebSocketstoWebSocketsIntegra7on
o WebSocketsInboundEndpointreceivestheincomingWebSocketsrequests.
o Client->Servermessagesarehandledbythe‘injec;ngsequence’
o Server-Pushmessagesarehandledbythe‘ws.ouKlow.dispatch.sequence’
o WebSocketstransportsendersendstheWebSocketsrequesttotheWebSocketsbackendservice.
Image: thinkpublic/photopin cc
WebSocketsIntegra;on
o WebSocketstoWebSocketsIntegra7on–FrameBroadcas7ng
o Pub-sublikemessagingwithWebSockets.
o ConfigurebroadcastlevelatWebSocketsinboundendpointlevel‘ws.client.side.broadcast.level’.:0,1,2
Image: thinkpublic/photopin cc
WebSocketsIntegra;on
o WebSocketstoHTTPIntegra7on
o WSO2ESBdefinesaWebSocketssub-protocolextensiontoinformthecontenttypeofthemessages.
o WebSocketsclienthastosendSec-WebSockets-Protocolheaderwithsub-protocolextension.ESBusesthissub-protocoltoiden;fytheincomingmessagetype.
o Handshakemessagescanbeiden;fiedwith$ctx:websocket.source.handshake.presentandshouldbeskippedfromthemainmedia;onflow.
Image: thinkpublic/photopin cc
JMS2.0Support
o Mul7pleConsumersAllowedontheSameTopicSubscrip7on
o Amessagethatcomestoatopicisforwardedtoonlyoneoftheconsumers.
o Theconsumerscansharethemessagesthatcometothetopic
o Sharetheworkloadbetweenconsumers.
o UsingJMSInboundendpoint,configure<parameter name="transport.jms.JMSSpecVersion">2.0</parameter>
<parameter name="transport.jms.SharedSubscription">true</parameter>
Image: thinkpublic/photopin cc
JMS Broker
WSO2ESB 1
WSO2ESB 2
Topic
Sharedsubscrip;on
JMS2.0Support
o Detec7ngRepeatedlyRedeliveredMessages
o JMSproviderstosettheJMSXDeliveryCountproperty,whichallowsanapplica;onthatreceiveamessagetodeterminehowmany;mesthemessageisredelivered.
o WSO2ESBallowsyoutodetectsuchrepeatedlyredeliveredmessagesusingtheJMSXDeliveryCountpropertythatissetinmessages.
Image: thinkpublic/photopin cc
<log level="full"/><filter regex="1" source="$ctx:jms.message.delivery.count" xmlns:ns="http://org.apache.synapse/xsd"> <then> <log> <property name="DeliveryCounter" value="1"/> </log> </then> <else> <store messageStore="JMS-Redelivered-Store"/> <log> <property name="DeliveryCounter" value="more than 1"/> </log> </else></filter>
JMS2.0Support
o WSO2ESBasaJMSProducerandSpecifyingaDeliveryDelayonMessages
o TheJMSproviderwillnotdeliverthemessageun;laterthespecifieddeliverydelayhaselapsed.
o ConfigureJMS_MESSAGE_DELAYpriortosendingthemessageout.
<property name="JMS_MESSAGE_DELAY" scope="axis2" value="10000"/>
<log level="full"/>
<call>
<endpoint>
<address uri="jms:/transport.jms.ConnectionFactory=myQueueConnectionFactory"/>
</endpoint>
</call>
Image: thinkpublic/photopin cc
Demo
o Aserviceorchestra;onusecasewithmul;plebackendserviceswhichusedisparatemessagetypes.
Image: thinkpublic/photopin cc
Demo
o SampleCode
o hips://github.com/kasun04/dist/blob/master/esb5_deep_dive_use_cases.zip
o Run>>java -jar maestro-1.0.0.jar
Image: thinkpublic/photopin cc
FutureofIntegra7onTechnologiesLandscape
o Applica;onanddataintegra;ontechnologiesaremovingtoadynamicspace–Cloud,Mobile,APIs,IoT,ConvergenceofDataandApplica=onIntegra=on
Image: thinkpublic/photopin cc
MicroservicesandESB
o RiseofMicroservicesarchitectureandfallofESB.o What’stheroleofIntegra;oninmicroservicesworld?o Howtointegratemicroservices/createcomposite
microservices?o Thehybridapproach:Microservicesandintegra;on
middlewareco-existsinthesameecosystem.
Image: thinkpublic/photopin cc
EvolvingEnterpriseIntegra;onwithMicroserviceso InnerandouterarchitectureofMicroservice.
Image: thinkpublic/photopin cc
EvolvingEnterpriseIntegra;onwithMicroserviceso InnerandouterarchitectureofMicroservice.
Image: thinkpublic/photopin cc
Micro Integrations
Micro-Integra;on
o Buildaspecificintegra;onscenarioandrunthatscenarioindependentlywithalight-weightintegra;onframework.
o Oneintegra;onscenariopereachrun;me.o Run;meisextremelylightweightandcanbedeployedasa
container.o Develop,deployandscaleeachintegra;onscenarios
Independently.
Image: thinkpublic/photopin cc
Summary
o WSO2 ESB 5.0 features and best practices.
o Overview of future of Enterprise Integration.
Image: thinkpublic/photopin cc