Building Service- Oriented Architectures with Java Technology
Total Page:16
File Type:pdf, Size:1020Kb
BBuuiillddiinngg SSeerrvviiccee-- OOrriieenntteedd AArrcchhiitteeccttuurreess wwiitthh JJaavvaa TTeecchhnnoollooggyy DDeecceemmbbeerr 55 -- 66,, 22000077 PPoorrttllaanndd && SSeeaattttllee Tom Barrett SOA/BI Technical Specialist SCJP, SCJD, SCWCD, SCEA Sun Microsystems – Dallas [email protected] Agenda • Registration/Appetizer - Beverage Buffet (4:00 - 4:15) • SOA Defined (4:15 - 4:30) • SOA Technologies (4:30 – 5:30) • Integration Framework: Java Business Integration (JBI) (5:30 – 6:15) • Open Source Implementation: Open ESB (6:15 – 6:45) • Wrap-up / Resources (6:45 - 7:00) 2 Agenda • Registration/Appetizer - Beverage Buffet (4:00 - 4:15) • SOA Defined (4:15 – 4:30) > What's the problem? > What is SOA? > How is it being implemented? • SOA Technologies (4:30 – 5:30) • Integration Framework: Java Business Integration (JBI) (5:30 – 6:15) • Open Source Implementation: Open ESB (6:15 – 6:45) • Wrap-up / Resources (6:45 - 7:00) 3 What's the Problem? Accidental Architecture Credit Card Mortgage Balance Fraud Credit Credit Balance Interest Check Detection Check Check Check Calc Customer Back- Partner Partner Back- Customer Data End Credit Credit End Data System Data Data System 4 What's the Problem? Services-Oriented Architecture Auto Mutual Loans Bill Pay Stocks Funds Composite Applications Credit Card Mortgage Reusable Services Payment Trade Credit Fraud Access Interest Balance Customer Execution Management Check Detection Service Check Data Service Service Calc Service Internet Increased Agility Partner Credit Data Back-End System Back-End System Customer Data 5 What's the Problem? IT is Limiting the Business • Inflexibility of IT Infrastructure • Complexity of Integration Projects • Integration Costs • Time to Market • Limited Partnering Flexibility 6 Agenda • Registration/Appetizer - Beverage Buffet (4:00 - 4:15) • SOA Defined (4:15 – 4:30) > What's the problem? > What is SOA? > How is it being implemented? • SOA Technologies (4:30 – 5:30) • Integration Framework: Java Business Integration (JBI) (5:30 – 6:15) • Open Source Implementation: Open ESB (6:15 – 6:45) • Wrap-up / Resources (6:45 - 7:00) 7 What is SOA? Wikipedia Definition • Evolution of distributed computing and modular programming • Build applications out of software services that are: > Relatively large-grained (like: Fraud Detection, Payment Management, Trade Execution) > Intrinsically unassociated units of functionality (no embedded calls to other services) • Protocols are defined which describe how services can “talk” to each other • Relies on a business process expert to sequence services (orchestrate) to meet business needs http://en.wikipedia.org/wiki/Service-oriented_architecture 8 What is SOA? Sun Definition • Track-tested architectural style for building applications using services available in a network (“The Network is the Computer”) • Promotes loose-coupling between software components • Service implements a well-defined business functionality • Implementation is shielded by a public interface definition (signature / contract) • Services form building blocks of SOA applications • Composite applications can be built by aggregating services • Open standards have emerged to support web services implementation http://java.sun.com/developer/technicalArticles/WebServices/soa/ 9 What's is SOA? Catalyst • Business: “SOA is a catalyst for business transformation enabling your business to thrive on change ... SOA is a technology-based embodiment of your business” • IT: “IT must change its primary operating mode from delivering applications to a mode of delivering strategic business flexibility...” 10 Agenda • Registration/Appetizer - Beverage Buffet (4:00 - 4:15) • SOA Defined (4:15 – 4:30) > What's the problem? > What is SOA? > How is it being implemented? • SOA Technologies (4:30 – 5:30) • Integration Framework: Java Business Integration (JBI) (5:30 – 6:15) • Open Source Implementation: Open ESB (6:15 – 6:45) • Wrap-up / Resources (6:45 - 7:00) 11 How is SOA Being Implemented? Enterprise Service Bus (ESB) “An ESB is a Web-services-capable middleware infrastructure that supports intelligent program-to-program communication and mediates the relationships among loosely-coupled (SOA) and uncoupled (event-driven) business components.” - Roy Schulte Service-Oriented Architecture Event-Driven Architecture 12 How is SOA Being Implemented? ESB Characteristics • Typically implemented within one enterprise • Serves as an enterprise architecture where business services are developed with SOA in mind • Supports web services standards • Scales to enterprise-class performance • Fosters service and protocol pluggability • Provides development, deployment and management tools • Provides value-added technical services 13 How is SOA Being Implemented? ESB Value-Added Services Resource Channel Adapters Adapters Security Synchronization S e r rs Logging Correlation v e i c d i e v Messaging C o Monitoring o Pr n s e Alerting Communication u c i m v r e Transactions Transformation r s Se Routing BPM Load Balancing BAM 14 How is SOA Being Implemented? Gartner Perspective User Vendor Extensible Assemblies Suites Suites (Best of Breed) (Application Platform Suites) (Modules) 1990 2000 2010 Source: Gartner Inc., " The Battle for Platform Domination: Application Servers, SOA and Platforms Suites", Y. Natis, December 2006 15 How is SOA Being Implemented? Slowly and Cautiously Accidental Layered Rigid Extensible Silo-Oriented Service-Oriented Access Process Service Resource • Old approaches are deeply entrenched • SOA demands better linkages between IT and business units • Standards are still evolving • New technologies can be daunting 16 Agenda • Registration/Appetizer - Beverage Buffet (4:00 - 4:15) • SOA Defined (4:15 – 4:30) • SOA Technologies (4:30 – 5:30) > Web Services for service delivery > Business Process Execution Language (BPEL) for orchestration • Integration Framework: Java Business Integration (JBI) (5:30 – 6:15) • Open Source Implementation: Open ESB (6:15 – 6:45) • Wrap-up / Resources (6:45 - 7:00) 17 SOA Technologies Web Services: Definition • "A software system designed to support interoperable machine to machine interaction over a network." (W3C) • Clients and servers communicate using XML messages formatted ● SOAP (Simple Object Access Protocol): per the SOAP standard XML-based, message envelope format • WSDL description of the supported ● WSDL (Web Services Description Language): XML format for describing service interfaces. operations is available to the client Typically used to generate server and client code, and for configuration ● UDDI (Universal Description Discovery and Integration): protocol for publishing and discovering metadata about Web services http://en.wikipedia.org/wiki/Web_services 18 SOA Technologies Web Services: WSDL – Interface Definition Language > WSDL (Web Service Description Language) is a cornerstone for web services- based SOA implementations > W3C recommended standard way of defining an interface for web services > XML document describing network services as a set of endpoints > Endpoints are gateways for messages containing either document-oriented or procedure-oriented information > Endpoints described in abstract terms as operations which are bound to a concrete network protocol and message format 19 SOA Technologies Web Services: WSDL (Abstract vs. Concrete) Abstract Concrete 20 SOA Technologies Web Services: XSD Example XML Schema Definition (XSD) 21 SOA Technologies Web Services: WSDL Example - Messages ● Describes messages used by the web service ● Provides the data elements used by operations 22 SOA Technologies Web Services: WSDL Example - Operations ● Describes operations that can be performed and the messages passed ● Specifies multiple message elements to define a one-way or round-trip operation 23 SOA Technologies Web Services: WSDL Example – On the Wire ● Shows concrete specifics of how the service is implemented on the wire ● Defines message format and protocol details for each operation ● Transport declares how SOAP message will be sent ● Style specifies format of SOAP message 24 SOA Technologies Web Services: WSDL Example - Location ● Declares the address for invoking the service ● Usually provides a URL for invoking via SOAP 25 SOA Technologies Web Services: SOAP Example SOAP Messages 26 SOA Technologies Web Services: WSDL for Interface Design • Point my IDE at the service endpoint (http://localhost:8080/CalculateLoanPayment/CalculatePaymentServiceService?wsdl) • Tool automatically generates required client code to send and receive a SOAP message using the endpoint • Use the generated client component: > Provide it the inputs that the WSDL specified > Execute it > Use the delivered output specified in the WSDL 27 SOA Technologies Web Services: Interoperability WS-I Basic Profile • Specification from the Web Services Interoperability industry consortium (WS-I) • Provides interoperability guidance for SOAP, WSDL and UDDI • Version 1.0 appeared in 2004, 1.1 finalized in 2006 • Sample guidelines: > R1141 A MESSAGE MUST be sent using either HTTP/1.1 or HTTP/1.0. > R1140 A MESSAGE SHOULD be sent using HTTP/1.1. > R1132 A HTTP request MESSAGE MUST use the HTTP POST method. > R9980 An ENVELOPE MUST conform to the structure specified in SOAP 1.1 Section 4, "SOAP Envelope" > R1015 A RECEIVER MUST generate a fault if they encounter an envelope whose document element is not soap:Envelope. 28 SOA Technologies Web Services: Interoperability Web Services Interoperability Technologies (WSIT) • Web services interoperability effort