First Workshop on Designing and Evolution of ... - Semantic Scholar

1 downloads 4519 Views 383KB Size Report
vices are remote programs invoked over the Internet, using. Permission to make .... Software architects customize the runtime infrastructure by designing test ...
Adaptive Integration of Third-Party Web Services Giovanni Denaro, Mauro Pezze, ` Davide Tosi University of Milano-Bicocca Via Bicocca degli Arcimboldi, 8 I-20126 - Milano, Italy {denaro|pezze|tosi}@disco.unimib.it

ABSTRACT

standard protocols for document exchange (e.g., HTTP and XML) to pass parameters between requesters and providers. Web services allow to export the functionality of an enterprise application outside the enterprise bounds, thus enabling stakeholders of different domains to rapidly and seamlessly integrate high specialized third-party expertise in their applications. For example airflight companies and hotel chains can export services for online booking; so that travel agencies can combine these services between them and possibly with services provided by other companies (e.g., car rental companies) to build optimal travel plans. Service oriented architectures help quickly solve complex business cases, decreasing risks, costs and time-to-market. In general web services belonging to the same architecture can be run by different institutions at their sites and their integration is challenged by the difficulty of keeping consistency within software systems that are maintained and may evolve dynamically and independently. In this paper, we focus on the problems caused by dynamic changes of the implementation of web services between subsequent client invocations. Service providers can change implementations independently from clients to correct faults or meet new requirements. This is for example the case of old versions of the enterprise software dynamically substituted with new ones. Clients can locate services dynamically, using service discovery mechanisms, which allow to dynamically discover and connect web services based on a given machine-readable description. These mechanisms, orchestrated by broker entities that match requests and provisions, enhance the flexibility and robustness of the whole system. However, each time an application reconnect to a web service through a broker, it can get a different match, resulting in using a different implementation of the requested service [4]. Different implementations must comply with contracts that indicate the service characteristics.1 In principle, changing implementations that comply with the same contract should not impact the functionality of the whole application, but often contracts specify only the access interface of the services, leaving many semantic details unresolved and implementation dependent. For instance, we have been using a web service that returns the temperature of US locations. Locations are identified by the zip code, and the result is a floating point value (see Section 2). The contract of this service does not specify the metric unit of the result. Different implementations could make different assumptions, thus

Service based computing allows clients to dynamically bind services, and providers to modify the service implementation independently from their clients. The impossibility of statically determining which service implementation will be bound at runtime may lead to unexpected client-side failures. This position paper suggests a scenario in which service-based applications autonomously react to changes in the implementation of the used services, automatically detect possible integration mismatches, and dynamically execute suitable adaptation strategies. The proposed solution exploits ideas from autonomic computing and self-managed software. We propose a design methodology based on the definition of both test cases, to automatically diagnose service mismatches, and adaptation strategies, to overcome the revealed problems. We introduce a general runtime infrastructure that automatically embeds the test cases and the adaptation strategies into service based applications to guarantee self-adaptiveness.

Categories and Subject Descriptors H.4 [Information Systems Applications]: Miscellaneous; D.2.10 [Software Engineering]: Design—Methodologies

General Terms Design

Keywords Web Services, self-adaptive service oriented architecture, integration faults

1.

INTRODUCTION

Web services and service oriented architectures are emerging technologies useful for integrating enterprise applications, leveraging electronic B2B and B2C solutions, and prolonging the life of legacy software [7]. In short, Web Services are remote programs invoked over the Internet, using

Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. To copy otherwise, to republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. DEAS 2005, May 21, 2005, St. Louis, Missouri, USA. Copyright 2005 ACM 1-59593-039-6/05/0005 ...$ 5.00.

1

Contracts are usually expressed in standard machinereadable languages, e.g. the Web Service Description Language (WSDL) [2])

112

1

- - - -

pleteness of the service description. In the example, the WSDL specification does not indicate the reference metric system of the returned temperature. The service returns a floating point value that can be interpreted according to different metric units (e.g., Fahrenheit or Celsius degrees), thus leading to possible inconsistent interpretations. The diagnosis phase includes a set of test cases that aim at revealing the identified mismatches. In the example, we must design a set of test cases that can reveal the reference metric unit. Developers can safely assume that a general purpose service returns either Fahrenheit or Celsius degrees. We can distinguish Fahrenheit from Celsius degrees by sampling the temperature of locations with seasonal temperature regularities. For example, values between 9 and 45 in San Diego in Summer suggest temperatures expressed in Celsius degrees, while values greater than 45 suggest Fahrenheit. The test case for services that comply with the WSDL specification given in Figure 1 can be expressed in Java as follows:

Figure 1: Excerpt of the WSDL description for the temperature web service (from http://services.xmethods.net).

leading to client-side failures. In this paper, we propose a design approach that allows to build self-adaptive service oriented applications. The proposed approach is based on a mechanism for revealing possible mismatches between requested and provided services, and for adapting the application accordingly. A suitable integration fault taxonomy drives system integrators in identifying possible implementation dependent integration mismatches. Integrators define test cases and adaptation mechanisms for the identified mismatches. The test cases are executed when the service implementations change, to reveal mismatches that trigger suitable adaptation mechanisms. In this approach, the test cases are the means to identify the assumptions that hold for the actual service, and configure the client application accordingly. We refer to this methodology as adaptive integration of web services. This paper is organized as follows. Section 2 introduces our approach through an example, while Section 3 presents the approach in details. We discuss related work in Section 4 and summarize our present and future research in Section 5.

2.

void testTempIsInCelsius() { float tInSDiego; tInSDiego = TempWSWrapper.getTemp(‘‘92101’’); assertTrue((tInSDiego>9)&&(tInSDiego setUnit2Fahrenheit(); onSuccess --> setUnit2Celsius(); float tInSanDiego; tInSDiego = TempWSWrapper.getTemp(‘‘92101’’); assertTrue((tInSDiego>9)&&(tInSDiego