Web of Services
In today's Web-centric world, it is convenient to think of entities or resources that are connected to each other through some mechanismby means of a hyperlink in its most simple form. The primary purpose of the Web is to make it easy to share information between interested parties through Web pages. These pages, together with the hyperlinks, create a web of information. Any visitor to a page can jump to another by following the hyperlinks, or by explicitly providing the Uniform Resource Locator (URL) for the page of interest. This is the state of most of the WWW as we know it today. This infrastructure is what also facilitates the e-commerce applications for companies that want to reach their customers over the Internet. We can extend the concept of the Web to include not only pages, but more active components of the Internetnamely, the services. A web of services is similar to the web of pages in a lot of ways. For example, they will be connected to each other through some mechanism, and their users will be able to go from one service to the other using these links. However, the service web is also very different from the web of pages. It is these differences that distinguish the web of services from the web of pages. The principal differences are in the form of service interactions. We can classify these interactions in three different categories:
Service deployer-to-service deployer interaction
We have been talking about the services until now without any specific definitions for that word. The definition we give below is not expected to be something that will be all-encompassing, but rather a working description of the notion of service
A service is an active program or a software component in a given environment that provides and manages access to a resource that is essential for the function of other entities in the environment.
It is important to note that the notion of resource is rather broad in this definition. A resource can be a piece of hardware (such as a hard disk) or software (such as a math library). It can also be some data in a database or some information, such as a news item. This definition is somewhat simplistic, yet very powerful. A service need only be a program or a library function to qualify.
The key, however, is in the provision and management of a resource. Provision means that the entity has to make the resource available to other entities, and management denotes controlling and granting the access rights. You can see that this automatically mandates interaction with other entities in its environment. Thus, a program or a software component that does not interact with other entities does not qualify as a service.
An equally important aspect is controlling a resource that is desirable by other entities in the service environment. Any resource that is useful only internally to the program does not help to make that program a service. As can be noted from this definition, a service is an active component, whereas a Web page is a static, one-time representation of some information. One can interact with a service (to access a certain resource that the service manages), and the service responds back with a response (rejecting or providing access to the resource). One could argue that a page can do something similar but, in fact, it is the Common Gateway Interface (CGI) program or the servlet behind the page that responds to the request. The page provides the means for communication between the user and the program or the servlet. It is the CGI program or the servlet that is acting as a service in this case.
The interactions with active components such as services are richer when compared with passive components such as Web pages. A service can show a high level of dynamism while catering to the user. Thus, a high degree of customization and flexibility can be achieved, which gives a better user experience. So far, we have been delivering the services through a series of Web pages. Today, this dynamism is exhibited through technologies such as JSP, ASP, and stylesheet technologies.
Although there are a lot of standards on the presentation aspect, we are missing on the standards on the actual interactions that these presentation technologies are supposed to facilitate. How should access to a resource be provided? How should the user and the service agree on describing a resource and describing the usage of that resource? In a service-centric world, the emphasis is put on answering such questions. In a web of services, the user is thus free to choose the appropriate medium of delivery at a specific time. This, coupled with presentation-level flexibility, can produce a highly customized user experience.
The emphasis on the description of various entities also opens up quite interesting possibilities for discovering services for a user or creating a new business partnership to enhance a service offering of a business. As long as the user and a collection of similar services agree on the terms of description, the user can, in theory, choose any service to accomplish a task. The choice can be based on a variety of criteria such as past experience, third-party rating, or even users' whims at that moment. Regardless of which service is chosen, it is possible for the users to express their tasks in a consistent, previously agreed-on manner. From a cognizant user's perspective, this means that there is now a choice about which service to choose based on certain criteriathe description of the service class. Such a user can choose any service after due diligence. On the other hand, from a nonconscious user's standpoint, it doesn't matter which service serves the request as long as the users can describe their needs well, and that the service is capable of understanding the descriptions and acting on them to fulfill the requests.
Imagine buying a car. One can do all the necessary research about car dealers, provide the description of the car, float a request for quote to all the "qualified" dealers, and choose the dealer that has the best price. On the other hand, one can also just go to the nearest dealer and buy the car as long as the price sounds reasonable. Between the two scenarios, the users did not agree on the best way to choose a service, but in either case, they could reach a service that could fulfill their needs. There is only one fundamental thing the users and the dealers needed to agree onthe description of a car. There is one more aspect to the user-to-service interaction: discovery. We already discussed the description for a class of services. Discovery of a service means choosing, either deliberately or accidentally, a specific service from a class of services by using a specific description. Intelligent matchmaking like this can ease the pain in finding and interacting with the right service.
To extend the idea further, imagine a task that is so complex that no single service can do itsuch as the trip-planning task we described earlier. In such a case, to accomplish the task, we have to choose a set of right services and interact with them individually. As we will see in the next section, a service-to-service interaction mechanism can help solve this problem effectively. Such a composition of services creates a seamless experience for the user. In the Web Services vision, the user-to-service interaction is thus characterized by the following:
A high degree of customized experience
Service composition to accomplish higher-level tasks from services acting as basic building blocks
This is a special class of services. The services from this class are highly interoperable in offering their services.
A Web Service is a service that abides by a specific framework to offer its services. The framework provides the means to describe and discover the service, audit its service offering, and integrate the service with other services to offer higher-level services.
Web Services are highly interactive components that communicate with other Web Services. Such interactions can be to use the service offered by a service or to collaborate together to form a higher-level service that can be used to add complementary or additional value. In either case, the interacting services should have an experience that is at least similar in nature to the service-to-user interactions we described previously. Should the interaction be richer than that?
By the definition, a service is an active software component. Thus, the service-to-service interaction inherently implies at least two software objects communicating with each other. Such an interaction is different from either the Web page interaction or the service-to-user interaction. Compared with a set of Web pages joined together by hyperlinks, a service-to-service interaction is very dynamic in nature. In the Web page realm, the hyperlinks (or the connections) are either purely static or (maybe) somewhat dynamic.
In the service world, the connections formed are determined and bound on-the-fly, based on the requirements. Take the trip-planning example from the previous section. In that case, a trip-planning service can decide which airline reservation service to collaborate with dynamically, based on the user's preferences. These preferences can include a specific airline, the lowest price, the shortest travel time, or the destination itself. Note that this search can result in finding airlines or airline-reservation services that the trip-planning service may not be aware of until that moment! It is this level of dynamism that differentiates a service-to-service interaction from the usual Web page-like interaction.
The other aspect of service-to-service interaction is the notion of dialog between the two interacting services. A service can have a dialog, a bidirectional communication, with other services. In the passive Web page world, the absence of such a dialog is almost total. A Web page can redirect you to another Web page, either automatically or via a hyperlink without giving any prior indication to the other page. Also, very rarely is there any communication between two pages.
The possibility of bidirectional communication can help to create a more customized and richer set of interactions. Such interactions make it possible to introspect a service to understand its description, information-sharing format, and workflow sequences. Based on this knowledge, one can qualify (or disqualify) a service or amend its own workflow to accommodate (or abide by) the other service's workflow. Again, this is an aspect of the dynamic behavior that is absent in the web of pages. It should be noted that such a level of dynamism is also not typically exhibited in the service-to-user interaction. A user usually has a specific behavioral pattern, and this pattern is difficult to change to accommodate a found service. In fact, in most cases, systems are designed to accommodate this behavior pattern.
Service Deployer-to-Service Deployer Interaction
A rich interaction pattern between a service and its users or other services can create an environment that can also influence the interaction between the service deployers. In the current state of the Web, the relationship between various service deployers is rather staticat least in the electronic world. Service deployers enter into an alliance to connect each others' services. The agreement to form this alliance happens in the paper world or from the electronic world's perspectiveoffline.
After an alliance is formed, a team of engineers gets to work to build the electronic bridges between the two companies forming the alliance. The electronic bridges built are usually in the form of a Virtual Private Network (VPN) or a collection of Web pages secured through some mechanism, such as digital certificates from either side. Whatever the form of these bridges, veteran programmers can tell you that it takes some significant effort to build them, and the maintenance of them is even more cumbersome. In the meantime, the executives at each company are busy forming new alliances to expand the business or severing the ones that do not live up to the expectations. This activity between the business managers and technologists in a company creates a constant state of flux in which the electronic bridges are constantly being built or torn downeach of which is a labor-intensive endeavor.
The problem lies in the fact that the semi-dynamic, technology-level solutions cannot live up to the expectations of the hyperdynamic world of business alliances. The efforts required to build or tear down electronic linkages between two or more companies gets in the way of rapidly forming lucrative alliances or pulling down unprofitable ones. Currently, the technology folks are trying hard to keep up with the business people on this issue.
If, however, it is possible to dynamically find a collection of services suitable for the task you want to accomplish on-the-fly, as we discussed earlier, it should also be possible to form the alliances (or break them, as the case may be) at the same pace. The Web Services technologies are designed to make this possible.
A service-oriented world such as this means a large variety of service providers. Each of the service providers by themselves is providing only a small piece of functionalitya functionality that is its core competency. However, when they are together, they can create a very powerful service-providing environment. Such a collection is termed a service ecosystem.