Celtix가 릴리즈 된 소식에 반갑기도하고, 기운빠지기하다.
이런 녀석을 만들겠다고 덤비던 시기가 불과 1년도 채지나지 않았는데..
어느덧 아무런 형태나 계획조차 없었던 Celtix가 이렇게 정식으로 릴리즈 되니 말이다.

아직 소스나 돌려보지는 않았지만, 눈에 띄는것으로는...
ActiveMQ 를 사용하였다는 부분과 왠지 구성이 ServiceMix를 많이 참조하지 않았나 싶은거다.
이 부분은 소스를 열어보면 어느정도 명확해지지 않을까 싶다.

어쨌든, 나에겐 재미난 흥미꺼리가 하나 늘어남과 동시에 고민꺼리가 늘어난 샘이다.


------------------------(릴리즈 소식)-----------------------------

May 8, 2006

Celtix 1.0 is released and available for download at http://forge.objectweb.org/project/showfiles.php?group_id=192. Celtix 1.0 is also available as a Maven distribution at, http://maven.objectweb.org/maven2.

Celtix 1.0 provides users with a feature-rich, open source ESBruntime that can support any organization’s adoption of ServiceOriented Architecture (SOA) in the enterprise.

The Celtix project was initiated in June 2005 under the sponsorshipof IONA. Celtix 1.0 is the result of the fifth consecutive on-scheduledelivery of key project milestones and the acceptance of the currentCeltix build by the ObjectWeb community. The availability of an opensource ESB that offers comparable features and functionality to manycommercially available ESB products provides users with an effective,standards-based foundation from which their SOA initiatives can berapidly built and extended.

The features contained in this release include:

  • Persistence support for Reliable Messaging based on Apache Derby
  • HTTPS based security support
  • Support for Javascript based webservices.
  • Support for changing configuration dynamically
  • Management support for additional Celtix components
  • Support for wsdlvalidator commandline tool
  • Routing support for all Celtix bindings and transports
  • Enhanced routing capabilities
  • WS-Addressing support for JMS based services
  • Interoperability with .NET.
  • Support for Maven 2.0.4
  • Support for running Celtix inside Apache Tuscany
  • Support for Webservice callbacks

Features completed in previous releases include:

  • Support for JAX-WS Dispatch APIs
  • Support for JAX-WS Provider APIs
  • Support for non-wrapper Doc/Literal style
  • Celtix based javatowsdl tool
  • Celtix based wsdltojava tool
  • First cut of transport APIs
  • Enhanced binding API for better pluggability
  • Support for Protocol Handlers
  • Support for Logical Handlers
  • Support for Contexts
  • SOAP 1.1 support for doc/rpc literal
  • Support for SOAP 1.1 faults
  • Support for SOAP 1.1 headers
  • Support for JAX-WS Sync APIs
  • Support for JAX-WS One-Way APIs
  • Support for inout and out variables
  • HTTP 1.1 transport
  • HTTP servlet transport
  • JMS transport based on Active MQ
  • Support for WS-Addressing
  • Support for JAX-WS async client APIs
  • Policy based configuration
  • Support for StreamHandler APIs
  • WS-RM based support for Webservices Reliability
  • Support for JMX based management
  • XML Binding
  • New commandline tools: xsd2wsdl, wsdl2xml, wsdl2soap, wsdl2service
  • Native integration into Apache Geronimo J2EE appserver
  • Support for validating application data against XMLSchema
  • Enhanced support for deploying celtix services into a servlet container based on feedback from Jonas J2EE appserver project
Posted by 아름프로
Milestones
This page describes the breakdown and layout of Celtix targetted features across various milestones. The term complete means, finishing up the work of that specific feature based on the development plan proposed.

Current Milestone: Milestone 3

Milestone 1 - COMPLETE

   * Working end-to-end Hello World SOAP/HTTP scenario.
   * First cut of transport and binding API's
   * Minimal support for SOAP 1.1 and HTTP 1.1
   * Java-to-WSDL and WSDL-to-Java tools.

Milestone 2 - COMPLETE (November 1st, 2005)

   * Binding API design and implementation complete.
   * Handlers and Context Complete.
   * SOAP 1.1 support for Doc/Rpc literal and Faults Complete.
   * JAX-WS Sync and One-Way API's Complete.
   * Infrastructure ready for Tools.
   * Code re-organization and cleanup.
   * Complete Type Testing Framework.
   * Complete Design Note and Development Plan for WS-Addressing, Configuration and JMS transport.
   * Complete Design Note and Development Plan for JBI usecases.
   * Achieve Code Coverage to 75% especially for Milestone 2 deliverables.

Milestone 3 - COMPLETE (December 16th, 2005)

   * Complete Investigation of Jetty as potential HTTP Engine and Complete HTTP 1.1 and Servlet Transport support.
   * JMS Transport Complete (Pick one opensource JMS implementation to test)
   * SOAP 1.1 Headers Complete.
   * JAX-WS Async API's Complete.
   * WS-Addressing Complete
   * Exception & Error Handling
   * Configuration Infrastructure Complete.
   * Complete design note for WS-RM, JAX-RPC 1.1 and JMX.
   * Complete design note for Schema metadata work.

Milestone 4 - COMPLETE (Jan 31st, 2006)

   * Migrate Celtix to Maven 2.0 and Source Code Organization Complete.
   * WS-RM Infrastructure Complete.
   * Support for JAX-WS Dispatch and Provider API's Complete.
   * Non-Wrapper Doc/Literal Style.
   * Transport and Binding API's Complete.
   * WSDLToJava and JavaToWSDL Tools Complete.
   * Complete design note for Routing.
   * Complete design note for J2EE Integration. (Jonas and Geronimo).
   * Complete design note and Development plan for SCA and Celtix integration with Tuscany.

Milestone 5 (Tentative: March 31st, 2006)

   * JMX Work Complete.
   * WS-RM and enhanced WS-Addressing Work Complete.
   * Support for policy based configuration in JMS transport.
   * Tools Work Complete.
   * Routing work Complete.
   * XML Binding Support Complete.
   * XML Messaging API Complete.
   * Dynamic Configuration Support Complete.
   * J2EE Integration Complete.
   * First phase of JBI Integration Complete.
   * First Phase of SCA Integration Complete.
   * HTTPS and Basic Security Support.
   * Enhanced JAX-WS 2.0 Support.
   * Support for Schema Validation in Runtime

Milestone 6 and Further

   * JCA Support Complete.
   * Support for CORBA Binding and Transport.
   * Full SCA/Tuscany Integration.
   * Full JBI Integration.
   * STP Integration.
   * Certify JMS support with JORAM.
   * JAX-RPC 1.1 work Complete.
   * Support for SOAP 1.2.
   * WS-Policy Support.
   * Support for WSDL 2.0.
   * Metadata story complete.
   * Support for JSR 181 (Evolved from this discussion).
Posted by 아름프로

SOA를 실현하는 ESB

SW와 애플리케이션간의 연동을 위한 미들웨어 플랫폼


임철홍|SK C&C R&D센터 기술전략팀 과장

ESB(Enterprise Service Bus)는 웹서비스(Web Service), 인텔리전스 라우팅(Intelligent routing), 트랜스포메이션(Transformation) 기술을 기반으로 SOA(Service Oriented Architecture)를 지원하는 미들웨어 플랫폼이다. ESB는 SW 서비스와 애플리케이션 컴포넌트간의 연동을 위해 경향화된 백본의 역할을 수행한다. ESB를 통해 분산된 서비스 컴포넌트를 쉽게 통합 연동이 가능하며, 신뢰성 있는 메시지 통신이 가능하다.


ESB를 통한 서비스 컴포넌트로는 웹서비스 컴포넌트뿐만 아니라 어댑터(Adap-ter) 기술을 활용한 ERP 등의 레거시 컴포넌트, B2B 컴포넌트, J2EE & .NET 컴포넌트가 있다. ESB는 Emerging Technology로써 가트너에 따르면 올해 가장 관심 높은 기술로써 보고되기도 했다.


ESB의 유형으로는 MQ방식과 Proxy 방식으로 나눌 수 있다. MQ방식은 EAI를 확장하여 메시지의 통로로써 역할을 수행하며, 자체 또는 외부의 프로세스 관리 기능을 활용하는 미들웨어 플랫폼이다. Proxy 방식의 ESB는 기본적인 메시지 라우팅 기능을 기반으로 개별적인 웹서비스를 중앙의 Proxy를 통해서 관리가 가능하도록 지원하는 플랫폼이다.

두 가지 방식의 차이는 해당 플랫폼의 활용 측면에서 차이가 난다. MQ 방식은 EAI 측면의 BPM 구축 시에 유용하며, Proxy 방식은 웹서비스 관리 솔루션에서 도입 활용되고 있다. 초기의 ESB의 시작은 MQ 방식의 ESB에서 시작되었으며, 최근에 웹서비스 관리 솔루션의 등장과 함께 Proxy 방식의 ESB에 대한 관심이 높아지고 있다.

SOA에서의 ESB 역할

분산된 서비스 컴포넌트의 효율적인 통합을 위해서 ESB는 BPEL 혹은 솔루션 벤더의 자체적인 표준을 따르는 프로세스 매니저와 연동해 프로세스 기반의 통합을 지원한다. 기능적으로는 기존의 EAI와 같은 역할을 수행하며, 프로세스 기반의 통합 지원과 웹서비스 기반의 통합환경 등을 지원한다.



1. Service Component Integration

XML 기반의 동기/비동기 SOAP 메시징: SOAP 표준에 기반한 메시지를 교환함으로써 이기종/분산 환경에서의 데이터 및 애플리케이션 연동이 가능하게 지원함. 궁극적으로 프로세스 연동을 지향함


Secure and reliable messaging: MQ와 같은 MOM(Message Oriented Middleware)을 활용하여 메시지 전송의 안정성과 보안성을 지원함

Intelligent routing and inter-mediaries: 메시지의 내용에 기반한 라우팅을 지원하고 메시지를 중개함
Data transforming: XSLT, XQuery를 통한 데이터의 변환을 지원
QoS: 정해진 시간에 일정한 메시지 전송 수를 보장되도록 조정하는 역할
Legacy 통합: DB, ERP와 같은 자원과의 통합을 위한 어댑터를 제공하며, 어댑터를 통해서 애플리케이션 레벨의 통합이 가능하도록 지원

2. Support SOA

웹서비스 지원: 웹서비스 클라이언트 역할 수행이 가능하도록 자동화된 기능(WSDL 지원, 메시지 처리)을 제공한다.
프로세스 지원: 처리할 서비스 단위의 업무 처리를 제어할 수 있는 프로세스를 정의하고, 프로세스 기반 하에서 업무 처리가 가능하다.
메시지 표준: XML 기반의 표준화된 메시지 기반(주로 SOAP)으로 통신이 이루어진다. 경우에 따라서 ESB 내부적으로는 자체 표준으로 변환하여 사용하지만, ESB 외부로는 SOAP을 표준으로 사용한다.

3. Advanced Integration

Work List: 사용자의 입력 또는 승인 처리를 지원하기 위한 비동기적(Asynchronous)인 입력 방식을 지원하여, 사용자의 입력을 기다리고, 사용자의 입력에 따른 처리를 진행할 수 있도록 지원

B2B 프로토콜 지원: RossetaNet, ebXML과 같은 B2B 프로토콜을 지원하여, 글로벌한 전자상거래를 지원

4. Composite Component

여러 서비스와 연동되어 있는 ESB는 자체적으로 컴포넌트의 형태로 구성이 되며, 여러 단위 서비스가 프로세스 형태로 연결되어 있는 복합 서비스로 활용 가능하다.

개 별적인 컴포넌트를 기반으로 ‘Composite Component’로 구축되는 SOA 아키텍처의 모습은 다음과 같다. Atomic Service는 단위의 Service Component를 나타내고 있으며, ESB 기반 서비스 형태의 Composite Compo-nent를 구성하게 된다. 개별 애플리케이션은 이들 Composite Component를 사용하여 동작하게 되며, 결과적으로 프로세스 기반의 통합을 지원하는 형태가 된다.




ESB의 특징

SOA를 지원하기 위하여, ESB는 몇 가지 차별적인 특징을 가지고 있다. 메시지 기반의 Loosely Couple한 표준 인터페이스 기반의 통신을 지원하고 있으며, 표준적인 메시지 표준인 SOAP을 지원한다. 또한 BPM 기반에서 프로세스 레벨의 통합이 가능하도록 지원되고 있다.


Loosely coupled: 표준 인터페이스(WSDL)를 준수하는 메시지 전송에 의해서 애플리케이션간의 연관성이 적은 형태에서 연동을 지원
Highly distributed integration network: beyond hub-and-spoke EAI broker, centralizes control and distributes processing
Event-driven: 독립적인 애플리케이션에 의한 프로세스의 시작이나 정지, 재시작 등의 조정이 가능한 형태
Documents-oriented(Message Driven)
Support for several standard interfaces: From a list including COM, CICS, .NET, JMS, JCA, JDBC, and Web Services - Broker를 중심으로 Legacy, Middleware, Database 간의 연동을 지원

ESB Architecture

1. Process

사용자가 정의한 Activity(Service) 단위로 수행이 가능하도록 수행 순서를 정의하고, 경우에 따라서 조건에 따른 콘텐츠 기반 라우팅이 가능하도록 지원한다. 메인 프로세스에 종속되는 서브 프로세스를 가질 수 있으며, 프로세스의 시작과 종료 시점까지 ESB를 통해서 실행이 진행되게 된다. ESB 내부에 프로세스 매니저가 존재하기도 하며, 별도의 프로세스 매니저(BPM)를 활용할 수도 있다.

2. Service(Service Component)

프로세스 상에서 진행되는 모든 Activity를 서비스로 지칭할 수 있다. 서비스는 자체적으로 처리를 진행하거나(메시지 변환 등) 외부의 서비스 컴포넌트를 호출해 처리가 가능하다. 외부의 서비스 컴포넌트를 호출하여 처리하는 경우 ESB 내부의 서비스는 클라이언트의 역할을 수행한다.

3. Adapter

레거시를 연동하거나 특정한 애플리케이션과의 통합이 필요한 경우 이를 가능하게 하는 역할을 수행한다. 주로 레거시 애플리케이션을 통합하는 경우에 사용하며, 메시지의 생성과 변환을 통해서 중계하는 역할을 수행한다.

4. Messaging Layer

메시지가 신뢰성을 보장하면서 전송 되도록 지원하며, 메시지가 올바른 목적지에 전달 가능하도록 라우팅 기능을 제공. 메시지 전송 시에 Failure나 Reject와 같은 경우 재전송 및 처리가 가능하도록 특정 장소에 저장하여 보존한다. WS-Reli-ability 표준을 통한 신뢰성 보장이 목적이다.

ESB Integrated Architecture

ESB의 목적은 자원을 부서별/업무별로 분산하여 처리가 가능하도록 분산 아키텍처를 지원하고 있다. 동일한 솔루션 ESB를 활용할 경우 통합처리 및 관리에 문제가 없으나, 이기종 간의 ESB를 통합 활용하게 될 경우 대부분의 ESB가 지원하는 웹서비스를 활용하여, 프로세스의 처리가 가능하지만, 솔루션의 차이에 따른 다음과 같은 문제점이 발생하게 된다.


연동되는 ESB안에 Asynchronous한 Component가 있을 경우 즉시적인 응답을 얻을 수가 없기 때문에 Call-Back URL을 활용하여 향후 결과를 반영 할 수 있다.
통합 모니터링이 지원되지 않으므로, 전체적인 프로세스 관리가 어렵다. 즉 프로세스의 실행에 따른 결과 트래킹이 어렵다.
하나의 프로세스를 다른 프로세스로의 이식이 어렵다. BPEL 표준을 활용하는 솔루션의 경우에도 표준 외에 부가적으로 사용하는 기능 때문에 호환성 문제가 발생 할 수 있다.


BPM에서의 ESB활용 방안

ESB는 자체 내장된 프로세스 매니저를 활용하거나 또는 외부의 프로세스 매니저와 함께 사용되어, BPM의 역할을 수행할 수 있으며, 이때 EAI형태의 BPM 솔루션과 같은 역할 수행이 가능하다. 거대 단위의 업무 기반에서 BPM 적용 시에 상위 비즈니스 프로세스를 주로 담당하는 상위 프로세스와 시스템 및 서비스 통합을 주로 담당하는 하위 프로세스를 나누어 계층화하여 구축하면 효율적인 BPM 구축이 가능하다.

상위 프로세스 상에서 서비스 통합을 담당하는 하위 프로세스로 구성된 개별 Composite Component를 활용하는 형태이다. 상위 프로세스를 위한 워크플로우 형태의 BPM 솔루션과 시스템 및 서비스 통합에 해당하는 하위 프로세스를 처리하는 ESB 솔루션과 연동하여 전체적인 프로세스를 지원하는 효율적인 BPM 구축이 가능하다.

ESB를 활용하여 SOA 기반의 시스템 구축이 활성화되기에는 여러 비즈니스, 테크놀로지 측면의 이슈 사항이 존재한다. 이러한 이슈 사항을 해결하기 위해서 많은 노력이 진행 중이지만, 궁극적으로는 정보시스템 환경인 인프라와 기업의 업무 형태가 획기적으로 바뀌어야 하므로 시간이 소요 될 것으로 전망된다.

SOA의 가치를 충분하게 보장할 수 있도록 시스템을 구축하기 위해서는 ESB를 활용한 아키텍처 구성 및 구축이 필수적이며, 이를 위한 솔루션의 검증 및 정보시스템 환경과 업무 요구사항에 알맞은 솔루션을 채택하고 그에 맞도록 아키텍처 구성을 필요로 한다. 기존의 정보 자원과 요구사항에 맞는 신규 자원의 구축 및 전체적인 프로세스 레벨의 통합을 통해서 SOA가 구성 될 수 있으며, 이를 위한 ESB의 역할이 점차 확대될 것이다.

현재의 ESB 솔루션은 계속해서 진화 발전하고 있으며, 서비스 컴포넌트의 확산과 함께 본격적으로 도입 및 활용될 것으로 전망된다.


제공 : DB포탈사이트 DBguide.net



출처 : 경영과컴퓨터 [2005년 12월]
Posted by 아름프로
Synapse가 milestone을 발표한 가운데...
ServiceMix와 Synapse의 차이를 헛갈려하는 이들을 위해..
우리의 James아저씨가 명쾌하게 비교를 해주셨네요..

===========================================

Here is an explanation of the difference.

The main difference is, Apache ServiceMix is an ESB based on the JBI standard (JSR 208) whereas Synapse is a mediation framework (or ESB depending on who you talk to) based on the Axis 2 SOAP stack.

James
LogicBlaze
Posted by 아름프로

Why do developers need an Enterprise Service Bus?






Document options


















Set printer orientation to landscape mode

Print this page

Email this page

E-mail this page

Document options requiring JavaScript are not displayed






Rate this page











Help us improve this co

evel: Introductory

Bobby Woolf , WebSphere J2EE Consultant, IBM Software Services for WebSphere

26 Aug 2005

It's not just for architects: Using an Enterprise Service Bus, the foundation of a Service-Oriented Architecture (SOA), makes life easier for developers, too.

Introduction


Interesting applications rarely live in isolation; an application can't do much that is very useful without working with other applications. Service-Oriented Architecture takes the trend of integrating applications so that they can work together and accelerates it, breaking each application into parts that then must be integrated with each other. The SOA model -- service consumers invoking service providers -- may seem simple, but it introduces two significant problems:



  1. How does a consumer find the providers of the service it wants to invoke?
  2. How can a consumer invoke a service quickly and reliably, because the network is actually slow and unreliable?

It turns out there's a fairly straightforward answer to both these problems, an approach called the Enterprise Service Bus (ESB). An ESB makes service invocation simpler for both the consumer and the provider by handling all of the complexity in between. Not only does an ESB make it simpler for applications (or their parts) to invoke services, it also helps them transfer data and broadcast event notifications. An ESB's design embodies a number of established design patterns and standard specifications.


I wrote this article to help you, the developer, understand why an ESB is a useful and necessary part of application integration, including SOA. The article doesn't focus on definitions or products, but on the functions and capabilities an ESB implements for you so that you don't have to. It shows what an ESB does for you.










Back to top

Invoking services


To help you understand application integration and SOA, I'll start with how Web services work. Web services are only one approach you can use to implement a service invocation. They may not even be the best approach, but they are the most standardized approach available today, and they do help frame the design of what I'm trying to accomplish.


To begin, I must explain the terminology. A Web service is a lot like a function in procedural programming: it has a name, parameters, and a result. The name is a Uniform Resource Identifier (URI), which the Web services provider uses to make the Web service available as an endpoint. The Web services consumer uses the endpoint URI as the address for locating and invoking the Web service. The specific operation and parameters are contained in a request, which the consumer passes into the Web service when it invokes the endpoint. After performing the service, the endpoint passes a response back to the consumer, which indicates success (or an error) and contains the result of the service. So, a consumer invokes a provider's endpoint, passing in a request, and getting back a response.


The current definition of how to implement a Web service is the WS-I Basic Profile 1.1, which consists of SOAP 1.1 over HTTP 1.1 described by Web Services Description Language (WSDL) 1.1. (See Resources for a link to the specification itself.) With SOAP over HTTP, the consumer invokes a service using a SOAP request transported over HTTP in an HTTP request. The consumer blocks synchronously on the HTTP socket waiting for the HTTP response containing the SOAP response. The endpoint's API is described by its WSDL, a contract between the consumer and the provider.


Now that you understand the terminology, let's look at the communication choices a consumer has for invoking a service: synchronous or asynchronous.

Synchronous vs. asynchronous invocation


A consumer can implement a service invocation synchronously or asynchronously. From the consumer's point of view, the difference is this:



  • Synchronous – The consumer uses a single thread to invoke the service; the thread sends the request, blocks while the service is running, and waits for the response.
  • Asynchronous – The consumer uses a pair of threads to invoke the service; one thread sends the request, then a separate thread receives the response.

The terms synchronous and asynchronous are often confused with the terms sequential and concurrent. These latter terms have to do with the order that separate tasks must be performed, whereas synchronous and asynchronous have to do with the way a thread performs a single task, such as invoking a single service. A good way to understand the difference between synchronous and asynchronous invocation is to consider the consequences for crash recovery:



  • Synchronous – If the consumer crashes while blocking as the service runs, when it restarts it has no way of reconnecting to the invocation in progress, so the response is lost. The consumer must repeat the invocation and hope it doesn't crash this time.
  • Asynchronous – If the consumer crashes while waiting for the response after sending the request, when it restarts it can continue waiting for the response, so the response is not lost.

Crash recovery is not the only difference between synchronous and asynchronous invocation, but if you're trying to decide which style a particular invocation uses, looking at the way each handles crash recovery is usually a good way to tell.


Now that you understand the consumer's choices for service invocation communication style, take a look at the consumer's connectivity style choices for connecting to a provider. The consumer may choose from among the following communication styles:



  1. Synchronous direct invocation
  2. Synchronous brokered invocation
  3. Asynchronous brokered invocation

I will explain each style separately.


Synchronous direct invocation


The SOAP over HTTP style of invoking a Web service is said to be direct: Much like performing a function call, the consumer knows the address of the endpoint and invokes it directly. For the invocation to succeed, the Web service must be operational when the consumer invokes the endpoint and must respond before the consumer times out. If a Web service is deployed to a new location (such as a different Internet domain), the consumer must be made aware of the new URI for the endpoint. To deploy several providers of the same type of service, each provider's endpoint must be deployed to a different URI. To choose between the different service providers, the consumer must know each of their URIs.


For example, consider a simple Web service for getting a stock quote: The consumer passes in a stock symbol and gets back the stock's current price. This service might be provided by several different brokerage companies, each under a different Internet URL. Getting the URL for a Web service is a chicken-and-egg problem. If the consumer knew the location of the endpoint, it could ask the service what its address is, but that's the address the consumer would need so that it could ask for the address.


To get around this problem, the Universal Description Discovery and Integration (UDDI) specification describes a Web service that is a directory, like a phonebook, for locating other Web services. The idea is that the UDDI service is deployed to a well-known address the consumer will already know; then the consumer can use UDDI to find other Web services.


In the case of the stock quote service, the consumer knows the UDDI service's address, which in turn knows the stock quote services' addresses, as shown in Figure 1.


Figure 1: Direct invocation of a Web service
Direct invocation of a Web service

Figure 2 shows how the consumer uses the UDDI service to find the stock quote providers' endpoints and invoke one of them. The process works as follows:



  1. The consumer asks UDDI for a list of providers for a service.
  2. The consumer selects a provider's endpoint from the list returned by UDDI.
  3. The consumer invokes that endpoint.

Figure 2: Synchronous direct service invocation
Synchronous direct service invocation

Note that the algorithm for selecting a provider is completely up to the consumer; in this example, the consumer just chooses the first one in the list. A real implementation might be more sophisticated.


Notice also that because the service endpoints can change, every time the consumer wants to invoke the service, it should re-query UDDI to see if the providers' details have changed. Having to query UDDI for every service invocation greatly adds to the overhead of invoking the service, especially in the usual case where the providers' details haven't changed.


Synchronous brokered invocation


A shortcoming of the direct invocation approach is that the consumer must know the URI of the provider's endpoint to invoke the service. It uses UDDI as a directory to find that URI. If there are multiple providers, UDDI specifies multiple URIs, and the consumer must select from among them. If a provider changes its endpoint's URI, it must reregister with the UDDI server so that UDDI has the new URI, and then the consumer must re-query UDDI to get the new URI. In effect, this means that every time the consumer wants to invoke a service, it must query UDDI for the endpoint URIs and select from among them. This causes the consumer to waste a lot of effort repeatedly making UDDI lookups and selecting a provider. This approach also forces the consumer to somehow choose a provider from among a seemingly indistinguishable list.


One approach to simplify this problem is to introduce a broker to act as an intermediary for invoking the Web service. The consumer no longer invokes the service provider directly, but rather invokes a service proxy in the broker, which in turn invokes the service provider. The consumer needs to know the URI for the proxy's endpoint and so uses UDDI to find the address, but in this case, UDDI only returns a single URI, so the consumer doesn't have to choose. The consumer probably doesn't even realize that the endpoint is in a proxy; it just knows that it can use this URI for invoking the Web service. The broker coordinates the consumer with the service providers, as shown in Figure 3.


Figure 3: A synchronous enterprise service bus
A synchronous enterprise service bus

The proxy's URI should be stable: After the consumer uses UDDI to get the proxy's URI the first time it invokes the service, the consumer can reuse that URI for subsequent invocations (at least until the proxy stops working). Meanwhile, the proxy keeps track of the providers, their URIs (which may change between invocations), whether they're available (did the last invocation fail?), their load (how long did the last invocation take?), and so on. The proxy then takes the responsibility for choosing the best provider for each invocation, relieving the consumer of this responsibility. The consumer simply invokes the same proxy at the same address every time, and the proxy takes care of coordinating with the various providers.


Figure 4 shows how the consumer uses the broker to invoke the service, which works in the following way:



  1. The consumer asks UDDI for a list of providers for a service. The URI returned by UDDI is actually for the service proxy. UDDI will only return one URI, not several, because the broker only has one proxy for a particular service.
  2. The consumer invokes the service using the proxy's URI.
  3. The service proxy selects a service provider from its list of available providers.
  4. The service proxy invokes the selected provider's endpoint.

Figure 4: Synchronous brokered service invocation
Synchronous brokered service invocation

Notice that the effort of selecting the provider has moved from the consumer and is now encapsulated in the broker's proxy. This simplifies life for the consumer. Ultimately, the selection process the proxy uses may be no different than the process the consumer would have used. However, because the UDDI server and proxy are encapsulated within the broker, certain efficiencies can be more easily introduced, such as caching UDDI information in the proxy and having the UDDI server notify the proxy when the cached information becomes stale.


Note too that because the proxy's address is stable, the consumer doesn't have to query UDDI repeatedly, once per service invocation. Rather, the consumer only needs to query UDDI once and then can safely cache the proxy's address and use it to invoke the service repeatedly. This greatly lowers the overhead of invoking a service.


Asynchronous brokered invocation


A shortcoming of the synchronous approach is that the consumer must wait while the service is performed -- the consumer's thread must block while the service runs. If the service takes a long time to perform, the consumer may give up before it receives the response. When the consumer makes the request, if none of the service providers are running or if they're all overloaded, the consumer will not be able to wait. And as explained earlier, if the consumer crashes while blocking, even if it restarts the response will be lost and the invocation must be repeated.


A common solution to this problem is for the consumer to invoke the service asynchronously. With this approach, the consumer uses one thread to send the request and another to receive the response. This way the consumer doesn't have to block waiting for the response and can perform other work in the meantime. The consumer is therefore much less sensitive to how long it takes the provider to perform the service.


A broker that enables a consumer to invoke a Web service asynchronously is implemented using a messaging system that uses message queues for sending the request and receiving the response. Like a synchronous service proxy, the pair of message queues acts as a single address the consumer uses to invoke the service, regardless of how many providers may be listening, as shown in Figure 5.


Figure 5: An asynchronous enterprise service bus
An asynchronous enterprise service bus

This approach uses the Request-Reply pattern to invoke a Web service. Instead of HTTP as specified in WS-I BP 1.1, message queues now perform the transport. The SOAP request and response are the same as with WS-I BP, but they are now enclosed in messaging system messages.


Figure 6 shows how the consumer invokes the service asynchronously using a broker, which proceeds according to the following steps:



  1. The consumer sends the SOAP request as a message on the request queue. The consumer is now finished and can use that thread to perform other work.
  2. Each of the providers is a consumer on the request queue, which makes them competing consumers. The messaging system determines which provider is able to receive the message and ensures that only one provider receives the message. How this works specifically depends on the implementation of the messaging system.
  3. The winning provider receives the message from the request queue.
  4. The provider performs the service.
  5. The provider sends the SOAP response as a message on the reply queue. The provider is now finished and can use its thread to perform other work (such as waiting for another request).
  6. The consumer's listener thread receives the message containing the SOAP response.

Figure 6: Asynchronous brokered service invocation
Asynchronous brokered service invocation

Notice that the effort of selecting a provider is now encapsulated within the messaging system, simplifying life for the consumer. Notice also that if the consumer crashes after making the request, even if the response comes back in the meantime, the messaging system will save the response on the reply queue until the consumer starts up again.


Note as well that the consumer does not use UDDI to find the request and reply queues. Currently, there is no standard service for returning a pair of queue addresses, so the consumer must just know the addresses. The consumer is either hardcoded with the addresses or reads them from an external configuration file. In the future, either UDDI needs to be extended or a similar service specified that a consumer can query to discover the pair of queues for invoking a particular service.


Now you understand the connectivity style choices for service invocation. Let's look at additional integration capabilities that can also be helpful, then at how you develop an ESB that gives us these abilities.
















Back to top



Other integration capabilities


An ESB also gives you the opportunity to go beyond service invocation and integrate applications and parts of an SOA using other techniques. A service invocation is almost always a two-way operation, meaning that a request is sent from the consumer to the provider and a response is sent back in the other direction. Other integration techniques work as one-way operations, where a sender pushes information to the receiver but does not wait for a response; the receiver simply consumes the information without responding.


Data transfer


Sometimes an application simply wants to transfer data to another application without necessarily invoking a procedure in the receiver, and definitely without waiting for a result. This is a classic integration problem: One application has data that another one needs. The sender doesn't need to tell the receiver what to do with the data; it is just making the data available.


A service invocation can be used to transfer data, which is equivalent to invoking a setter method, but that's forcing the data transfer into the RPC paradigm. The data transfer is actually more like a file transfer: data is exported from the sender and imported to the receiver without the sender overtly directing the receiver as to what to do with the data. This is more akin to a document-style SOAP message than an RPC-style message.


Using an ESB for data transfer leverages its abilities to locate the receiver and transfer data reliably. The sender doesn't have to know how to find the receiver, it just has to know how to find the ESB and trust that it will find the receiver. The ESB is also responsible for transferring the data reliably. The sender can simply push the data into the ESB and know that it will be delivered.


For more information about the data transfer technique, see the Document Message pattern. (For more about this, see the book Enterprise Integration Patterns listed in Resources.)


Event notification


Sometimes a change occurs in one application that needs to be announced to other applications. For example, if a customer edits his address in an application, other applications with their own databases should be notified so they can update their records.


Again, one application can invoke a service on another application to inform it of a change, but there are three problems with this approach. The first two problems are the same as those with data transfer. First, a service invocation is too specific about what the receiver should do with the information, and second it tends to be two-way, forcing the sender to wait for a reply (even asynchronously) it doesn't really want.


The third and most significant problem with invoking a service for event notification is that service invocation is inherently one-to-one, consumer-to-provider, whereas event notification is inherently broadcast, one-to-many, to all interested receivers. Using service invocation, the sender would have to keep track of all interested receivers and invoke the service separately on each of them. This broadcasting of the notification is better left to the broker between the sender and the receivers.


Using an ESB for event notification leverages its abilities to keep a list of interested receivers and make sure the notification gets delivered to each one. It enables the sender to issue the notification just once and be assured that the notification will be delivered to all interested receivers, whoever those are. Because the operation is one-way, the sender can go about doing other work while the notifications are being delivered, and the notifications can be delivered concurrently.


For more information about the data transfer technique, see the Event Message pattern. (Again, see the book Enterprise Integration Patterns listed in Resources.)
















Back to top



Developing an Enterprise Service Bus


Now you know the difference between invoking a Web service in a provider directly as compared with doing so using a broker. You've also seen how the broker can enable the consumer to invoke the service synchronously or asynchronously.


The broker is often what has come to be called an ESB. So how does an ESB compare to already established designs and patterns?


Self-describing and discoverable


What distinguishes Web services from previous integration approaches is that a consumer can dynamically bind to the provider of a service. This works because of the following two main capabilities:



  • Self-describing – A Web service describes itself in a machine-readable way. Two or more providers of the same service are immediately recognizable, even though they may have very different implementations, because their declarative interfaces fit the same description.
  • Discoverable – Web services providers can be organized into machine-executable directories. A consumer can search such a directory to find a provider of a desired service.

These self-describing and discoverable capabilities of Web services are very different from previous integration approaches. With other approaches, interfaces were enforced at compile-time, which is also when consumers were bound to providers. Message formats were not expressed declaratively. They were implied by mutual agreement and not enforceable until a receiver failed to parse the structure created by the sender.


Self-describing services simplified integration by declaring interfaces that could be enforced. Dynamic discovery of services freed the consumer from being bound to a particular provider at a particular address, but the opportunity for run time discovery created its own problems. Should a consumer perform discovery of providers of a service once or repeatedly?


It has been difficult to resolve the tension between binding a consumer to a provider once-and-for-all at compile time versus potentially discovering a new provider with every invocation during run time. An ESB offers a third choice, a compromise enabling a consumer to dynamically bind to a service proxy just once and yet still be able to use multiple and future providers using the proxy.


Thus, an ESB not only makes services available so that consumers can invoke them, but it also offers consumers the ability to find the services programmatically.


Services gateway


The foundation for a synchronous ESB is what's known as a services gateway, which acts as a middleman between service consumers and providers to facilitate synchronous brokered invocations. It provides access to all known services and the service proxy for each of them. In this way, a gateway provides one-stop shopping for a consumer that wants to invoke any of the services in any of the providers the gateway brokers.


When the services the gateway coordinates are Web services, the services are self-describing. Each service declares its interface using WSDL, which consists of the following four parts:



  1. Port types -- The sets of operations performed by the Web service. A port type might be stockBrokerServices, with ports/operations like getQuote.
  2. Messages – The format of the requests and responses, such as getQuoteRequest (which contains a stock symbol) and getQuoteResponse (which contains a price).
  3. Types – The data types used by the Web service, such as symbol and price (or simply xs:string and xs:decimal).
  4. Bindings – The address for invoking the operation, such as http://stockbroker.example.com/getQuote.

Such a gateway's Web services -- or more specifically, its proxies for the services -- are also discoverable. The gateway provides this capability as a UDDI service, as illustrated earlier. To discover the address for invoking a service, a consumer queries the gateway's UDDI service for providers of the desired WSDL operation and gets back the binding for the gateway's proxy for that operation.


Message bus


At the foundation of an asynchronous enterprise service bus is an established pattern called a Message Bus, described in the book Enterprise Integration Patterns listed in Resources. A message bus is a collection of message channels (also known as a queue or topic) usually configured as request-reply channel pairs. Each pair represents a service that can be invoked by a consumer using the bus. The caller puts a request message on the request queue for the service and then (asynchronously) listens for the result on the reply queue. (The caller knows which result is the right one for its particular request because it has the right correlation identifier.)


The consumer invoking the service doesn't actually know who's providing the service. The service providers also connect to the message bus and listen for request messages. If there are multiple service providers, they actually compete with each other as competing consumers to be the one to consume a particular request. The messaging system that implements the message bus acts as a message dispatcher and distributes the request messages to the service providers, ideally optimizing this distribution somehow based on load balancing, network latency, and so forth. After a service provider receives a request, it performs the service and then puts the result in a message on the agreed-upon reply channel. So the provider and the consumer never directly know about each other's locations; they just know about the message bus and how to address the appropriate channels, and by sharing the same channels they can communicate.


This message bus is the gist of an ESB, and this is nothing new. Application integrators have been doing this for more than a decade using message queuing products like WebSphere® MQ and TIBCO Enterprise Message Service. Indeed, it's often said that if you are using enterprise messaging products, you have an ESB. IBM customers have been doing this for quite some time with WebSphere Business Integration Message Broker and WebSphere MQ.


So, is an ESB just a message bus? No, a message bus is definitely the foundation of an asynchronous ESB, but a full ESB is something more. An ESB has abilities message buses have always lacked: The aforementioned describing and discovery abilities.


A better message bus


So if a message bus is not a full ESB, then what else does an ESB do?


A shortcoming of the traditional message bus approach is that it's not self-describing. From the consumer's perspective, there are a whole lot of channels for invoking a whole lot of services. But which one is the right channel for invoking the service the consumer needs? The consumer can't just put a request on any request channel; it has to know the right channel to use to invoke the particular service it needs. Otherwise, it might end up buying an airline ticket when it wanted a book. Likewise, even after the consumer knows (somehow) which channel to use (and which channel to listen to for the reply), it then needs to know what format the data in the request needs to be (and what data format to expect for the reply).


As described earlier, WSDL solves this problem for synchronous Web services, and for the time being is the standard of choice for describing asynchronous services as well. The WSDL associated with a request channel would describe what service that channel provides as well as the format of the request message the consumer must provide. The WSDL would probably also specify the reply channel the caller should listen to for the reply and the format to expect for the reply message. In this way, a caller application can programmatically look at the pair of channels for invoking a service and know that they provide the desired service using the desired request and reply message formats.


Self-describing services channels lead to another issue, namely discovery, which synchronous Web services solve with UDDI. As shown earlier, a consumer asks a UDDI server for the address of a Web service provider, and the server replies with the URL for that provider. The consumer uses the URL to invoke the service.


An ESB needs a similar directory service, one with a UDDI-like API that a consumer can invoke to ask for the address of a service that implements the desired WSDL operation. The ESB replies with the address of the appropriate pair of request-reply channels. So an ESB consumer, like a UDDI consumer, needs to know nothing more than the following:



  1. The WSDL describing the service it wants to invoke
  2. The address of the ESB's directory service (which can probably be derived from the ESB's root address)

This is enough to locate a service's request and reply channels and start invoking the service. Furthermore, this directory service is just another service that the ESB provides, a master service for locating other services.


Synchronous or asynchronous?


Service consumers face an artificial choice between communication styles: synchronous or asynchronous. To solve this dilemma, many ESBs will support both synchronous and asynchronous services, and in fact may offer both invocation models for the same service. In this case, when a consumer asks for the address of a service, it can get two matches: one synchronous, the other asynchronous. The consumer can then choose the invocation model it likes best. Either way, the service performed is the same although the specific service provider instance may differ.


So an ESB is better than a traditional message bus because it also makes a service self-describing and provides a directory service for finding the other services. This is what the vendors of products for building ESBs are striving to deliver.
















Back to top



Conclusion


As you've seen, a service can be invoked in any of following three ways:



  1. Directly and synchronously
  2. Synchronously through a broker
  3. Asynchronously through a broker

An Enterprise Service Bus is a broker that supports synchronous and asynchronous service invocation. It also enables data transfer and event notification between applications. It helps consumers find providers and handles the details of communication between them.


A synchronous ESB is a services gateway that acts as a central coordinator of a variety of services. An asynchronous ESB is a message bus whose services also support the Web service capabilities of being self-describing and discoverable. Standards and patterns exist today for implementing a synchronous ESB and a message bus that is a simplified asynchronous ESB. Additional standards are needed for asynchronous ESBs to reach their full potential.









Back to top

Resources

Learn









Back to top

About the author


Photo of Bobby Woolf


Bobby Woolf is a WebSphere J2EE Consultant for IBM Software Services for WebSphere (ISSW). Bobby assists clients in developing applications for WebSphere Application Server using WebSphere Studio Application Developer. He is a co-author of Enterprise Integration Patterns and The Design Patterns Smalltalk Companion. He also has a blog on the IBM developerWorks Web site called J2EE in Practice. Bobby is a frequent conference speaker.

Posted by 아름프로

BLOG main image

카테고리

분류 전체보기 (539)
이야기방 (19)
토론/정보/사설 (16)
IBM Rational (9)
U-IT (0)
SOA/WS/ebXML (110)
ebXML (64)
RossetaNet (0)
SOA (11)
ESB (5)
WebServices (30)
개발방법론/모델링 (122)
J2SE (34)
J2EE (60)
DataBase (39)
Open Projects (30)
BP/표준화 (50)
Apache Projects (15)
Web/보안/OS (22)
Tools (7)
AJAX/WEB2.0 (1)
Linux/Unix (1)
영어 (0)
비공개방 (0)

최근에 올라온 글

최근에 달린 댓글

최근에 받은 트랙백

달력

«   2024/05   »
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31

글 보관함

Total :
Today : Yesterday :