Monday, July 21, 2008

WSO2 Mashup Server 1.5 released

Its been a couple of busy weeks and the effort is worth it. We've been busy working on the Mashup Server 1.5 release which has a bunch of new features.

The following are some of the new features in this release,
  1. Integrated Data Services Support - Users can now create Data Services using the Mashup Server itself. Data Services makes it trivial to expose data locked up in databases, csv files or excel spreadsheets.
  2. Ability to Secure Mashups - Users can now secure mashups running on the Mashup Server by the click of a button. The Mashup Server ships with 15 most commonly used security scenarios which are based on WS-Security. This allows users to control access to their mashups.
  3. Ability to call Secure Services with ease - Calling secure services has never been this easy. Users can call secured services using the Mashup Server by just writing a couple of lines of JavaScript code.
  4. Support for gadgets - Any mashup running on the Mashup Server can be exposed as a google gadget which can be hosted on the Mashup Server itself or igoogle.
  5. Personalized Dashboard - The Mashup Server can also act as a personalized dashboard. More details on that can be found here.
  6. OpenID login support - In the previous release we introduced infocard based login support and in this release we've gone even further and added openID based login support which is powered by the WSO2 Identity Solution.
  7. Service Lifecycle support - Service Lifecycle helps manage life cycle of a particular mashup you deploy in the WSO2 Mashup Server.
There are just a few of the features we've added to this new release. For full details please refer the release note. Stay tuned for more details and usages of these features. We'll be upgrading mooshup to use this new release in the coming days. Until then if you wanna try the WSO2 Mashup Server please feel free to download it cause its available freely under the Apache License.

Thursday, July 3, 2008

Tough Competition Brings Out The Best

India vs Pakistan is big when it comes to anything. Cricket is no different to that and India vs Pakistan is one of the most hard fought contest you could ever find. India and Pakistan clashed in a crucial Asia Cup 2008 match yesterday. What a clinical chase it was by Pakistan who hunted down the mammoth 308 scored by India. Pakistan was under pressure as they had already lost to Sri Lanka and they needed a victory to keep there hopes alive of getting into the finals. Sri Lanka had already booked their place in the final.

On a placid batsman friendly wicket India posted 308. Chasing down anything over 300 is not easy and to do it under so much pressure takes a lot of courage. Whats more Pakistan were without their regular captain Shoaib Malik and it was Misbah-ul-Haq who had to fill his shoes. Misbah is new to the scene having played just 39 matches and he showed tremendous maturity in yesterday's Match.

What I want to highlight here is that Tough Competition Brings Out The Best. It can bring out the best of a person, company or even a Product. Thats exactly what happened in yesterday's match. Pakistan was under so much pressure and that brought the best out of Misbah-ul-Haq and Younis Khan.

The same can be said about software. Lets take the Enterprise Service Bus (ESB) for example. We did some performance testing on comparing the WSO2 Enterprise Service Bus (ESB) with some other Open Source and proprietary ESBs. If you take a look at Round 1 and Round 2 you would see that the WSO2 Enterprise Service Bus (ESB) was the fastest. Now take a look at the latest (Round 3) results too. The proprietary ESB which was slower in the previous rounds showed better performance. Competition brought the best out of it. I'm pretty sure that this result will encourage our ESB team to perform better next time. Tough competition is always good and it helps us improve our selves.

The same can be said about the WSO2 Registry. This has stiff competition from Mule Galaxy another open source registry. You can see a comparison of the WSO2 Registry and Mule Galaxy here which was done by Deepal.

Using TCP Monitor to Debug Web Service Calls

TCP Monitor is a great tool when it comes to debugging Web Service calls. It acts as a proxy between your client and the actual service, hence it helps you to have a look at the wire message and figure out whats going on. It comes as an IDEA and Eclipse plugin as well.

Here is how you configure the TCP/IP Monitor Plugin in IDEA.

1. Goto File->Settings->Plugins
2. Search for TCP and you will find Axis TCP Monitor Plugin
3. Right click->Download and Install
4. Restart IDEA
5. You will see TCPMON appear on the right panel. You could also access it at Window->Tool Windows->TCPMON
6. Set Listen port # to 8080, Target HostName (The place where the service is at, if its running locally localhost), Target Port # (the port which the service is running on)
7. Click add
8. Configure your client to send the request to the TCP monitor instead of the actual service (for e.g localhost:8080) and the TCP monitor will forward it to the actual service. You will see the message on the TCP monitor.

Here is how you configure the TCP/IP Monitor Plugin in Eclipse.

1. Goto window->show view->other
2. Search for TCP and you will find TCP/IP Monitor
3. Right click->properties
4. click add
5. Set local monitoring port to 8080, host name (The place where the service is at, if its running locally localhost), port (the port which the service is running on)
6. Configure your client to send the request to the TCP monitor instead of the actual service (for e.g localhost:8080) and the TCP monitor will forward it to the actual service. You will see the message on the TCP monitor.

Tuesday, July 1, 2008

Web Services Cannot Get Any Simpler

If someone was to ask "what is the easiest method to write a Web Service?" my definite answer would be the WSO2 Mashup Server. The WSO2 Mashup Server helps you write services (or Mashups which ever you want to call it) using JavaScript with the E4X extension. Will blog more about E4X and its ease of use in the coming days (Stay tuned for that). Writing Services using the Mashup Server can be done in a matter of minutes. Here is the simplest Web Service you could write,

function sayHello() {
return "Hello";
}

Just drop this bit of script as a file into a magic folder (Into your mashups folder found in the scripts directory. Each user is given his own mashups folder depicted by his username) with the .js extension (example hello.js) and your service will get deployed. Lets assume that hello.js was dropped into scripts/keith. This would make the service available at http://localhost:7762/services/keith/hello. Browse to the above location and see what happens. The Mashup Server will show you a tryit page. This is a page thats generated by the Mashup Server on the fly so that you can test your web service out.

You can even access the sayHello service by pointing your browser to http://localhost:7762/services/keith/hello/sayHello. This would invoke the sayHello function in a RESTfull manner.

One can also use the Mashup Server without downloading it. Check out mooshup.com which is a Mashup Server that we've hosted for you. Try creating your own mashups there (You will have to use the UI to create services there cause you do not have direct access to the file system). You can even create a mashup on your local distribution and share it to mooshup. You can have a look at this simple hello service at https://mooshup.com/mashup.jsp?path=/mashups/keith/hello. BTW the Mashup Server is released under the Apache License. So you can download and give it a try your self too. There are no restrictions.

This is the simplest Web Service one could write. The Mashup Server has capabilities to do much more for you. Please refer the Mashup Server project page for more details.

Stay tuned for more tips and tricks about the WSO2 Mashup Server and also Apache Axis2 (The engine behind the Mashup Server)