Monday, September 1, 2008

GSoC 2008 ....... Done

You may have noticed that my blog has gone rather silent in the last couple of months. Well, the reason was my Google Summer of Code (GSoC) project. The final deadline was on 18th of August so I worked really hard to deliver the goods on time and finally I can proudly state that I managed to successfully complete my project on time.

The objective of my GSoC project was to implement XML schema type alternatives support for Apache Xerces2/J, the legendary open source XML parser for Java applications. Type alternatives is the answer from W3C XML schema working group, for conditional type assignment problem. This feature was first introduced in the XML schema 1.1 structures specification. Type alternatives allow a type to be assigned to an element dynamically at validation time based on one or more conditions. Conditions are expressed as XPath 2.0 expressions. Here is an example element declaration which uses XML schema type alternatives.

As stated in the above code snippet the declared type of the message element is the complex type called messageType. However the element declaration also contains a few type alternatives. These type alternatives allow the type of the message elements to be determined at the validation time. Based on the conditions stated as the test attribute values the schema validator will assign a type for the message element prior to validating its content. The expressions '@kind' and '@code' refer to two attributes of the message element. The first type alternative will assign the type called messageTypeString if the kind attribute has the value 'string' and the code attribute has a value greater than 1000.

When the schema validator encounters an element declaration with one or more type alternatives it will evaluate the test expressions one by one until an expression which evaluates to true is found. When such a matching type alternative is found the corresponding type will be assigned to the element. If none of the type alternatives match then a default type will be assigned.

My project mainly consisted of two main sections. First section of the project was to implement the type alternatives traversal support so that Xerces2/J can properly traverse an XML schema document which contains type alternatives and add the corresponding information to the schema grammar. Implementing this was fairly easy and I managed to complete it prior to th GSoC mid term evaluations. The second part of the project was to implement type alternatives validation. This was fairly difficult since I had to develop a bare minimal XPath 2.0 implementation for Xerces2/J. Developing the XPath processor actually covered a significant portion of the entire project.

My workings will be fully available in the Xerces2/J code base (even now the code related to traversal part is in one of the SVN branches) very soon. All in all it was a great learning experience as it was a great opportunity for me to learn a whole bunch of cool technologies like XML, XML schema, and XPath 2.0. I also got the opportunity to put some of my knowledge on theory of computing into action and sharpen my programming skills. I would like to give my heartiest gratitude to the Google, the Apache community and very specially to my mentor Khaled Noaman for being a very supportive guide right from the start of my project.

Tuesday, August 19, 2008

Financial Applications with WSO2 ESB

It's getting better and better folks. FIX protocol support in WSO2 ESB is evolving in a blistering rate. This article by Asanka Abeysinghe shows how an entire broker trading platform can be re-engineered using WSO2 ESB. It combines a set of well known usecases of the FIX transport of WSO2 ESB and demonstrates how the ESB can be used to build complete financial applications.

However when looking back at the way things have gone this is nothing to be surprised of. Few months back Paul Fremantle, CTO of WSO2, infact predicted that FIX protocol support in WSO2 ESB will soon evolve to this stage.


Sunday, August 10, 2008

FIX Support in WSO2 ESB

WSO2 ESB is an ultra fast, lightweight, open source ESB based on Apache Synapse. The FIX transport implementation of Apache Synapse is fully operational in WSO2 ESB 1.7. Asanka Abeysinghe from WSO2 has recently published a comprehensive article on using the FIX transport in WSO2 ESB. He starts by giving a short introduction to the FIX protocol and goes onto explaining a number of interesting usecases for the FIX transport in WSO2 ESB.

If you are looking for a powerful SOA based solution to deal with your FIX transactions, this is a must read for you. While you are at it don't forget to take a peek at the article titled 'Apache Synapse FIX'ed', and article I wrote few months back introducing the FIX transport implementation of Apache Synapse.

Saturday, August 9, 2008

Fixing the FIX Transport

The 1.2 version of Apache Synapse, the open source lightweight ESB was released on June 2008. One of the most striking features of this release was the FIX transport implementation, mainly due to the fact that most ESBs in the world still do not support the FIX protocol. The Synapse FIX transport implementation which is only two months old at the moment has already made a lot of hype in the world of Software Engineering and SOA. It seems we already got a few interested people (potential clients?) who are at the moment testing and playing with the transport.

Synapse 1.2 ships with two samples that demonstrate the FIX transport module. One of them demonstrates how two FIX endpoints can be bridged using Apache Synapse. The other samples shows how to bridge an HTTP client with a FIX endpoint. Over the last couple of months the Synapse community has worked really hard to further improve the FIX transport implementation and also to identify more exciting usecases for the transport module. As a result we managed to add four new samples demonstrating the FIX transport to the Synapse documentation. These samples are currently available in the Apache Synapse Snapshot and will be most likely included in the next release.

The first of the four newly added samples (sample 259) shows how to bridge a FIX client with an HTTP endpoint. The sample effectively demonstrates how Banzai, the sample FIX blotter that ships with Quickfix/J can be used to send order requests via Synapse to a service listening on HTTP. The sample uses the XSLT mediator to convert the FIX messages into a SOAP messages.

The second of the new samples (sample 260) shows how Synapse can be used to bridge a FIX endpoint with an AMQP endpoint. Here once the FIX message is converted into XML it will be bound to a JMS payload and sent to an AMQP consumer. Since AMQP is used widely in business applications, I believe that this sample will open up the door way to a ton of really cool usecases.

The third sample (sample 261) demonstrates how Synapse can be used to switch between FIX sessions with different versions (BeginString values). The sample successfully bridges a FIX 4.0 session with a FIX 4.1 session but the underlying concepts can be used to bridge virtually any two FIX sessions. One thing worth mentioning here is that the FIX transport implementation of Synapse initially did not support bridging FIX sessions of different versions. But considering the potential usecases, we implemented that feature very recently.

The fourth newly added sample (sample 262) demonstrates how CBR (Content Based Routing) can be done with FIX messages using Apache Synapse. The sample configuration causes Synapse to accept FIX messages over a session, read a certain symbol in the messages and based on the symbol value route the messages to different endpoints.

We also added namespace support to the FIX transport module so that it can properly parse and validate XML based FIX messages with namespaces. Another recent feature addition was improving the way FIX sessions are initialized in Synapse. The initial implementation lazy initializes all the FIX sessions for outgoing FIX messages. That means an outgoing session will not be created until a message arrives for that particular session. However since this leads to fairly large delays we improved the transport module so that the outgoing sessions are also initialized at the startup along with the incoming sessions. (the old way of initializing sessions is also supported)

Currently we are working on adding support for FIX repeated groups. (we already have a feature request for this on the JIRA from one of our users) All in all it seems that the FIX transport module for Synapse is increasingly becoming a very powerful and matured piece of software in a blistering rate.

Thursday, June 26, 2008

Be Careful Using Ubuntu Update Manager

Ubuntu Linux comes with a pretty cool Update Manager tool which searches for software updates and patches on the Internet and provides options to install them. I've been using this tool for months to install various updates on my system. The best thing about the Ubuntu Update Manager is that, it not only updates the OS but also updates the drivers and other utilities installed on the system. Everything seemed to work fine until I installed some kernel updates on my system using the Update Manager.

After applying the updates the Update Manager required a system restart to complete the update process. This has happened before so I patiently complied. But when the system rebooted I noticed that my system has gone dumb. Sounds were not working at all. And then I tried to connect to the Internet via Wi-Fi, only to find that my wireless network device is also screwed up. Luckily for me I have some friends who are professional Linux experts. I hooked up my computer to a wired network and contacted them over the Internet.

Fixing the wireless connectivity issue was not a big deal. The very Update Manager which got me into trouble helped me out. I installed a bunch of driver updates listed by the Update Manager. Then after a system reboot my Wi-Fi device was back up and running.

The difficult part was fixing the audio related issue. I had to fire up the synaptic package manager and install a couple of Linux backport modules and restart the system to get sounds working again.

However all in all it was yet another learning experience for me. If you are a regular Ubuntu Linux user like me, my advice to you is be careful when installing kernel patches using the Update Manager. Know what you are doing. Be ready to deal with some undesirable results.

Wednesday, June 11, 2008

WSO2 WSAS 2.3 Released

The WSO2 WSAS team is pleased to announce the release of the WSO2 WSAS 2.3. WSO2 WSAS is an enterprise ready Web services engine powered by Apache Axis2 release under the Apache Software License 2.0.

This release can be downloaded from;
http://wso2.org/projects/wsas/java


From the WSO2 WSAS 2.3 - Release Note - 10th June 2008

WSO2 WSAS is an enterprise ready Web services engine powered by Apache Axis2 which offers a complete middleware solution. It is a lightweight, high performing platform for Service Oriented Architectures, enabling business logic and applications.

Bringing together a number of Apache Web services projects, WSO2 WSAS provides a secure, transactional and reliable runtime for deploying and managing Web services.


Key Features

* Data services support - Expose you enterprise data as a services in a jiffy
* WSAS IDE - Eclipse IDE integration
* Clustering support for High Availability & High Scalability
* Full support for WS-Security, WS-Trust, WS-Policy and WS-Secure Conversation and XKMS
* EJB service provider support - Expose your EJBs as services
* Axis1 backward compatibility - Deploy Axis1 services on WSAS & Engage advanced WS-* protocols in front of legacy services
* JMX & Web interface based monitoring and management
* WS-* & REST support
* GUI, command line & IDE based tools for Web service development


New Features In This Release

* Improved interoperability
* Improved Data Services support
* Various bug fixes to Apache Axis2, Apache Rampart & WSAS
* WSO2 Mercury Integration - A new WS-RM Implementation


Data Services - Bringing Enterprise Data to Web

* Service enable data locked in relational databases, CSV & Excel files in no time
* Zero code. Simple descriptor file describes the data to service mapping
* Controlled access to your data
* Customizable XML output
* Benefit from REST & WS-* support
* Built-in Connection pooling support
* Supports exposing Stored procedures & functions
* Built-in caching
* Throttling - to ensure your database is never overloaded.
* Easy configuration via graphical console
* Test your services via Try-it tool


Training

WSO2 Inc. offers a variety of professional Training Programs, including

training on general Web services as well as WSO2 WSAS, Apache Axis2, Data Services and a number of other products.

For additional support information please refer to
http://wso2.com/training/course-catalog/


Support

WSO2 Inc. offers a variety of development and production support programs, ranging from Web-based support up through normal business hours, to premium 24x7 phone support.

For additional support information please refer to http://wso2.com/support/

For more information on WSO2 WSAS, visit the WSO2 Oxygen Tank (http://wso2.org)