Tuesday, June 21, 2011

Local Transport implementation for WSO2 ESB

Apache Axis2's non blocking local transport implementation is used to make internal service calls and transfer data within proxy services. The class org.apache.axis2.transport.local.NonBlockingLocalTransportSender implements the sender API. The transport does not have a receiver implementation and does not accept any configuration parameters as of now. This transport will work seamlessly against the ESB's Nhttp transport. This new transport is available with the latest [1] release of WSO2 ESB (ie. wso2esb-4.0.0). The binary distro can be downloaded from [2].

Scenario :

Inorder to demonstrate the use of local transport, let's consider following scenario. The ESB contains three proxy services. The stockquote client invokes the LocalTransportProxy. Then the message will be sent to the SecondProxy and then it will be sent to the StockQuoteProxy. The StockQuoteProxy will invoke the backend service and return the response to the client.

1) Without local transport
If you have a look at the above diagram you might notice that each call between proxy services are going through the network.

Synapse Configuration:

<definitions xmlns="http://ws.apache.org/ns/synapse">
<proxy xmlns="http://ws.apache.org/ns/synapse" name="LocalTransportProxy"
transports="https http" startOnLoad="true" trace="disable">
<target>
<endpoint name="ep1">
<address uri="http://localhost:9000/services/SecondProxy"/>
</endpoint>
<inSequence>
<log level="full"/>
<log level="custom">
<property name="LocalTransportProxy" value="In sequence of LocalTransportProxy invoked!"/>
</log>
</inSequence>
<outSequence>
<log level="custom">
<property name="LocalTransportProxy" value="Out sequence of LocalTransportProxy invoked!"/>
</log>
<send/>
</outSequence>
</target>
<publishWSDL uri="file:repository/samples/resources/proxy/sample_proxy_1.wsdl"/>
</proxy>
<proxy xmlns="http://ws.apache.org/ns/synapse" name="SecondProxy"
transports="https http" startOnLoad="true" trace="disable">
<target>
<endpoint name="ep2">
<address uri="http://localhost:9000/services/StockQuoteProxy"/>
</endpoint>
<inSequence>
<log level="full"/>
<log level="custom">
<property name="SecondProxy" value="In sequence of Second proxy invoked!"/>
</log>
</inSequence>
<outSequence>
<log level="custom">
<property name="SecondProxy" value="Out sequence of Second proxy invoked!"/>
</log>
<send/>
</outSequence>
</target>
<publishWSDL uri="file:repository/samples/resources/proxy/sample_proxy_1.wsdl"/>
</proxy>
<proxy xmlns="http://ws.apache.org/ns/synapse" name="StockQuoteProxy"
startOnLoad="true">
<target>
<endpoint name="ep3">
<address uri="http://localhost:9000/services/SimpleStockQuoteService"/>
</endpoint>
<outSequence>
<log level="custom">
<property name="StockQuoteProxy"
value="Out sequence of StockQuote proxy invoked!"/>
</log>
<send/>
</outSequence>
</target>
<publishWSDL uri="file:repository/samples/resources/proxy/sample_proxy_1.wsdl"/>
</proxy>
</definitions>
2) With local transport
In this sample, the communication between proxy services are done through the Local transport. Since Local transport calls are in-JVM calls, it will reduce the time taken for the communication between proxy services (will not introduce any network overhead).

Synapse Configuration:
<definitions xmlns="http://ws.apache.org/ns/synapse">
<proxy xmlns="http://ws.apache.org/ns/synapse" name="LocalTransportProxy"
transports="https http" startOnLoad="true" trace="disable">
<target>
<endpoint name="ep1">
<address uri="local://localhost/services/SecondProxy"/>
</endpoint>
<inSequence>
<log level="full"/>
<log level="custom">
<property name="LocalTransportProxy" value="In sequence of LocalTransportProxy invoked!"/>
</log>
</inSequence>
<outSequence>
<log level="custom">
<property name="LocalTransportProxy" value="Out sequence of LocalTransportProxy invoked!"/>
</log>
<send/>
</outSequence>
</target>
<publishWSDL uri="file:repository/samples/resources/proxy/sample_proxy_1.wsdl"/>
</proxy>
<proxy xmlns="http://ws.apache.org/ns/synapse" name="SecondProxy"
transports="https http" startOnLoad="true" trace="disable">
<target>
<endpoint name="ep2">
<address uri="local://localhost/services/StockQuoteProxy"/>
</endpoint>
<inSequence>
<log level="full"/>
<log level="custom">
<property name="SecondProxy" value="In sequence of Second proxy invoked!"/>
</log>
</inSequence>
<outSequence>
<log level="custom">
<property name="SecondProxy" value="Out sequence of Second proxy invoked!"/>
</log>
<send/>
</outSequence>
</target>
<publishWSDL uri="file:repository/samples/resources/proxy/sample_proxy_1.wsdl"/>
</proxy>
<proxy xmlns="http://ws.apache.org/ns/synapse" name="StockQuoteProxy"
startOnLoad="true">
<target>
<endpoint name="ep3">
<address uri="http://localhost:9000/services/SimpleStockQuoteService"/>
</endpoint>
<outSequence>
<log level="custom">
<property name="StockQuoteProxy"
value="Out sequence of StockQuote proxy invoked!"/>
</log>
<send/>
</outSequence>
</target>
<publishWSDL uri="file:repository/samples/resources/proxy/sample_proxy_1.wsdl"/>
</proxy>
</definitions>
If you are interested in running this local transport sample, refer [3]. I am planning to do a performance benchmark against this local transport. Stay tuned for my followup post on local transport performance.

References

Monday, June 13, 2011

WSO2 Enterprise Service Bus 4.0.0 Released

The WSO2 ESB team is pleased to announce the release of version 4.0.0 of the Open Source Enterprise Service Bus (ESB).

WSO2 ESB is a fast, lightweight and user friendly open source Enterprise Service Bus (ESB) distributed under the Apache Software License v2.0. WSO2 ESB allows system administrators and developers to easily configure message routing, intermediation, transformation, logging, task scheduling, fail over routing and load balancing. It also supports transport switching, eventing, rule based mediation and priority based mediation for advanced integration requirements. The ESB runtime is designed to be completely asynchronous, non-blocking and streaming based on the Apache Synapse mediation engine.

WSO2 ESB 4.0.0 is developed on top of the revolutionary WSO2 Carbon platform (Middleware a' la carte), an OSGi based framework that provides seamless modularity to your SOA via componentization. This release also contains many new features and a range of optional components (add-ons) that can be installed to customize the behavior of the ESB. Further, any existing features of the ESB which are not required to your environment can be easily removed using the underlying provisioning framework of Carbon. In brief, WSO2 ESB can be fully customized and tailored to meet your exact SOA needs.

You can download this distribution from http://wso2.org/downloads/esband give it a try.

Brand New Features in this Release

  • HTTP relay transport - Pure streaming HTTP transport based on Java NIO for ultra fast HTTP routing
  • Deployment synchronizer - Easily synchronize the configuration across a cluster of Carbon Servers
  • Message stores and processors - For advanced enterprise messaging and QoS enforcement (eg: in-order delivery, exactly once delivery)
  • Mediation templates - The concept of reusable functions to the ESB configuration language
  • Message broker - Built-in JMS provider/broker powered by Apache Qpid
  • FTPS support via file transport - Transfer files over SSH connections
  • Conditional router mediator - Implement advanced and complex routing logic at ease
  • URL rewrite mediator - Rewrite URLs and URL fragments efficiently
  • Custom XPath extensions - User defined custom XPath extensions support
  • New HL7 transport (optional) - Send and receive HL7 messages over MLLP and other transports
  • New eventing implementation - A powerful event broker with extensive support for WS-Eventing and topic management
  • Event mediator - Publish events to topics defined in the built-in event broker
  • LDAP user store - Built-in LDAP service based on Apache Directory Server
  • Dynamic registry keys and endpoint URL support - Construct registry lookup keys and endpoint URLs dynamically at mediation time
Enhancements in this Release
  • Improved Smooks mediator
  • Enhanced support for service chaining with the receiving sequence support in the send mediator
  • Improved weighted round robin algorithm for the load balance endpoint
  • Improvements to caching
  • Automatic schema imports from the WSDLs added to the registry (for proxy services)
  • Automatic schema imports from the schema files added to the registry (for validate mediator)
  • Support for setting properties at the endpoint level
  • Enhanced Enrich Mediator
  • Improved support for batch transfers in FIX transport
  • Validation support for the ESB configuration editor (source view)
  • Proxy service UI enhancements
  • Enhanced menu layouts
  • Local transport for fast in-VM service calls
Key Features of WSO2 ESB

  • Proxy services - facilitating synchronous/asynchronous transport, interface (WSDL/Schema/Policy), message format (SOAP 1.1/1.2, POX/REST, Text, Binary), QoS (WS-Addressing/WS-Security/WS-RM) and optimization switching (MTOM/SwA).
  • Non-blocking HTTP/S transports based on Apache HttpCore-NIO for ultra-fast execution and support for thousands of connections at high concurrency with constant memory usage.
  • Built in Registry/Repository, facilitating dynamic updating and reloading of the configuration and associated resources (e.g. XSLTs, XSD, WSDL, Policies, JS configurations ..)
  • Easily extendable via custom Java classes (mediator and command)/Spring configurations, or BSF Scripting languages (Javascript, Ruby, Groovy, etc.)
  • Built in support for scheduling tasks using the Quartz scheduler.
  • Load-balancing (with or without sticky sessions)/Fail-over, and clustered Throttling and Caching support
  • WS-Security, WS-Reliable Messaging, Caching & Throttling configurable via (message/operation/service level) WS-Policies
  • Lightweight, XML and Web services centric messaging model
  • Support for industrial standards (Hessian binary web service protocol/ Financial Information eXchange protocol and optional Health Level-7 protocol)
  • Enhanced support for the VFS (File/FTP/SFTP), JMS, Mail transports with optional TCP/UDP transports and transport switching among any of the above transports
  • Support for message splitting & aggregation using the EIP and service callouts
  • Database lookup & store support with DBMediators with reusable database connection pools
  • WS-Eventing support with event sources and event brokering
  • Rule based mediation of the messages using the Drools rule engine
  • Transactions support via the JMS transport and Transaction mediator for database mediators
  • Internationalized GUI management console with user management for configuration development
  • Integrated monitoring support with statistics, configurable logging and tracing
  • JMX monitoring support and JMX management capabilities like, Graceful/Forceful shutdown/restart
Bugs Fixed in this Release

This release of WSO2 ESB comes with a number of bug fixes, both in the base framework and the ESB specific components. All the issues which have been fixed in ESB 4.0.0 are recorded at following locations:

Known Issues

All the open issues pertaining to WSO2 ESB 4.0.0 are reported at following locations:

How to Run
  1. Extract the downloaded zip
  2. Go to the bin directory in the extracted folder
  3. Run the wso2server.sh or wso2server.bat as appropriate
  4. Point your browser to the URL https://localhost:9443/carbon
  5. Use "admin", "admin" as the username and password to login as an admin
  6. If you need to start the OSGi console with the server use the property -DosgiConsole when starting the server. The INSTALL.txt file found on the installation directory will give you a comprehensive set of options and properties that can be passed into the startup script
  7. Sample configurations can be started by the wso2esb-samples script passing the sample number with the -sn option (Please have a look at the samples guide for more information, on running samples)

How to Contribute

Mailing Lists

Join our mailing list and correspond with the developers directly.

Reporting Issues

We encourage you to report issues, documentation faults and feature requests regarding WSO2 ESB through the public ESB JIRA. You can use the Carbon JIRA to report any issues related to the Carbon base framework or associated Carbon components.

Discussion Forums

Alternatively, questions could be raised using the forums available.

WSO2 ESB Forum: Discussion forum for WSO2 ESB developers/users

Support

We are committed to ensuring that your enterprise middleware deployment is completely supported from evaluation to production. Our unique approach ensures that all support leverages our open development methodology and is provided by the very same engineers who build the technology.

For more details and to take advantage of this unique opportunity please visit http://wso2.com/support.

For more information about WSO2 ESB please see http://wso2.com/products/enterprise-service-bus.

-- The WSO2 ESB Team --