1 Introduction to Service Component Architecture Feature Pack for WebSphere Application Server & SCA Tooling in RAD Mike Edwards and Sara Mitchell - IBM Hursley 18 March 2010 WebSphere User Group – Bedfont Lakes
2
3 Agenda What is Service Component Architecture? Scenarios and Examples Demonstration of SCA SCA - Products and Standardization
4 What SCA is executable executable model for assembling services – composites provide language to compose and configure service components – handles service dependencies component programming model Simplified component programming model for implementing services – BPEL processes, Java TM POJOs, EJBs, COBOL, PHP scripts, C++ apps, JavaScript & AJAX, XSLT… policycommunication distributed deployment Late binding of policy and communication methods, with distributed deployment model
5 Complexity Rigid, brittle architectures Inability to evolve What We have Today
6 Why SCA makes life simpler One way to look at SCA is that it takes details of – access methods and endpoints – implementations and configuration – policy such as encryption, authentication – …and moves them into middleware layer Application developers write business logic: code that actually builds value – details of using services handled by SCA – late binding: as details change, applications (and developers who wrote them) aren’t affected – "no plumbing in the code"
7 What we want to get to Well-defined interfaces with business-level semantics Standardized communication protocols Flexible recombination of services to enhance software flexibility
8 SCA cuts through the middleware jungle As your SOA gets more complex, developers have to learn more and more APIs & interfaces – In Java TM alone: EJBs, RMI, JCA, JAX-WS, JMS... single programming model for using services SCA gives developers single programming model for using services for all aspects of service lifecycle: – Construction – Assembly – Deployment "minimal middleware"
9 Service Component Architecture (SCA): Simplified Programming Model for SOA model for: building service components assembling components into applications deploying to (distributed) runtime environments – Service components built from new or existing code using SOA principles – vendor-neutral – supported across the industry – language-neutral – components written using any language – technology-neutral – use any communication protocols and infrastructure to link components
10 Agenda What is Service Component Architecture? Scenarios and Examples Demonstration of SCA SCA - Products and Standardization
11 SCA Service Interaction
12 Simple Example
13 Java or Spring
14
15 Java Implementation Example: Service Interface
16 Java Implementation Example – Implementation (part 1)
17 Java Implementation Example – Implementation (part 2)
18 SCA (Java) Implementation principles Code only to business interfaces – “Don’t program to SCA, just program…” – Use Java idioms – Minimal middleware APIs used only in special cases Components declare both the services they offer and references to other services they need Injection of required service References and Property values – via constructor / via setter methods / via direct field injection Java annotations for SCA elements – services, references, properties – + more advanced features such as intents, bindings Principles apply to other languages
19 Rational Application Developer Rational Application Developer With “Service Component Architecture Development Tools” option selected at install With either – WebSphere Application Server Test Environment OR – WebSphere Application Server WebSphere Application Server V7 Feature Pack for Service Component Architecture V1.0.1 Today I'm using Rational Application Developer with locally installed WebSphere Application Server v rather than the Test Environment with Feature Pack for Service Component Architecture V
20 Agenda What is Service Component Architecture? Scenarios and Examples Demonstration of SCA SCA - Products and Standardization
21 "Hello World" with Rational Application Developer and SCA Building and deploying a simple SCA application with a single HelloWorld component We'll build and deploy this component and send a message to the web service that results This is a sample in RAD so you can try it for yourself implementation.java servic e binding.ws HelloWorld component
22 Creating the HelloWorld project 1
23 Creating the HelloWorld project 2
24 Empty Project
25 Define service interface – Just a normal Java interface in this case
26 Making the service SCA Java annotation
27 Create a composite
28 Create a component
29 The HelloWorld Component
30 Complete the implementation
31 Add a Web service binding
32 Create a contribution
33 Project now complete and read to be deployed
34 WebSphere Application Server V7.0 Feature Pack for Service Component Architecture WebSphere Application Service V7.0 – With Fix Pack With – WebSphere Application Server V7 Feature Pack for Service Component Architecture V1.0.1 The GA Version with the latest fixpack Need to create an SCA augmented server profile in order to use SCA features Today I'm using WebSphere Application Server + Feature Pack for Service Component Architecture V
35 Deploying to WebSphere Application Server from Rational Application Developer
36 The app installed in WebSphere
37 Importing the asset Remember to add a relationship to the SpringSharedLibAsset.jar
38 Add Assets to the BLA
39 Getting the WSDL for the service
40 Send message to HelloWorld service with Web Service Explorer
41 Wiring one component to another
42 JMS binding WebSphere application server will generate the JMS resources automatically when composite is deployed. ● Use a JMS binding to connect two SCA components ● Or, more commonly, use the JMS binding to integrate existing non-SCA JMS consumers and producers
43 Using implementation.spring
44 Agenda What is Service Component Architecture? Scenarios and Examples Demonstration of SCA SCA - Products and Standardization
45 A little History SCA originally developed by IBM – included in WPS, WESB SCA cross-industry specifications developed by Open SOA collaboration – "1.0" SCA specifications published in 2007 Open SOA specifications implemented – Open Source – Apache Tuscany – WebSphere Application Server V7 Feature Pack for Service Component Architecture – Rational Application Developer v7.5.3 SCA undergoes formal standardization at OASIS – Open CSA member section formed, 2007 – OASIS SCA technical committees working on 1.1 SCA specifications – all specifications completed Public Review in 3Q 2009 – aim to complete 1.1 standards by mid 2010
46 SCA Technology and Specifications
47 The SCA Specifications
48 SCA and IBM Products WebSphere Application Server V7 Feature Pack for Service Component Architecture V1.0 – – Support for Java POJO and Composite implementations Web services and EJB bindings. WebSphere Application Server V7 Feature Pack for Service Component Architecture V1.0.1 – Fixpak 7 – IM Repository – Adds support for Spring, JEE and Web2.0 component implementations JMS, Web2.0 (JSONRPC) and RESTful (Atom, RSS) bindings Rational Application Developer GA – version – tools support for applications on WAS SCA Feature Pack Current support is for SCA 1.0 specifications (ie Open SOA versions)
49 SCA and IBM Products WebSphere Process Server WebSphere ESB – current releases contain older proprietary version of SCA – support for BPEL components – support for Java components – support for Web services, JMS, JCA
50 Summary SCA: agile approach to developing systems using SOA – wide industry support – standardization taking place at OASIS SCA in RAD tooling – RAD – WID for earlier SCA version SCA available in WebSphere – WebSphere Application Server 7 - SCA Feature Pack – WebSphere Process Server, WebSphere ESB SCA also available – in Open Source at Apache, Eclipse & elsewhere – from other industry vendors
51 Q & A
52 Useful links OASIS Open CSA OASIS SCA Technical Committees V1 level of SCA specifications Useful papers and interesting SCA information: OASIS Webinar downloads: WebSphere Application Server v7.0 Feature Pack for Service Component Architecture v Rational Application Developer
53 Backup
54 SCA and Open Source SCA runtime implemented by: – Apache Tuscany both V1.0 (Open SOA) and V1.1 (OASIS) specifications Java, C++, BPEL, Spring, Web 2.0 widgets, Scripting languages Web services, JMS, REST (Atom / JSON) – Fabric3 (at Codehaus) SCA tooling implemented by – Eclipse SOA Tools project
55 SCA Technology and Specifications
56 The SCA Specifications
57 A more interesting example – A banking app
58 Services and references in the banking app
59 More wiring References wired to services
60 Properties
61 Sending a message to the banking app