Building an Enterprise Service Bus Using Web Services and Apache Synapse V2
Total Page:16
File Type:pdf, Size:1020Kb
Colorado Software Summit: October 22 – 27, 2006 © Copyright 2006, WSO2 Inc. Building an Enterprise Service Bus Using Web Services and Apache Synapse v2 Paul Fremantle VP of Technology WSO2 [email protected] Paul Fremantle — Building an Enterprise Service Bus Using Web Services and Apache Synapse v2 Page 1 Colorado Software Summit: October 22 – 27, 2006 © Copyright 2006, WSO2 Inc. About Me Co-founder and VP of Technology and Partnerships at WSO2 ¾ The leading Open Source Web services company Co-Chair of the OASIS WSRX Technical Committee Committer on Apache Synapse Member of the Apache Software Foundation Co-author of Building Web Services in Java 2nd Edition http://bloglines.com/blog/paulfremantle Ex IBM Senior Technical Staff Member ¾ developed the IBM Web Services Gateway ¾ Apache WSIF, Apache Axis C/C++, JWSDL/WSDL4J Apache Woden Paul Fremantle — Building an Enterprise Service Bus Using Web Services and Apache Synapse v2 Page 2 Colorado Software Summit: October 22 – 27, 2006 © Copyright 2006, WSO2 Inc. Apache Synapse The Small Print Synapse is an effort undergoing incubation at the Apache Software Foundation (ASF), sponsored by the Web Services PMC. Incubation is required of all newly accepted projects until a further review indicates that the infrastructure, communications, and decision making process have stabilized in a manner consistent with other successful ASF projects. While incubation status is not necessarily a reflection of the completeness or stability of the code, it does indicate that the project has yet to be fully endorsed by the ASF. In other words… an incubator project for the moment Paul Fremantle — Building an Enterprise Service Bus Using Web Services and Apache Synapse v2 Page 3 Colorado Software Summit: October 22 – 27, 2006 © Copyright 2006, WSO2 Inc. Contents What is an ESB? A Web services based ESB Connect, Manage, Transform Apache Synapse ¾Structure and model ¾Deployment ¾Configuration ¾Programming model Examples and demo Paul Fremantle — Building an Enterprise Service Bus Using Web Services and Apache Synapse v2 Page 4 Colorado Software Summit: October 22 – 27, 2006 © Copyright 2006, WSO2 Inc. What is an ESB? Paul Fremantle — Building an Enterprise Service Bus Using Web Services and Apache Synapse v2 Page 5 Colorado Software Summit: October 22 – 27, 2006 © Copyright 2006, WSO2 Inc. A Common ESB Definition “Any to any data connectivity and transformation (including Web Services) built on an advanced, proven, reliable middleware infrastructure” Paul Fremantle — Building an Enterprise Service Bus Using Web Services and Apache Synapse v2 Page 6 Colorado Software Summit: October 22 – 27, 2006 © Copyright 2006, WSO2 Inc. ESB Definition “Any to any data connectivity and transformation (including Web Services) built on an advanced, proven, reliable middleware infrastructure” which means Our existing middleware re-branded as an SOA platform, with some new web services adapters at the edges Paul Fremantle — Building an Enterprise Service Bus Using Web Services and Apache Synapse v2 Page 7 Colorado Software Summit: October 22 – 27, 2006 © Copyright 2006, WSO2 Inc. So what is an Enterprise Service Bus? Paul Fremantle — Building an Enterprise Service Bus Using Web Services and Apache Synapse v2 Page 8 Colorado Software Summit: October 22 – 27, 2006 © Copyright 2006, WSO2 Inc. A Bus Bus Paul Fremantle — Building an Enterprise Service Bus Using Web Services and Apache Synapse v2 Page 9 Colorado Software Summit: October 22 – 27, 2006 © Copyright 2006, WSO2 Inc. Busbar Paul Fremantle — Building an Enterprise Service Bus Using Web Services and Apache Synapse v2 Page 10 Colorado Software Summit: October 22 – 27, 2006 © Copyright 2006, WSO2 Inc. Bus Paul Fremantle — Building an Enterprise Service Bus Using Web Services and Apache Synapse v2 Page 11 Colorado Software Summit: October 22 – 27, 2006 © Copyright 2006, WSO2 Inc. “The Original ESB” Paul Fremantle — Building an Enterprise Service Bus Using Web Services and Apache Synapse v2 Page 12 Colorado Software Summit: October 22 – 27, 2006 © Copyright 2006, WSO2 Inc. What Is Good about ESBs? SOA based integration ¾More than just message passing ¾Metadata about the contracts involved • e.g. WSDL, Schema, Policy Bus model is very powerful ¾Every message goes into the “bus” and ends up in the right place Paul Fremantle — Building an Enterprise Service Bus Using Web Services and Apache Synapse v2 Page 13 Colorado Software Summit: October 22 – 27, 2006 © Copyright 2006, WSO2 Inc. So Why Comments Like This: Anne Thomas Manes: ¾ “I do not believe that an ESB is an essential component of SOA. When it comes right down to it, you don't need any new products to do SOA. After all, SOA is about design, not technology.” ¾ “For the most part, ‘ESB’ is a marketing term.” ¾ “But by 2003, a bunch of other vendors hijacked the term and applied it to their own integration products.” Are ESBs a new lock-in point? Paul Fremantle — Building an Enterprise Service Bus Using Web Services and Apache Synapse v2 Page 14 Colorado Software Summit: October 22 – 27, 2006 © Copyright 2006, WSO2 Inc. Service Oriented Architecture Service Service Service Contract Contract Contract ESB Process Portal Call Center Management Paul Fremantle — Building an Enterprise Service Bus Using Web Services and Apache Synapse v2 Page 15 Colorado Software Summit: October 22 – 27, 2006 © Copyright 2006, WSO2 Inc. The Only Common Data Model Service Service Service Contract Contract Contract XML, XML Schema Process Portal Call Center Management Paul Fremantle — Building an Enterprise Service Bus Using Web Services and Apache Synapse v2 Page 16 Colorado Software Summit: October 22 – 27, 2006 © Copyright 2006, WSO2 Inc. The Only Common Interaction Models Service Service Service Contract Contract Contract HTTP 1.1 200 OK <soap:Envelope> Process Portal Call Center Management Paul Fremantle — Building an Enterprise Service Bus Using Web Services and Apache Synapse v2 Page 17 Colorado Software Summit: October 22 – 27, 2006 © Copyright 2006, WSO2 Inc. What Do You Need for Enterprise Integration? Connectivity Data formats Security Reliability Routing Metadata Management Paul Fremantle — Building an Enterprise Service Bus Using Web Services and Apache Synapse v2 Page 18 Colorado Software Summit:What October 22 – 27, 2006 Do You Need for © Copyright 2006, WSO2 Inc. Enterprise Integration? Connectivity ¾ Get data and messages from A to B Data formats ¾ Understand what shape the data is in Security ¾ Ensure end-to-end confidentiality, authentication, integrity Reliability ¾ Ensure message delivery Routing ¾ Decouple systems from the physical topology Metadata ¾ Understand what systems are there and what they offer and use Paul Fremantle — Building an Enterprise Service Bus Using Web Services and Apache Synapse v2 Page 19 Colorado Software Summit: October 22 – 27, 2006 © Copyright 2006, WSO2 Inc. What Do You Get from Web Services? Connectivity ¾ Lightweight universal connectivity ¾ HTTP, REST, SOAP, XOP/MTOM (binary data) Data formats ¾ Common data model and data description language ¾ XML, XML Schema Security ¾ Encryption, Authentication, Single Signon ¾ WS-Security, WS-Trust, WS-SecureConversation Reliability ¾ Exactly once in-order delivery ¾ WS-ReliableMessaging Routing ¾ To/From/ReplyTo headers ¾ WS-Addressing Metadata ¾ Functional and non-functional description, capabilities and requirements ¾ WSDL, WS-Policy, XML Schema Paul Fremantle — Building an Enterprise Service Bus Using Web Services and Apache Synapse v2 Page 20 Colorado Software Summit: October 22 – 27, 2006 © Copyright 2006, WSO2 Inc. So What Is Synapse? A Web Service intermediary Synapse.xml Ethernet Ethernet User Synapse mediators Extensions Paul Fremantle — Building an Enterprise Service Bus Using Web Services and Apache Synapse v2 Page 21 Colorado Software Summit: October 22 – 27, 2006 © Copyright 2006, WSO2 Inc. The Synapse Pattern of an ESB Java J2EE JMS Axis2/Java S JAXWS Axis2/J CICS Legacy management DB2 Axis/C routing transformation PHP Web validation SAP security policy IMS S S Partner .net Gateway XML REST SOAP MTOM JSON Paul Fremantle — Building an Enterprise Service Bus Using Web Services and Apache Synapse v2 Page 22 Colorado Software Summit: October 22 – 27, 2006 © Copyright 2006, WSO2 Inc. A Web Services Mediation Engine TP MT manage HT OM ST/ RE route S OAP/W /JMS SS transform XML auth XSLT, E4X SOAP/H HTTP x POJO validate TTP SOAP/ p x S a ge th e p r e g r java o S MS f l O /J AP AP JMX /W SO SS Paul Fremantle — Building an Enterprise Service Bus Using Web Services and Apache Synapse v2 Page 23 Colorado Software Summit: October 22 – 27, 2006 © Copyright 2006, WSO2 Inc. What Does Synapse Do? Connect Manage Transform Paul Fremantle — Building an Enterprise Service Bus Using Web Services and Apache Synapse v2 Page 24 Colorado Software Summit: October 22 – 27, 2006 © Copyright 2006, WSO2 Inc. Connect Route messages ¾ Based on XPath, Regex, etc. Deal with mismatch ¾ Initiate/Terminate RM, WS-Sec Switch ¾ POX or REST to SOAP to JSON ¾ JMS to HTTP to SMTP Virtualisation ¾ Virtual URI to real URI mapping Paul Fremantle — Building an Enterprise Service Bus Using Web Services and Apache Synapse v2 Page 25 Colorado Software Summit: October 22 – 27, 2006 © Copyright 2006, WSO2 Inc. Connect Example <endpoint name=“realService" address=“http://wso2.com/axis2/services/myRealService”> </endpoint> <proxy name=“myVirtualService" description=“virtual endpoint“ transports="all"> <target endpoint=“realService"/> </proxy> Synapse