SOA Fundamentals For Java Developers Alexander Ulanov, System Architect Odessa, 30 September 2008
What is SOA? Software Architecture style aimed on Reuse Growth Interoperability Maturing technology framework supporting the architecture Next evolutionary step of enterprise information systems An effective mean to close the gap between business and IT
SOA Enterprise Ecosystem
SOA for IT-resources integration Common infrastructure based on open and widely-adopted standards Reuse of enterprise information services and other software assets Going beyond the enterprise integration with: Partner s IT Global chain of information services providers and consumers Unified policies to all services and applications Service level agreements Integrating legacy systems Smooth transition
SOA for Business-IT Alignment Software resources (services) are designed as a business function The services are orchestrated to fulfill particular business-process This involves: Services are understandable in terms of business (visibility) Local changes in IT as response to new or changed businessprocess Events in information system can be simply abstracted to business key performance indicators (KPI)
Reference Architecture
Principles of Service Design Top-down: from business-processes to services contract Bottom-up: from existing software assets how to fulfill the contract
Design by Contract Contract Interface definition Operations Data types Policy assertions Identify behavior attributes Contract first
Loose Coupling Service contracts impose low consumer coupling requirements Negative coupling: to implementation of service logic to vendor technology to resources of the implementation environment to parent business-process
Autonomy High level of control over underlying runtime execution environment Gradual transformation Reducing shared resources access Increasing physical isolation Autonomy is especially important to the effectiveness of service compositions
Composability Fundamental principle - system decomposition and separation of concerns Ability to act as an effective composition member so that it can support the realization of new business requirements that can be fulfilled by the assembly of service compositions That involves service properties: Designed from business-process model Autonomous Loosely coupled Composition design pattern: Functional call
Statelessness Concurrent access to statefull service is a scalability issue Deferring the management of state information when necessary Empowers composition and reuse
Abstraction General categories of information about service: Functional Technology Programmatic Quality of Service Service contracts contain only essential information Information about services is limited to what is published in service contracts
Reusability Services contain and express agnostic logic Contract centralization Logic centralization Can be positioned as reusable enterprise resources Inventory (Repository) To support reuse Conservative Specify requirements to reuse that service Governance effort Cultural change Developers encouraged to discover for reuse
Discoverability Services are supplemented with communicative metadata Functional Quality of Service And can be effectively discovered and interpreted Service Registry Similar process for run-time (dynamical binding)
Standardized Service Contract Same contract design standards within service inventory (repository) Standards enable automated policies governance
Process
SOA Program
Service Life-Cycle Management
Service Infrastructure
Communication Protocols WS-* Large set of standards issued by OASIS Security, reliable messaging, policies, etc.. SOAP basic communication protocol Standard Java API JAX-WS RESTful Services JAX-RS JMS EJB (RMI/IIOP) etc
Exposing and Calling Web-Services in Java JAX-WS: server Expose service from EJB POJO Spring component From WSDL to code vs. from code to WSDL JAX-WS: client
Infrastructure Functions Mediation & Messaging Synchronous and asynchronous message delivery Transport protocol adapters HTTP, SOAP, SMTP/POP3, JMS, FTP, Caching Dynamical binding Service Composition Data transformation Content-based routing Event-flow orchestration Security End-to-end Message-level Management Service Provisioning Traffic management Monitoring, Logging, Alerting
Apache Synapse / WSO2 ESB Lightweight ESB Mediation Transformation (XSLT, XQuery) Security (WS-Security)
Service Component Architecture (SCA) Programming model seen by application code remains the same regardless to protocol
Service Component Architecture (SCA) Assembly: Packaging component as a service Combining into composites Dependency Injection Wiring, Auto-wiring Properties Annotations @Remotable, @Reference, @Property SCDL configuration files
Service Component Architecture (SCA) Advantage over Spring: remote components multiple protocols for communication variety of programming languages for application components support for an asynchronous programming model flexible application of policy to components and to communications
Open-Source Infrastructure Products JAX-WS Containers SCA container ESB Java 6 SDK WS-Container Sun JAX-WS (Metro) Apache CXF Apache ServiceMix IONA Fuse ESB Mule ESB Apache Synapse WSO2 ESB Sun s OpenESB JBoss ESB Apache Tuscany Messaging Apache Active MQ Registry ApacheDS (LDAP) Sun OpenDS (LDAP) Apache juddi (UDDI) Registry/Repository Mule Galaxy WSO2 Registry
What else is worth to study?
Questions?