building service- building service- oriented architectures

84
Building Service- Building Service- Oriented Architectures Oriented Architectures with Java Technology with Java Technology December 5 - 6, 2007 December 5 - 6, 2007 Portland & Seattle Portland & Seattle Tom Barrett SOA/BI Technical Specialist SCJP, SCJD, SCWCD, SCEA Sun Microsystems – Dallas [email protected]

Upload: zubin67

Post on 20-Aug-2015

1.135 views

Category:

Documents


4 download

TRANSCRIPT

Building Service-Building Service-Oriented Architectures Oriented Architectures with Java Technologywith Java TechnologyDecember 5 - 6, 2007December 5 - 6, 2007Portland & SeattlePortland & Seattle Tom BarrettSOA/BI Technical SpecialistSCJP, SCJD, SCWCD, SCEASun Microsystems – [email protected]

2

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)

3

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)

4

What's the Problem?Accidental Architecture

CustomerData

CustomerData

BalanceCheck

CreditCheck

FraudDetection

Partner Credit Data

Partner Credit Data

BalanceCheck

CreditCheck

InterestCalc

Mortgage

Back-End

System

Back-End

System

Credit Card

5

What's the Problem?Services-Oriented Architecture

Reusable Services

Credit Card Mortgage

Partner Credit Data

Customer Data Service

Credit Check

Fraud Detection

Customer Data

PaymentManagement

Service

TradeExecution

Service

Internet

Bill PayAuto

Loans StocksMutualFunds

IncreasedAgility

Interest Calc

Balance Check

Back-End System Back-End System

CompositeApplications

AccessService

6

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

7

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)

8

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

9

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

implementationhttp://java.sun.com/developer/technicalArticles/WebServices/soa/

10

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...”

11

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)

12

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

13

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

14

How is SOA Being Implemented?ESB Value-Added Services

SecurityLogging

MonitoringAlerting

Transactions

RoutingLoad Balancing

SynchronizationCorrelation

Messaging

Communication

Transformation

BPM

BAM

ResourceAdapters

ChannelAdapters

Servi

ce P

rovid

ers

Service Consumers

15

How is SOA Being Implemented?Gartner Perspective

UserAssemblies(Best of Breed)

VendorSuites

(Application Platform Suites)

ExtensibleSuites(Modules)

1990 2000 2010

Source: Gartner Inc., " The Battle for Platform Domination: Application Servers, SOA and Platforms Suites", Y. Natis, December 2006

16

How is SOA Being Implemented?Slowly and Cautiously

AccidentalRigid

Silo-Oriented

LayeredExtensible

Service-Oriented

AccessProcessServiceResource

• Old approaches are deeply entrenched• SOA demands better linkages between IT and business units• Standards are still evolving• New technologies can be daunting

17

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)

18

SOA TechnologiesWeb 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 per the SOAP standard

• WSDL description of the supported operations is available to the client

http://en.wikipedia.org/wiki/Web_services

● SOAP (Simple Object Access Protocol): XML-based, message envelope format

● WSDL (Web Services Description Language): XML format for describing service interfaces. 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

19

SOA TechnologiesWeb 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

20

SOA TechnologiesWeb Services: WSDL (Abstract vs. Concrete)

Abstract

Concrete

21

SOA TechnologiesWeb Services: XSD Example

XML Schema Definition (XSD)

22

SOA TechnologiesWeb Services: WSDL Example - Messages

● Describes messages used by the web service

● Provides the data elements used by operations

23

SOA TechnologiesWeb 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

24

SOA TechnologiesWeb 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

25

SOA TechnologiesWeb Services: WSDL Example - Location

● Declares the address for invoking the service

● Usually provides a URL for invoking via SOAP

26

SOA TechnologiesWeb Services: SOAP Example

SOAP Messages

27

SOA TechnologiesWeb 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

28

SOA TechnologiesWeb Services: Interoperability

• 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.

WS-I Basic Profile

29

SOA TechnologiesWeb Services: Interoperability

https://wsit-docs.dev.java.net/releases/m5/WSITTutorial.pdf

• Web services interoperability effort to develop Java clients and service providers that interoperate with Microsoft .NET clients and service providers

• Focuses on selected facets of WS-* to help customers that have large investments in both Java an .NET

• Now offered as “Metro”:> JAX-WS reference

implementation> WSIT

Web Services Interoperability Technologies (WSIT)

30

SOA TechnologiesWeb Services: Demonstration Scenario

• Build two web services:> DetermineRateService (EJB module)> CalculatePaymentService (web module)

• Deploy modules to application server • View generated schema definitions and WSDLs• Test web services

DetermineRateService

CalculatePaymentService

loanType (String)

interestRate (double)loanAmount (double)periodInYears (int) monthlyPayment (double)

interestRate (String)

31

RESTDefinition

• REpresentational State Transfer• Architectural style defining rules for

defining and addressing resources• Each resource is uniquely

addressable as a URI• Client/server, stateless and

cacheable• No protocol is assumed, but HTTP

is usually involved

http://en.wikipedia.org/wiki/REST http://www.ics.uci.edu/~fielding/pubs/dissertation/top.htm

"Representational State Transfer is intended to evoke an image of how a well-designed Web application behaves: - A network of web pages (a virtual

state-machine)- Where the user progresses through an

application by selecting links (state transitions)

- Resulting in the next page (next state of the application) being transferred to the user and rendered for their use."

- Roy Fielding (REST inventor)

32

RESTDefinition: Example - Parts Depot• Get Parts List

> Sends: http://www.parts-depot.com/parts> Receives:

<?xml version="1.0"?> <p:Parts xmlns:p="http://www.parts-depot.com" xmlns:xlink="http://www.w3.org/1999/xlink"> <Part id="00345" xlink:href="http://www.parts-depot.com/parts/00345"/> <Part id="00346" xlink:href="http://www.parts-depot.com/parts/00346"/> <Part id="00347" xlink:href="http://www.parts-depot.com/parts/00347"/> <Part id="00348" xlink:href="http://www.parts-depot.com/parts/00348"/> </p:Parts>

• Get Detailed Parts Data> Sends: http://www.parts-depot.com/parts/00345> Receives:

<?xml version="1.0"?> <p:Part xmlns:p="http://www.parts-depot.com" xmlns:xlink="http://www.w3.org/1999/xlink"> <Part-ID>00345</Part-ID> <Name>Widget-A</Name> <Description>This part is used within the frap assembly</Description> <Specification xlink:href="http://www.parts-depot.com/parts/00345/specification"/> <UnitCost currency="USD">0.10</UnitCost> <Quantity>10</Quantity> </p:Part>

Building Web Services the REST WayRoger L.Costello -- http://www.xfront.com/REST-Web-Services.html

Each hyperlink traversal puts the application into a different state

33

RESTDefinition: Benefits

• Improves response times and server loading due to caching• Improves server scalability by reducing need to maintain state • Requires less client-side software because a browser can

access any application and any resource• Doesn't depend on additional messaging frameworks atop HTTP• Provides equivalent functionality to alternatives (SOAP)• Does not utilize a separate resource discovery mechanism due to

the use of hyperlinks in content

http://en.wikipedia.org/wiki/REST

34

SOA TechnologiesWeb Services: REST Adoption

• “Over the past 2.5 years, the REST/SOAP call ratio to AWS (Amazon Web Services) has held pretty constant at 80/20.” http://www.jeff-barr.com/?p=96 (November 2004)

• “Q: Does Yahoo! plan to support SOAP?A: Not at this time. We may provide SOAP interfaces in the future, if there is significant demand. We believe REST has a lower barrier to entry, is easier to use than SOAP, and is entirely sufficient for these services.” http://developer.yahoo.com/faq/

35

SOA TechnologiesWeb Services: Tim Bray on REST Adoption

• What do you think we should do about SOA?> “Don't do anything. 'SOA' may have meant something once but it's just vendor b!ul#h%t now.”> Architects thought “web” made “web services” sound lightweight and too easy to set up> So, they got uncomfortable and made web services more “Enterprisey”> “Web” part is more important than “services” part so “SOA isn't the future, Web style is”

http://www.tbray.org/ongoing/When/200x/2006/04/17/SOA-or-not

36

SOA TechnologiesRest Tooling: A Little Awkward from Java

public class Artist extends HttpServlet {

public enum SupportedOutputFormat {XML, JSON};

protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String accept = request.getHeader("accept").toLowerCase(); String acceptableTypes[] = accept.split(","); SupportedOutputFormat outputType = null; for (String acceptableType: acceptableTypes) { if (acceptableType.contains("*/*") || acceptableType.contains("application/*") || acceptableType.contains("application/xml")) { outputType=SupportedOutputFormat.XML; break; } else if (acceptableType.contains("application/json")) { outputType=SupportedOutputFormat.JSON; break; } } if (outputType==null) response.sendError(415); String path = request.getPathInfo(); String pathSegments[] = path.split("/"); String artist = pathSegments[1]; if (pathSegments.length < 2 && pathSegments.length > 3) response.sendError(404); else if (pathSegments.length == 3 && pathSegments[2].equals("recordings")) { if (outputType == SupportedOutputFormat.XML) writeRecordingsForArtistAsXml(response, artist); else writeRecordingsForArtistAsJson(response, artist); } else { if (outputType == SupportedOutputFormat.XML) writeArtistAsXml(response, artist); else writeArtistAsJson(response, artist); } } private void writeRecordingsForArtistAsXml(HttpServletResponse response, String artist) { ... } private void writeRecordingsForArtistAsJson(HttpServletResponse response, String artist) { ... } private void writeArtistAsXml(HttpServletResponse response, String artist) { ... } private void writeArtistAsJson(HttpServletResponse response, String artist) { ... }}

JSR 311:JAX-RS: The Java™ API forRESTful Web Services (TS-6411) Marc Hadley, Paul Sandoz, Roderico Cruz Java One 2007 http://blogs.sun.com/sandoz/resource/TS-6411.pdf

See if accept header should be processed as XML or JSON (JavaScript Object Notation)

Not Found

Unsupported Media TypeParse the pathInfo

URL specifies “recordings” so deliver recordings in response

If not “recordings”, then deliver artist information is response

37

SOA TechnologiesRest Tooling: A Better Way

• Goals> High level expression> Declarative> Clear mapping to REST concepts> Generates the boilerplate code

• Approach> JAX-RS: Java API for RESTful Web Services> JSR 311 (Draft April 2007)> Jersey is open source reference implementation

JSR 311:JAX-RS: The Java™ API forRESTful Web Services (TS-6411) Marc Hadley, Paul Sandoz, Roderico Cruz Java One 2007 http://blogs.sun.com/sandoz/resource/TS-6411.pdf

38

SOA TechnologiesRest Tooling: Early Look at JAX-RS

@UriTemplate("/artists/{id}")@ProduceMime("application/xml")public class Artist {

@HttpMethod InputStream getXml(@UriParam("id") String artist) { ... }

@HttpMethod @ProduceMime("application/json") InputStream getJson(@UriParam("id") String artist) { ... }

@HttpMethod @UriTemplate("recordings") InputStream getRecordingsXml(@UriParam("id") String artist) { ... }

@HttpMethod @ProduceMime("application/json") @UriTemplate("recordings") InputStream getRecordingsJson(@UriParam("id") String artist) { ... }}

JSR 311:JAX-RS: The Java™ API forRESTful Web Services (TS-6411) Marc Hadley, Paul Sandoz, Roderico Cruz Java One 2007 http://blogs.sun.com/sandoz/resource/TS-6411.pdf

39

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)

40

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)

41

SOA TechnologiesBPEL: Definition

• XML-based language for formally describing business processes and business integration

• Extends web service interactions to support orchestration and long-running business transactions

• History:> Inspired by IBM’s Web Services Flow Language (WSFL) and Microsoft’s XLANG> BPEL4WS (Business Process Execution Language for Web Services) was first

conceived in July 2002 with the release of the BPEL4WS 1.0 specification, a joint effort by IBM, Microsoft and BEA

> Evolved into WS-BPEL 2.0 in April 2007, as a standard now managed by OASIS (Organization for the Advancement of Structured Information Standards)

• Prerequisites for personal success: > XML> WSDL> Programming experience

42

SOA TechnologiesBPEL: Example

https://blueprints.dev.java.net/bpcatalog/ee5/soa/index.html

Oh my, sorta scary

43

SOA TechnologiesBPEL: Example

Code folding makes this a little more approachable, still scary though

44

SOA TechnologiesBPEL: Example

Now we're talkin' !

When the purchase order service receives the client request, the following activities are performed:1 Purchase order service provider

assigns the price for the request2 Purchase order service provider

invokes the inventory service to check inventory status

3 Inventory service provider checks availability of an item

4 If the incoming purchase order's orderDescription value starts with OrderVal, then the order's status is available in the inventory

5 Based on the result from the inventory service, the purchase order service provider responds with the fulfilled purchase order

Based on Business Process Modeling Notation (BPMN)

45

SOA TechnologiesBPEL: ExampleWhen the purchase order service receives the client request, the following activities are performed:1 Purchase order service provider

assigns the price for the request2 Purchase order service provider

invokes the inventory service to check inventory status

3 Inventory service provider checks availability of an item

4 If the incoming purchase order's orderDescription value starts with OrderVal, then the order's status is available in the inventory

5 Based on the result from the inventory service, the purchase order service provider responds with the fulfilled purchase order

Receive

<receive name="sendPurchaseOrder" partnerLink="POServicePLink" portType="pos:purchaseOrderPT" operation="sendPurchaseOrder" variable="purchaseOrderRequest" createInstance="yes"></receive>

46

SOA TechnologiesBPEL: Example

BPEL: Now we're talkin'

When the purchase order service receives the client request, the following activities are performed:1 Purchase order service provider

assigns the price for the request2 Purchase order service provider

invokes the inventory service to check inventory status

3 Inventory service provider checks availability of an item

4 If the incoming purchase order's orderDescription value starts with OrderVal, then the order's status is available in the inventory

5 Based on the result from the inventory service, the purchase order service provider responds with the fulfilled purchase order

Assign

<assign name="Assign"> <copy> <from>49.98</from> <to>$purchaseOrderRequest.purchaseOrder/po:price</to> </copy> <copy> <from>$purchaseOrderRequest.purchaseOrder/po:orderId</from> <to>$inventoryServiceRequest.purchaseOrder/po:orderId</to> </copy> <copy> <from>$purchaseOrderRequest.purchaseOrder/po:customerId</from> <to>$inventoryServiceRequest.purchaseOrder/po:customerId</to> </copy> <copy> <from>$purchaseOrderRequest.purchaseOrder/po:orderDescription</from> <to>$inventoryServiceRequest.purchaseOrder/po:orderDescription</to> </copy> <copy> <from>$purchaseOrderRequest.purchaseOrder/po:price</from> <to>$inventoryServiceRequest.purchaseOrder/po:price</to> </copy></assign>

47

SOA TechnologiesBPEL: ExampleWhen the purchase order service receives the client request, the following activities are performed:1 Purchase order service provider

assigns the price for the request2 Purchase order service provider

invokes the inventory service to check inventory status

3 Inventory service provider checks availability of an item

4 If the incoming purchase order's orderDescription value starts with OrderVal, then the order's status is available in the inventory

5 Based on the result from the inventory service, the purchase order service provider responds with the fulfilled purchase order

<invoke name="inventoryService" partnerLink="requestInventoryPLink" portType="invs:inventoryPortType" operation="inventoryService" inputVariable="inventoryServiceRequest" outputVariable="inventoryServiceReply"></invoke>

Invoke

48

SOA TechnologiesBPEL: ExampleWhen the purchase order service receives the client request, the following activities are performed:1 Purchase order service provider

assigns the price for the request2 Purchase order service provider

invokes the inventory service to check inventory status

3 Inventory service provider checks availability of an item

4 If the incoming purchase order's orderDescription value starts with OrderVal, then the order's status is available in the inventory

5 Based on the result from the inventory service, the purchase order service provider responds with the fulfilled purchase order

<if name="Decision"> <condition>$inventoryServiceReply.inventoryPart/inv:inventoryStatus</condition> <sequence name="Case2"> <assign name="Assign1"> ... </assign> <reply name="sendPurchaseOrder.Reply1" partnerLink="POServicePLink" operation="sendPurchaseOrder" portType="pos:purchaseOrderPT" variable="purchaseOrderRequest"/> </sequence> <else> <sequence name="Case1"> <assign name="Assign2"> ... </assign> <reply name="sendPurchaseOrder.Reply" partnerLink="POServicePLink" portType="pos:purchaseOrderPT" operation="sendPurchaseOrder" variable="purchaseOrderFault" faultName="pos:cannotCompleteOrder /> </sequence> </else></if>

Decision

Reply

49

SOA TechnologiesBPEL: Advanced Topics

May contain multiple catch elements, each of which provides activities that perform exception handling for a specific type of error condition. Faults can be generated by:● Receipt of a WSDL-defined fault message● Explicitly triggered through the use of the throw element.

Fault Handler

50

SOA TechnologiesBPEL: Advanced Topics

Flow

Pick

Pick / onMessage Pick /

onAlarm

● Flow: a series of activities that can occur concurrently and are required to complete after all have finished executing

● Pick: enables a process to respond to events; can contain onMessage and onAlarm child elements that trigger process activity upon the arrival of specific types of messages (after a predefined period of time, or at a specific date and time)

51

SOA TechnologiesBPEL: Example• Build a BPEL process to orchestrate the two web services

we created earlier:> DetermineRateService> CalculatePaymentService

• Build a composite application containing our:> BPEL process> Two web services

• Deploy application to application server• Test application

DetermineRateService

CalculatePaymentService

loanType (String)

loanAmount (double)periodInYears (int)interestRate (double) monthlyPayment (double)interestRate (String)

loanAmount (double)periodInYears (int)loanType (String)

description (String) monthlyPayment

concat

52

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)

> Specification and Concepts> JBI and Service Component Architecture (SCA)

• Open Source Implementation: Open ESB (6:15 – 6:45)• Wrap-up / Resources (6:45 - 7:00)

53

Java Business Integration (JBI)Integration Landscape

• Current Integration Industry> Proprietary approaches> Converging on a service-based approach> Agreeing on standard messaging model

• Time is Right for a Standard> Java Community Process unveiled JSR 208 in June 2005> Goal: Allow developers to provide more sophisticated applications

and achieve better integration with other Java platform technologies> Standard “meta-container” for integrated services> Provides for plug-in components of two types:

> Engines supporting business logic and functions> Bindings providing communications protocols

54

Java Business Integration (JBI)1.0 Specification Focus

• Extends Java EE and Java SE with business integration service provider interfaces (SPIs)

• SPIs enable the creation of a Java business integration environment hosting composite applications involving technologies like:> BPEL> Rules> XSLT> Existing Java implementations

• Defines a static model of services with no control over:> Sequencing or timing conditions placed on the use of services> Interactions of components acting as consumers and providers

• Doesn't comprehend:> Coordination of services across multiple processes> Services distributed across different domains of control

55

Java Business Introduction (JBI)Vision

• Sun's foundation for Service-Oriented Architecture (SOA)• Component standard for service providers and service consumers• Foster ecosystem of portable, manageable and interoperable components• Composite applications (service assemblies) provide glue to orchestrate

services• Bottom Line:

> JBI pluggability: an open, extensible, pluggable platform that enables the collaboration of integration technology (like business process engines, document transform engines, B2B management and business rules) with Web services

> JBI service assembly: a single standard document describing the routing, artifacts, and services that make up an SOA “application.” Think of it as an SOA “super .jar.”

JBI is to do for integration what J2EE did for application development

56

Java Business Integration (JBI)Pre-SOA

57

Java Business Integration (JBI)With SOA

58

Java Business Integration (JBI)Foundation for SOA: With SOA

Service Engines: “containers” that provide business logic or transformation services. They may provide unique programming models.

Binding Components: enable communication protocols to allow to and from remote access

● Service Engines and Binding Components can function as service providers, consumers or both

● Separation of business logic from communication logic reduces implementation complexity and increases flexibility

59

Java Business IntegrationComponents: Service Engines & Binding Components

JBICore

ServicesNormalized Message RouterNormalized Message Router

J2EE™ Platform

Syste

mMa

nage

ment

Orchestration(BPEL)

Transformation(XSLT) J2EE Platform

AS2 JMSWS-I BasicSOAP

• The “JBI Bus”: a fast, reliable, in-memory messaging bus

• Mediates all message exchanges between consumers and providers

• Acts as a discovery service to help consumers find providers

• Message payloads are opaque data sent along to the receiver (no canonicalization)

• Normalization not performed when consumer and provider in same JBI container

60

Java Business Integration (JBI)Real World Scenario

“Build an SOA application from existing services” http://www.javaworld.com/javaworld/jw-10-2006/jw-1011-jbi.html By Adrien Louis, JavaWorld.com, 10/11/2006

• Online travel agency website

• Users can book flights and hotel rooms

• Workflow engine:> Connects to airline

to book flight> Connects to hotel

to book room> Sends email

confirmations to customers

61

Java Business Integration (JBI)2.0 Specification Kickoff• JSR 312 started in May 2007 and led by Sun• Goal: Enable a Java business integration environment for the creation

of composite applications. JSR 312 augments 1.0 to address open areas and new requirements

• Initial Expert Group> Apache> Adobe> DPWN SOP Group> Red Hat> James Strachan

• Road Map> Early Draft Review: Q3/2007> Public Review Draft: Q4/2007> Final Specification: late Q2/2008> Reference Implementation (RI) to be made available through the Open ESB project

> Pramati> Sun> WebMethods> EBM Websourcing> Eric Smith

> Brian O'Neil> TIBCO> TmaxSoft

62

Java Business Integration (JBI)2.0 Specification: Under Discussion

• Administration of JBI in clustered or distributed environments• Clarify and enhance JBI's role in creation, deployment and runtime

support of composite applications• Support requirements stemming from WS-Policy• Support Web 2.0 technologies and usage models• Facilitate performance optimizations by component and container implementers• Improve alignment with Java EE (e.g. use of transactions)• Explore message exchange handler/interceptor model• Address recoverability of message exchanges• Align with the Service Component Architecture (SCA) specifications with the goal of making JBI

2.0 a standard Java runtime for SCA• Provide full compatibility with OSGi Java-based service platform• Explore JBI 1.0 technical topics like: component life cycle, error handling, threading and NIO use• Explore WS-CDL (Choreography Definition Language) for designing (composing) applications,

modifying (recomposing) them and permitting run-time discovery and enforcement of dynamic interaction rules

JBI could form an optional or profile

extension to the Java EE platform at some stage in the future.

63

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)

> Specification and Concepts> JBI and Service Component Architecture (SCA)

• Open Source Implementation: Open ESB (6:15 – 6:45)• Wrap-up / Resources (6:45 - 7:00)

64

JBI and SCAWhat is SCA?• Specification describing a model for

building applications based upon SOA• Led by IBM and BEA outside the Java

Community Process• Approach:

> Implementation: develop components (in multiple languages) that offer capabilities (services)that are consumed via an interface (reference)

> Assembly: build applications by aggregating components by wiring references to services

• Specifications recently submitted to OASIShttp://www.osoa.org/pages/viewpage.action?pageId=46

65

JBI and SCAWhat is SCA?

• Composite assembled using a set of components• Components can be composites in their own right

http://www.osoa.org/download/attachments/35/SCA_AssemblyModel_V100.pdf?version=1

66

JBI and SCACoexistence and Synergy• SCA sees JBI as helpful in implementing SCA on the Java platform• JBI appreciates SCA service metadata as helpful in standardizing service

composition in general• SCA and JBI are not competitors as they focus on different aspects of

service composition• SCA and JBI have different target audiences:

> SCA: Developers, assemblers and deployers who build composite applications> JBI: Middleware and service providers who need to build containers and need to know

how to introduce new implementation types and bindings into the runtime

• SCA can be used with or without JBI and visa versa• JBI may be inappropriate if composite application includes lots of

components that don't run in a JVM• SCA may be inappropriate if the application is pure Java and is served well

by the metadata and assembly unit composition that JBI provides“Relationship of SCA and JBI” - March 2007 http://www.osoa.org/display/Main/Relationship+of+SCA+and+JBI

67

JBI and SCACoexistence and Synergy• SCA sees JBI as helpful in implementing SCA on the Java platform• JBI appreciates SCA service metadata as helpful in standardizing service

composition in general• SCA and JBI are not competitors as they focus on different aspects of

service composition• SCA and JBI have different target audiences:

> SCA: Developers, assemblers and deployers who build composite applications> JBI: Middleware and service providers who need to build containers and need to know

how to introduce new implementation types and bindings into the runtime

• SCA can be used with or without JBI and visa versa• JBI may be inappropriate if composite application includes lots of

components that don't run in a JVM• SCA may be inappropriate if the application is pure Java and is served well

by the metadata and assembly unit composition that JBI provides“Relationship of SCA and JBI” - March 2007 http://www.osoa.org/display/Main/Relationship+of+SCA+and+JBI

68

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)

> Project introduction/Components> Road Map

• Wrap-up / Resources (6:45 - 7:00)

69

Open ESB• Enterprise Service Bus runtime implemented atop the Java

Business Integration (JBI) foundation• Open Source-Based (https://open-esb.dev.java.net/)• Runs atop Glassfish/Sun Application Server• Open ESB Starter Kit available today in:

> Java Application Platform SDK> Java EE 5 SDK> Glassfish (Sun Application Server)> NetBeans 6.0 (includes tooling like BPEL, XSD, WSDL editors)

• Components:> Service Engines (BPEL, JMS, Java EE, ...)> Binding Components (HTTP/SOAP, FTP, JDBC ...)

70

Open ESBThe Ecosystem: Componentry

https://open-esb.dev.java.net/Components.html

71

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)

> Project introduction/Components> Road Map

• Wrap-up / Resources (6:45 - 7:00)

72

Road MapJava CAPS Evolution

Java CAPS

Open ESB

GlassFish

NetBeans

JAX-WSTango

JBIBPEL v2

NetBeansV6

Business RulesValidation Engines Enterprise Information Integration

Common Tooling for Java EE,SOA, Integration, etc.

Ecosystem enabler,Improved standards support

Event Stream Processing

Partners

Java Composite Application Platform Suite (Java CAPS) is Sun's commercial delivery vehicle for Open ESB technology

73

Road MapJava CAPS Evolution

Composite Application Platform Suite

OSS: Open ESB

CAPS 5.1.3Productivity &

Stability

Dates are CalendarAll future dates subject to change.

2007 2008

Q1 Q2 Q3 Q4

2009

Q1 Q2 Q3 Q4

2010

Q1 Q2 Q3 Q4

B2B 5.1.0X12, HIPAA(Healthcare)

B2B 5.1.1AS2, ebXML

CAPS 5.2OSS Re-Platform,

Complex Event Processing

B2B 5.2Aligns w/ CAPS 5.2

CAPS 5.2.1Platform Refresh

Add. Community Comp

CAPS 5.3Semantic Mapping,Aspects for SOA,

Dynamically-Typed Languages

Open ESB V2 (preview 1)

Binary Distrib.

Open ESB V2 (preview 2)

Binary Distrib.

Open ESB V2 (final)

Binary Distrib.

Open ESB V3 (preview 1)

Binary Distrib.

Open ESB V3 (preview 2)

Binary Distrib.

Open ESB V3 (final)

Binary Distrib.

MuralOpen Source

Data ManagementProject

2010

74

Open ESB and Java CAPSPhased Technology Availability

Java One 2006Java One 2006(NetBeans 5.0)

Java One 2006Java One 2006(NetBeans 5.5 Preview)

Java One 2007Java One 2007(NetBeans 6 Preview)

CH1 2008CH1 2008(Java CAPS 5.2)

75

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)

76

References

• Service-Oriented Architecture (SOA)> “Service-Oriented Architecture (SOA) and Web Services: The Road to

Enterprise Application Integration” http://java.sun.com/developer/technicalArticles/WebServices/soa/

> “Service-oriented architecture”http://en.wikipedia.org/wiki/Service-oriented_architecture

77

References• Web Services

> “Web service”http://en.wikipedia.org/wiki/Web_services

> “Web Services Description Language (WSDL) Version 2.0 Part 0: Primer” http://www.w3.org/TR/wsdl20-primer/

> “WS-I Basic Profile”http://en.wikipedia.org/wiki/WS-I_Basic_Profile

> “Building Web Services the REST Way” http://www.xfront.com/REST-Web-Services.html

> “Representational State Transfer”http://en.wikipedia.org/wiki/REST

> “JSR 311: JAX-RS: “The Java API for RESTful Web Services” TS-6411 JavaOne 2007http://blogs.sun.com/sandoz/resource/TS-6411.pdf

78

References

• Business Process Execution Language (BPEL)> “Web Services Business Process Execution Language Version 2.0

Primer”http://www.oasis-open.org/committees/download.php/23964/wsbpel-v2.0-primer.htm

> “Business Process Execution Language, Part 1: An Introduction”http://developers.sun.com/jsenterprise/nb_enterprise_pack/reference/techart/bpel.html

> “Business Process Execution Language, Part 2: partnerLinkType and partnerLink”http://developers.sun.com/jsenterprise/nb_enterprise_pack/reference/techart/bpel2.html

> “Web Services Orchestration Using BPEL”https://blueprints.dev.java.net/bpcatalog/ee5/soa/index.html

79

References

• Java Business Integration (JBI)> “Relationship of SCA and JBI”

http://www.osoa.org/display/Main/Relationship+of+SCA+and+JBI> “SCA Service Component Architecture: Assembly Model Specification”

http://www.osoa.org/download/attachments/35/SCA_AssemblyModel_V100.pdf?version=1

> “Build an SOA application from existing services” http://www.javaworld.com/javaworld/jw-10-2006/jw-1011-jbi.html

• Open ESB> “About Open ESB”

https://open-esb.dev.java.net/AboutOpenEsb.html> “Open ESB FAQs”

https://open-esb.dev.java.net/FAQs.html> “Open ESB Components”

https://open-esb.dev.java.net/Components.html

80

Take Aways (in a nutshell)• SOA is an architectural style that embodies good design principles. It's not new.• SOA is all about crafting a reusable services layer that addresses

siloed applications and point-to-point interfaces • SOA can get us closer to the business.• Open standards have made SOA possible in heterogeneous environments• SOA is being implemented on ESB infrastructure using extensible suites from

vendors like Sun• Web services and BPEL are the key technologies that we need to master as

SOA practitioners• Web services use XML, WSDL, XSD and SOAP to provide interoperability• BPEL provides orchestration for composite applications that use web services • JBI provides a middleware standard for integration in the Java community• SCA is focusing on the assembly model for building composite applications• There are great future synergies with the combination of JBI and SCA• Open ESB is the reference implementation for JBI and is the basis for the next

generation of Sun's Java CAPS product

81

Special Offer

• Access step-by-step tutorial for my two demo segments• Utilize Online Lab Community to work through the demos

without installing an software on your machine

82

Special Offer

• Send me an email: [email protected]• I'll send you an email with login instructions• Any catch? No! We just want your feedback on the online lab environment

83

AgendaRevisited

• 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)

Building Service-Building Service-Oriented Architectures Oriented Architectures with Java Technologywith Java TechnologyDecember 5 - 6, 2007December 5 - 6, 2007Portland & SeattlePortland & Seattle Tom BarrettSOA/BI Technical SpecialistSCJP, SCJD, SCWCD, SCEASun Microsystems – [email protected]