Saturday, April 12, 2008

First Step into The World of Web Services

Down the Memory Lane...

Information technology has grown in leaps and bounds over the last two or three decades. It has gradually developed into a state which was never anticipated at the inception of the computer technology. Today, computers are used as a powerful business tool, a medium of communication which connects people all around the globe and an unlimited source of information and entertainment. Computers play a major role in almost all kinds of businesses and have become a key ingredient in the areas like education, communication and resource management.

Probably the two most important driving forces behind this rapid and significant improvement of information technology are the developments in the technologies (hardware and software) itself and the introduction and rapid growth of the World Wide Web (WWW).

Hardware and software technologies have gone through some major improvements in the last few decades. Few years back having a computer running on a 400MHz Intel Pentium II was considered great. I used to admire some of my friends who had such computers. But nowadays having a computer of that nature will make others think either you are extremely poor or you have gone nuts. This is a simple indication of how hardware technologies have developed. Nowadays finding a computer running on a processor with a clock speed in excess of 3.0GHz and having physical memory in excess of 1.0GB is sometimes easier than finding a loaf of bread. Software technologies are not so far behind hardware in terms of performance and features. The days of small software applications with boring UIs and meager capabilities are long gone. Enterprise scale software applications with loads of features and dashing interfaces have come into play. Industry no longer talks about small applications. If a software does not have much features it is considered bad.

The WWW has given an entirely new set of capabilities to the existing software. Even though the WWW was initially used merely as a source of information and a medium to publish and retrieve information, today it is being used for things which were never thought possible few years back. With WWW the software residing in one physical machine can communicate and collaborate with some other software located in a distant remote machine to get some job done. This has become a possibility mainly because of the inception of the concept of Web services. According to the W3C a Web service is defined as follows.

"A software system designed to support interoperable machine to machine interaction over a network"

The keyword to be noted here is 'interoperability'. Web services allow machines and software systems to interoperate by exchanging data and information among them without relying on their underlying implementations. This means a software systems written using Microsoft .NET framework running on Microsoft Windows operating system may collaborate with a software system written using Java running on Linux operating system. As long as the two systems can understand the messages sent by the each other system they can work in collaboration like a newly married couple.

Web Services is the Way....

Web services can be very helpful (may be more than just 'helpful') in today's complex and growing network of businesses. Today, organizations around the globe often need to collaborate with many other organizations to get jobs done. Concepts like outsourcing, globalization and internationalization have become necessary ingredients of all types of business models. With this kind of dynamic communication and collaboration oriented businesses and organizations, even standalone enterprise software systems do not stand much of a chance. Different organizations use different kinds of technologies, different types of hardware platforms and different types of software systems. Trying to enable these diverse systems to collaborate could be difficult than finding kryptonite without Web services. As mentioned before Web services allow systems to leave their technological and environmental differences behind and interoperate to get a particular job done.

Also Web services allow valuable resources (eg: databases, software APIs) to be accessed and used remotely by a large number of people. Thanks to the Web services people no longer have to work on one dedicated PC anymore. They can decide to work at home, at a friend's place or at the other end of the world. Web services are very flexible in that we can develop different types of client applications with different capabilities to consume the same Web service. Web services are generally secured, reliable and easy to manage and maintain.

Many organizations around the world are fast switching to Web services from casual software systems because they are more reliable and cheaper. It gives a whole lot of confidence, flexibility and freedom to the end user and improves the profitability of the organization as a whole. Organizations that use Web services are more visible and reachable from the point of view of the external world. Web services are getting attention all around the world due to these reasons any even most of the software companies now openly support development and use of Web services. Some organizations like WSO2 and Apache Software Foundation have clearly undertaken the mission of popularizing the use of Web services at industry level and at day to day applications.

A Glimpse at Web Services Platform...

Web services are fairly complex software systems to understand. They are made of many different components. So a layered model (a stacked model) called the Web services stack is used to easily analyze and understand the principles behind Web services. Two key ingredients of the Web services platform are HTTP and XML. HTTP is an application layer protocol in the TCP/IP stack commonly used in WWW. XML is a simple but very effective language that can be used for message passing and data representation. In Web services XML is the most commonly used medium of message passing. Almost all the key protocols and standards are built around XML.

Adhering to the standards and specifications is very important in Web services. To enable two different systems to communicate and collaborate it is vital to have an agreed upon set of standards. Then only the messages sent by one party can be fully understood by the other parties. SOAP is one standard protocol used in Web services for message passing. It is based on XML and provides the basic messaging framework for Web services and forms the foundation layer of the Web services stack. Upon this foundation formed by SOAP many other abstract layers can be built to complete the Web services stack. Higher layers of the Web services stack provides more advanced features like Web services security, Web services policy and Web services manageability.

WSDL, another XML based language is used to describe Web services to external parties so they can properly communicate with the Web services and build up client applications to consume Web services.

The Dark Side of Web Services...? - Well it's Not That Dark...

One major point against the popularization of Web services is that they are very complex to understand and difficult to develop. Some people question the performance levels achieved by Web services due to the use of XML, SOAP and HTTP. Some argue that Web service principles tend to violate the normal model on which the Internet operates. According to the TCP/IP stack HTTP resides in the application layer and that is the top most layer. With Web services we mount another set of layers on top of application layer or to be more specific on HTTP.

However in my personal opinion Web services are in existence as a result of the inevitable improvements in the technology and changing user requirements. Therefore sooner or later they are going to dominate the world of information technology. This transformation is gradually taking place as you read this page. New development techniques, tools and frameworks have been developed for easy development of Web services and client applications. As a simple example, the WSO2 Web Services Application Server, a state of the art server for Web services (with lots of other features) comes with a plugin for the popular IDE Eclipse. With that the end user can easily develop Web services using Eclipse and directly deploy them using the WSO2 Web Services Application Server (you don't have to know a damn thing about Web services stack and stuff). Many popular IDEs today, including Eclipse and Microsoft Visual Studio support development and testing of Web services. Lot of support and guidance is also available for Web services developers.

Web services are indeed the next big thing! (Perhaps they already are) Because of that may be after few years people will start making fun of enterprise software systems like they do now about those old console based applications. (“Console applications...ha ha ha...what a retard!!!”)

2 comments:

Ara said...

Just dropped in for a peek...
And the stuff looks awesome..!!!

Great work buddy! Keep it up..
hoping to see a lot more tech stuff from you...

Dhanuka said...

You have already proven that you have
the ability to write tough technical things keeping them very simple...
Fantastic effort, I learn lot about basics here, Thanks Hira.