Feeds:
Posts
Comments

In some of my previous blogs [1], [2], [3] I mentioned about some of the open source performance testing tools I have been using. Among them were httperf, Autobench, Apache Bench and Java Bench.

I used these tools heavily to performance test WSO2 open source products. While doing so I understood that the performance test tool, usually the load generator is not alone adequate to fulfill my performance test requirements. Load generation is only a part of my requirement. The bigger picture required a systematic approach to performance testing which, none of these tools alone could fulfill. So what are my requirements?

– Provide easy to use standard configuration system so that tests could be configured easily.

– A standard way to provide my input for the tests

– A standard way to collect output from my tests.

– Way to collect system statistics while running the tests

– Automate the whole process. Just provide input data, required configuration and run the test. That’s it. Then collect the results

– A standard way to organize tests and the results

Commercially avaiable performance testing tools provide some or all of these requirements but for a very high cost. The name of the framework I implemented with Eranda to fulfill above requirements, is Ravana. Ravana will be released during next couple of weeks licensed with GPL. Ravana will be released with helpful documentation that will get you familiar with Ravana immediately.

Using Ravana is simple. All your input, configuration, output for a particular test scenario will come  under one test scenario you define. You just need to define your input, configuration under that scenario and then run the test.

With Ravana you can use one of httperf, java bench or apache bench as the load generator. It also support a JMS load generator.

If you are too curious and need immediately try  Ravana, check it out from https://svn.wso2.org/repos/wso2/branches/commons/performance-tools/ravana2. The code in svn is pretty stable now.

[1] https://damithakumarage.wordpress.com/2009/03/15/benchmark-testing-with-httperf/

[2] https://damithakumarage.wordpress.com/2008/07/20/profiling-tools-that-i-used-to-profile-axis2c/

[3] https://damithakumarage.wordpress.com/2008/07/11/benchmark-testing-tools-for-web-services/

Advertisements

WSO2 ESB Performance

I uploaded  an  article [1] with the latest performance numbers of WSO2 Enterprise Service Bus. It is quite a long time since WSO2 last published it’s ESB performance numbers. During that time it released performance numbers on customer request on various instances.

WSO2 ESB has undergone various feature additions during that time. It is now based on WSO2 Carbon (with ESB 2.x family of products). WSO2 Carbon[2] provides the development framework and the runtime environment for the WSO2 products including the ESB. I am not going to talk all the new features here. WSO2 Oxygen Tank library is full of articles/tutorial written on WSO2 ESB. So decided it is time again to publish some performance numbers.

In Previous articles the performance was compared with different open source and commercial competitors.That is a time WSO2 was desperately searching for a niche in the middleware market. Now WSO2 ESB has established it’s ground firmly in the middleware ESB market, it has changed it’s approach on publishing performance numbers. No comparison with other vendors. We just publish our numbers and provide a performance test framework freely for our customers(or any interested user) to download and verify the results and, also do perform their own comparison with the products of their choice. This performance testing framework will be available soon on WSO2 Oxygen Tank.

This article has taken a different approach from previous performance test articles of WSO2 ESB in various aspects. I would like to discuss some of them here

First, the way performance presented is different. To quote from the article

“For each scenario each message size load is generated with concurrency varying from 20 to 300(increasing by 40 at each stage). Then the maximum transactions per second(TPS) achieved during this concurrency range is recorded as the Transactions per second(TPS) for the corresponding scenarios message size.”

What does that mean?.  From the experience of the previous performance tests I could see that  WSO2 ESB performs best at the concurrency range from 20 to 300. So I decided that the best performance number for a particular message size within that range would be the best choice to present to the reader. My original plan was to break several ranges like

20-300, 300-900 and 900-1800. But that could overly make the results complex. So I omitted the higher concurrency results from the article to avoid unnecessary cluttering.

Besides I wanted to capture results for a wider message size range. I thought that the concurrency range mentioned in the article best suited for that purpose.

Also my approach this time is to present the numbers in best possible way, so that one could easily grasp the results in easy to read graphs. When you compare the graphs from round3 this could be easily understood.

Note that I have done the performance test without keep alive enabled. HTTP keep-alive is great to improve performance. But it is not the best way to say that your product has good performance. My understanding
is that, to emulate how the server react to real world scenario of concurrent users, the best way is to assume that each tcp connection represent a user. So my decision was to ignore how many requests each user do on a particular connection.

In the article I have provided enough information to reproduce the performance test scenarios. . I have not done any special tweaks to gain extra bit of performance, other than the things I have mentioned in the article. Providing the exact scripts, messages in files etc for somebody to immediately reproduce the results is a bonus. Yet WSO2 have planned a something more than a bonus. It will soon upload into Oxygen tank a great open source performance test framework which I sincerely hope will serve as a good platform for benchmark tests for many open source projects. It is a fun to reproduce the performance numbers provided in the article  using that tool.

[1] http://wso2.org/library/articles/2010/08/wso2-esb-performancenew

[2] http://wso2.com/products/carbon/

We are 5

Last week WSO2 celebrated 5 years in all grandeur befitting the success it achieved so far.
When I joined WSO2, 5 years ago it composed of a bunch of young extremely talented people guided by Dr. Sanjiva and Paul Fremantle, driven by a passion to become a global brand.
The ongoing success of WSO2 could be briefed in these words. Vision, Culture and Passion.

Vision: Dr. Sanjiva Weeerawarana, Paul Fremantle, James Clerk and Jonathan Marsh. These people are great visionaries of the XML and Web Services technology. Without their vision, without their guidance WSO2 would not be here today.

Culture: WSO2 have a unique culture which is blender of open source thinking, Sri Lankan ingenuity, Freedom, sports, off-site meetings, tours. People here don’t consider work as work. it is their life. They blend work nicely with freedom, pastime, happiness.

Passion: It is the passion that binds the WSO2 threads together. As I understand even a genius who is non-cooperating, non-passionate, unapproachable is useless when it come to the success of a software product. WSO2 is gifted with several genius people who are quite the opposite.

Now WSO2 fast growing with number, quality I sincerely hope that it’s community will keep the good things that helped it so far, up to the future.

vimperator

I have been using firefox in vimperator mode for some time. It is an extremely fun way to browse the web for an vi addict.
Once a vi user, get addict to it I’m sure he will never go back to usual firefox mode using mouse.
I can navigate pages and links, add and search bookmarks and  more importanty search the vi way, so much easily without moving my hands off the keyboard.

Of course good old Lynx is still usable in these modern days of the web. It is immensely valuble on certain low bandwidth environments.

WSO2 Web Services Framework for PHP v2.1.0 Released
=====================================================
We are pleased to announce the release of WSO2 WSF/PHP 2.1.0
WSO2 Web Services Framework for PHP (WSO2 WSF/PHP), is an open source,
enterprise grade, PHP extension for providing and consuming Web Services in PHP.
WSO2 WSF/PHP is a complete solution for building and deploying Web services  and is
the only PHP extension with the widest range of WS-* specification implementations.
It’s Key features include, secure services and clients with WS-Security support,
binary attachments with MTOM, automatic WSDL generation (code first model),
WSDL mode for both services and clients (contract first model)
and interoperability with .NET and J2EE.
You can download the release from:
Project home page:
————
Key Features
============
1. Client API to consume Web services
* WSMessage class to handle message level options
* WSClient class with both one way and two way service invocation support
* Option of using functions in place of object oriented API with ws_request
2. Service API to provide Web services
* WSMessage class to handle message level options
* WSService class with support for both one way and two way operations
* Option of using functions in place of object oriented API with ws_reply
3. Attachments with MTOM
* Binary optimized
* Non-optimized (Base64 binary)
4. WS-Addressing
* Version 1.0
* Submission
5. WS-Security
* UsernameToken and Timestamp
* Encryption
* Signing
* WS-SecurityPolicy based configuration
* WS-Secure Conversation
6. WSDL Generation for Server Side
* WSDL generation based on annotations and function signatures, and
serving on ?wsdl or ?wsdl2 requests
7. WSDL mode support for both client and server side
* Write services and client based on a given WSDL
* WS-Addressing and WS-SecurityPolicy is supported in WSDL mode
* MTOM is now supported with WSDL mode
8. REST Support
* Expose a single service script both as SOAP and REST service
9. Provide easy to use classes for common services
* Consume some well known services such as Yahoo search and Flickr
and Amazon services using predefined classes
10. wsdl2php.php script. This script can generate PHP classes for services
and clients for a given WSDL to be used with WSDL Mode .
11. Data Services API
PHP Data Services API that enables exposing database queries as web services.
——————————–
Major Changes Since Last Release
================================
* Many issues were fixed since last release.
* API Improvements for WS-Addressing, WS-Security.
* Compatibility changes for PHP 5.3.
* Enabled built-in guththila xml parser.
* Preformance enhancements.
——————-
Reporting Problems
===================
Issues can be reported using the public JIRA available at:
————
Contact Us
============
————-
Mailing lists
============
Please subscribe to our user or developer mailing lists. For details on how
to subscribe please visit: http://wso2.org/mail#wsfphp
—————–
Discussion Forums
==================
Questions could be raised using the WSF/PHP forum.
Training
========
WSO2 Inc. offers a variety of professional Training Programs which includes training on WSF/PHP.
For additional support information please refer to http://wso2.org/training
Support
========
WSO2 Inc. offers a variety of development and production support programs, ranging from Web-based support
up through normal business hours, to premium 24×7 phone support. For additional support information
please refer to http://wso2.com/support/
We welcome your early feedback on this implementation.
Thank you for your interest in WSO2 WSF/PHP.
— WSO2 WSF/PHP Team —

A book of five rings

These days I am reading two different translations of the same book “Go Rin No Sho” a book originally written by famous Japanese warrier Miyamoto Mushashi(1584-1646).  Why two translations of the same book and why I read both?. To understand let’s go into some detail.

Miyamoto Mushashi lived in a time where Feudal Japan is ruled by various warrier clans. He was a wondering Samurai (Ronin) who travelled alone honing his sword skills. He faced many duals with famous Samurai many of which were between life and death.

He survived all the duals  he fought and later his life he lived an ascetic life and just few months before his death wrote “A book of five rings”. This book was about strategy. The strategies he learned from his life and death duals and his life long learning. Those days his followers used these strategies in real war. As time passed when business became the war between people, companies and nations, some started to use those strategies in business.
The translation by Victor Harris try to interpret the original content intended by Mushashi. The translation by Thomas Cleary try to interpret the ideas targeting the business world.

The idea is that wherever strategy is involved these ancient techniques still give insight into winning. Present WBA heavyweight boxing champion David Haye said that his camp trained according to Art of War by Sun Tzu, another ancient strategy book famous among todays strategists. His opponent was seemingly ahead of every aspect but to astonishment of many(including me), he won the fight.

It is said that Australian cricket team and Philiphines Manny Pacquiao(currently WBO welter weight champ) and many other sport teams also use Art of War.
Some of the well know general guide lines of Mushashi are as follows

1. Do not think dishonestly.
2. The Way is in training.
3. Become acquainted with every art.
4. Know the Ways of all professions
5. Distinguish between gain and loss in worldly matters.
6. Develop an intuitive judgement and understanding for everything.
7. Perceive those things which cannot be seen.
8. Pay attention even to trifles.
9. Do nothing which is of no use.

I have a proxy service deployed in my esb server. This service will verify the signature of the incoming messages and decrypt them before sending it to the target service. I send the messges to ESB using WSO2 wsclient which is bundled with WSO2 WSF/C. To sign the messages I use Alice’s private key. To encrypt the messages I use the public key received from ESB ( You can find Alice’s samples keys bundled with WSF/C samples. More on ESB keys during this article).

To deploy that service I followed the following procedure. I first created a simple pass through service using the Add/Proxy Service menu. I gave the target server as my WSAS instance running on a separate server. After that I selected the created proxy service and added security using the Sign and Encrypt option. I also gave the private and trusted key store as wso2carbon.jks. I also added Alice’s public key to the wso2carbon.jks key store using WSO2 ESB admin console facilities.

Now my services are ready, I wanted to use WSO2 wsclient (A command line web services client tool) to access the service through ESB. To learn more about how to use wsclient and how to secure your messages using it please refer to [1] and [2]. To encrypt and sign messages wsclient use server certificate in PEM format. We give the server certificate using –recipient-certificate option.  Usually I use my wsclient command line tool to access web services deployed in Apache2 server. So I knew how to generate my server certificates in PEM format from  PKCS key stores. But did not know how to generate PEM certificates from JKS key stores. Howerver I could not find a direct way to do this. Following is how I did this using java keytool and openssh x509 commands.

keytool -export -file wso2carbon.cer -keystore /wso2carbon.jks -alias wso2carbon

In this step we create a wso2carbon.cer file using wso2carbon.jks server keystore. Here you will be asked the password for the keystore entry alias.

After that I executed the following command to create the recipient certificate in PEM format.

openssl x509 -out wso2carbon.pem -outform pem -in wso2carbon.cer -inform der

Now I could use the created pem certificate to execute the following command to access the service

./wsclient –log-level error –no-wsa –soap –no-mtom –sign-body –key /alice_key.pem –certificate /alice_cert.cert –recipient-certificate /wso2carbon.pem –encrypt-payload –policy-file ./policy.xml  http://localhost:8280/services/SignEncProxy < ./data/POService.xml

 

[1] https://damithakumarage.wordpress.com/2008/10/04/access-secure-enabled-web-services-from-command-line/

[2] https://damithakumarage.wordpress.com/2010/05/25/using-wso2-wsclient-generate-your-custom-soap-messages-for-you/