Upload
dmitri-shiryaev
View
690
Download
0
Embed Size (px)
DESCRIPTION
Citation preview
A Guide to the SOA Galaxy: Strategy, Design and Best Practices
Dmitri ShiryaevJava Tools
Sun Microsystems, Inc.
Guide to the SOA Galaxy
You are here
4. ESB2. BPEL
3. JBI
5. Java CAPS1. Intro
6. . The Answer To Everything
Business-IT Context for SOA• Creating an IT environment to support
continuous business optimization• Structures your IT applications in line with
your business processes– Speeds business change– Facilitates business connections– Enchances business control
• Heavy focus on flexible interconnections with carefully managed qualities of service (QoS)
Why SOA?Channels
Provisioning
SuppliersInternal UsersCustomersPartners
InventoryBillingCRMLegacy
Information Assets
$ $$
$$
$
$$
$$
$$
$
$
$ $$
• Inflexibility of IT Infrastructure
• Complexity of Integration Projects
• Integration Costs• Time to Market• Limited Partnering
Flexibility• Limitations of EDI
SOA and Web Services• Web services are most people's first and only
exposure to SOA• Only one manner of service access
– Message-oriented middleware (MOM)– CORBA, RMI, DCOM, raw sockets, Email etc.
• SOA architectures tend to be best implemented using web services as the middleware technology
Why Services?• SOA = an architectural principle for
structuring systems• SOA emphasizes the de-coupling of system
components• New services are created from existing
ones in a synergistic fashion• Strong service definitions are critical• Services can be subsequently re-composed
in response to changing business requirements
What Are Services?
• A function accessed using XML message exchange
• Message exchanges have well known exchange patterns
• Services are self-describing, using metadata (WSDL)
What Does a Service Do?
• Transform data• Route messages• Query databases• Orchestrate conversations• Apply business logic• Apply business policy• Handle business exceptions• Solicit approvals• …
How Is a Service Implemented?• XSLT • Enterprise JavaBeans™ (EJB™) technology• BPEL• SQL• XQuery• Routing table• Business rules• EDI transform• …
Benefits of SOA• Flexible (Agile) IT
– Adaptable to changing business needs • Faster time to market
– Reuse existing code, minimize new development
• Business and process-driven– New business opportunities
• Greater ROI – Leverage existing IT asset
SOA Layers
Process Layer
Service Layer
Resource Layer
Access Layer
The “Move” to SOANon-Integrated
Integratedand Shared
The Shift
• SOA is a combined effort between IT and the business units
SOA
IT Biz Units
Process Layer DefinerService Layer
Provider
Pre-SOA Scenario
CustomerData
CustomerData
BalanceCheck
CreditCheck
FraudDetection
Partner Credit Data
Partner Credit Data
BalanceCheck
CreditCheck
InterestCalc
Credit Card
Mortgage
Back-End System
Back-End System
SOA-Enabled Scenario
Reusable Services
Credit Card Mortgage
Partner Credit Data
Customer Data Service
AccessService
Credit Check
Fraud Detection
Customer Data
PaymentManagement
Service
TradeExecutionService
Internet
Bill PayAuto
Loans StocksMutualFunds
IncreasedAgility
Interest Calc
Balance Check
Back-End System
Back-End System
SOA Architectural Big Rules Document-based Mostly Async Conversational
Reliable Secure/Identity Policy Driven
BPEL OrchestratedWSDL Described
Registered and Retrieved
JBI-based
Coarse Grained Business Services
SOA Architectural Big RulesCoarse Grained Business Services XML Document-based
Mostly Async Conversational
Design
Focused
Reliable Secure/Identity
Policy Driven Registered and Retrieved
SOA Architectural Big RulesQualities
Focused
Standards
Focused
WSDL Described BPEL Orchestrated
SOA Architectural Big Rules
JBI-based
Guide to the SOA Galaxy
You are here
4. ESB2. BPEL
3. JBI
5.Java CAPS 1. Intro
6. The Answer To Everything
Need for Business Process• Developing the web services and exposing
the functionality is not sufficient• We also need a way to orchestrate these
functionality in the right order • Example:
– Concert ticket purchase Web service has 3 operations, which need to be performed in the following order• Getting a price quote• Purchase a ticket• Confirmation and cancellation
BPEL (Business Process Execution Language)
• XML-based language used to specify business processes based on Web Services
• BPEL processes describe– Long running, stateful, transactional,
conversations between two or more partner web services
• BPEL is key to implementing SOA Big Rules– Conversational– Mostly Async– XML Document-based– Orchestrated
BPEL “Fixes” WSDL
• WSDL: unordered set of operations– Operations are message exchanges
• Need rules for ordering• Support for sequencing• Support for concurrency• Choreography with external entities
BPEL Is a Web Service Sequencing Language
• Process defines “conversation” flow chart– Conversation consists of only WSDL-described
message exchanges– BPEL provides and consumes WSDL defined
services• Process instance is a particular
conversation following the chart– Execution systems can support multiple
concurrent conversations
BPEL Works With WSDL• Web services are described in WSDL
– Operations are message exchanges– Each operation represents an individual unit of
action
• We need a way to orchestrate these operations with multiple web services in the right order to perform a Business process– Sequencing, conditional behavior etc.
• BPEL provides standard-based orchestration of these operations
BPEL: Relationship to Partners
Orchestrating Process(BPEL)
InventoryChecker Service
Credit checker Service
Another Partner Service
Customer Service
WSDL
BPEL Document Structure<process> <!– Definition and roles of process participants -->
<partnerLinks> ... </partnerLinks> <!- Data/state used within the process --> <variables> ... </variables> <!- Properties that enable conversations --> <correlationSets> ... </correlationSets> <!- Exception handling --> <faultHandlers> ... </faultHandlers>
<!- Error recovery – undoing actions --> <compensationHandlers> ... </compensationHandlers> <!- Concurrent events with process itself --> <eventHandlers> ... </eventHandlers> <!- Business process flow --> (activities)*</process>
BPEL ActivitiesBasic Activities• <invoke>• <receive>• <reply>• <assign>• <throw>• <wait>• <empty>
Structured Activities• <sequence>• <while>• <pick>• <flow>• <scope>• <compensate>• <switch>• <link>
BPEL: Basic Activities• <invoke>
– To invoke a one-way or request/response operation on a portType offered by a partner
• <receive>– To do a blocking wait for a matching message to
arrive– Can be the instantiator of the business process
• <reply>– To send a message in reply to a message that was
received through a <receive>
– The combination of a <receive> and a <reply> forms a request-response operation on the WSDL portType for the process
BPEL: Basic Activities• <assign>
– Can be used to update the values of variables with new data
• <throw>– Generates a fault from inside the business process
• <wait>– Allows you to wait for a given time period or until a certain
time has passed
• <empty>– Allows you to insert a "no-op" instruction into a business
process– This is useful for synchronization of concurrent activities, for
instance
BPEL: Structured Activities• <sequence>
– Perform activities in sequential order• <flow>
– Perform activities in parallel• <switch>
– Conditional choice of activities• <scope>
– Enclose multiple activities in a single scope
Example Business Process
Invoke <InventoryService> Invoke <CreditService>
Reply <Invoice>
Receive <PO> <sequence>
<flow>
</sequence>
Authoring BPEL?Authoring BPEL?
• BPEL is difficult to write– Programming in XML: arghhhh!– XML Schema
• Real-world schemas are huge and complex• Run the other way if you can
– WSDL extensions• As if WSDL weren’t confusing enough
• BPEL is an execution language only– Not a modeling notation
BPMN (Business Process Modeling Notation)(Business Process Modeling Notation)
• Notation for business process diagrams – Based on flowcharting techniques– Has special considerations for Web Services– Readily understandable by...
• Business users• Business analysts• Software developers
• But, BPMN and BPEL are complimentary– BPEL: execution language without a notation– BPMN: notation with a comprehensive
mapping to BPEL
Visual Service Orchestration
Guide to the SOA Galaxy
You are here4. ESB
2. BPEL
3. JBI
5. Java CAPS1. SOA
6. The Answer To Everything
SOA– Decouples service consumers from providers– Separates business logic from services– Enables dynamic service discovery/use– Appealing to large enterprises
(flexible/scalable)Business integration
– Application to application (A2A)– Business to business (B2B)– Business process management (BPM)– Many architectures, technologies, vendors
What is JBI (JSR-208)?● One of the biggest motivation for SOA is to
reduce the cost of application integration● Standard-based, pluggable infrastructure
– Service Engines: Provides business logic and integration services
– Binding Components: Provides communications protocols
• Composite, event-driven services• Extensible administration• Loose coupling via WSDL message exchanges
JBI (JSR-208)– Standardizes:
• A Java technology-based Extensible Meta-container • Installable components (binding components and
service engines)• Packaging/deployment (service units and service
assemblies)• Normalized message routing (WSDL-2.0 based)• Component/deployment management (Ant and
JMX™ API)• And more
Runtime: Java EE Platform and Java Business Integration
• Java Business Integration serves as messaging infrastructure– Java EE web services interact through Java
Business Integration– Java Business Integration bindings allow
remote consumers and providers– Add other service technologies as Java
Business Integration components• Transparent to programmer using Java EE
technology– Reuse without re-coding
JBI Architecture
JBI—Service Engine
• Hosts business logic implementing services• Exposes service endpoints
– Agnostic of protocol and transport• Engages in Message Exchange Patterns
– Normalized messages—target remote service• Is a target for deployment—a container
– Engine-specific artifacts– May cause endpoint activation
JBI—Binding Component• Handles protocol-specific message re-
formatting– Deals with wire transport of messages– E.g. SOAP/HTTP, FTP, SMTP, JMS, ebMS,
AS2, etc.• Should contain no business logic• Exposes proxy endpoints for remote
services• Proxies JBI services to remote consumers• (Re)Used by multiple service engines
JBI Administration
• Standard installation of components– Portable archive format
• Service Assembly (SA)– Portable package of a composite service
• Service Unit (SU) – Each deployed to one component type
• Lifecycle Management– Start/stop/shutdown
JBI—Service Assembly Deployment
SA=Proxy Service
activity.xml
JBI.xml
transform.xslt
endpoint.xml
SU1
SU2
SU3
BPELEngine
XSLTEngine
SOAP/HTTPBinding
Guide to the SOA Galaxy
You are here
4. ESB2. BPEL
3. JBI
5. Java CAPS1. Intro
6. The Answerto Everything
• Distributed services architecture• Enterprise-grade communications
backbone for reliable messaging• Intelligent routing and content-based
routing• Process coordination• Flexible security framework• XML transformation• Management
Enterprise Service Bus
• Open source, based on the JSR-208 RI• + Multiple JBI instances (+ synchronization)• + Distributed normalized message
routing/proxying• + Central administration (+ CLI and Web
Console)• And more
Project Open ESB
JBI and Project Open ESB
• Java Business Integration– Service Unit– Component– Service Assembly– Standardized MBeans
• Project Open ESB– Distributed JBI– Centralized Management
Guide to the SOA Galaxy
You are here
4. ESB2. BPEL
3. JBI
5 Java CAPS. 1. Intro
6. Answer to Everything
Composite Applications• A composite application is a collection of existing
and independently developed applications and new business logic, orchestrated together into a brand new solution of a business problem that none alone can solve
• Such an application looks to the user like a regular new interactive application, yet in reality it may be only 10 percent new and 90 percent an assembly of pre-existing components or data; the “glue” that brings a composite application together is integration technology
Sun's Vision for the SOA Platform
Sun's SOA Platform
Java ES and Suites
JavaTM Enterprise System
ApplicationPlatform B2B
ESBWebInfrastructure
CompositeApplication Platform
Identi
tyMa
nage
ment
Comm
unica
tions
Avail
abilit
y
Mana
gem
ent T
ools
Deve
lope
r Too
ls
Over 1 MillionJava ES
Subscribers
Storage + STK
Java Composite Application Platform Suite
PositioningJava CAPS
Unique Combination of:● Unified● Comprehensive● Agile
Value Proposition:
The industry's most complete, secure, unified and scalable platform for the development, deployment and management of enterprise integration and composite applications
Open ESB and Java CAPSOpen ESB
Entry Level, Standards-Based ESBJBI Architecture
Available: 1H 2006
Java CAPS SuitesFifth-generation, ESB-based
Integration Suite with full functionality
Available NOW
Use: For Develop
ers
Use: Run Your Enterprise on
this.
Guide to the SOA Galaxy
4. ESB2. BPEL
3. JBI
5 Java CAPS.1. Intro
6. The Answer To Everything
You are here(finally)
ToolsThe Answer to Everything...
SOA Tool SOA Tool NetBeans EnterpriseNetBeans EnterprisePack 5.5Pack 5.5Rapid Architecture and Design of ServicesRapid Architecture and Design of Services
Overview• Will focus on higher level features that are
important to building enterprise applications..for example....– SOA
• Composite Application Building• Business Process Orchestration• Integration• Rich Visual XML Tools
– Application Lifecycle Management• UML Modeling• Project Management• Automatic Project Wiki Documentation
Enterprise Customer NeedDesign of Composite Services
Rapid Architecture and Design of Services
•
EnterprisePlatform J2EE
1.5
SOA
XMLweb Services
ApplicationPortability
DataPortability
Sun Web Services Developer Pack
Sun Java SystemApplication Server
Visual Service Orchestration• Service Orchestrations
– Model Business process in the Orchestration Designer
– Generate deployable BPEL based orchestrations
– Round trip engineering between visual Web service model and BPEL process
– Import and export BPEL
Visual Service Orchestration
Summary• SOA enables flexible and agile enterprise
application architecture• JBI provides standard based SOA
framework• BPEL enables standard based
orchestration of services• NetBeans Enterprise Pack is the tool to
use for building SOA-enabled enterprise applications
Call For Action• Try “free” Java Studio Enterprise for
building industry strength Web services• Try Technology Preview version of
NetBeans Enterprise Pack 5.5 for integrating SOA-enabled services
• Join Sun Developer Network (SDN) for up-to-date SOA information
Resources• SDN (Sun Developer Network)
SOA/WebServices– http://java.sun.com/reference/soawebservices/
• Java Studio Enterprise– http://developers.sun.com/prodtech/javatools/j
senterprise/• NetBeans Enterprise Pack 5.5
– http://enterprise.netbeans.org
Technical articles
Sun Developer Network
http://developer.sun.com
Increasing developer productivity with:
Empowering the Developer
Tutorials and sample codesMonitored forum support
Community involvementthrough user groups, events,and conferencesAnd more...