OPTIMIZING COMMUNICATION PERFORMANCE OF WEB SERVICES USING DIFFERENTIAL DESERIALIZATION OF SOAP MESSAGES BY NAYEF BASSAM ABU-GHAZALEH BSc., Jordan University of Science and Technology, 2002 MSc., Binghamton University, 2004 DISSERTATION Submitted in partial fulfillment of the requirements for the degree of Doctor of Philosophy in Computer Science in the Graduate School of Binghamton University State University of New York 2006 UMI Number: 3241635 UMI Microform 3241635 Copyright 2007 by ProQuest Information and Learning Company. All rights reserved. This microform edition is protected against unauthorized copying under Title 17, United States Code. ProQuest Information and Learning Company 300 North Zeeb Road P.
Box 1346 Ann Arbor, MI 48106-1346 c Copyright by Nayef Abu-Ghazaleh 2006 All Rights Reserved Accepted in partial fulfillment of the requirements for the degree of Doctor of Philosophy in Computer Science in the Graduate School of Binghamton University State University of New York 2006 Dr. Lewis January 5, 2007 (Thesis Advisor) Department of Computer Science Dr. Weiyi Meng January 5, 2007 Department of Computer Science Dr. Madhusudhan Govindaraju January 5, 2007 Department of Computer Science Dr.
Kenneth Chiu January 5, 2007 Department of Computer Science Dr. Kenneth Kurtz January 5, 2007 (External Member) Department of Psychology iii Abstract Web services have recently emerged as a de facto standard for building Grid and distributed computing infrastructures and applications. SOAP, a simple, interoperable, robust, and extensible protocol for the exchange of messages, is the most widely used communication protocol in the Web services model. SOAP’s XML-based message format hinders its performance, thus making it unsuitable in many scientific applications.
The deserialization of SOAP messages, which includes processing of XML data and conversion of strings to in-memory data types, is the major performance bottleneck in a SOAP message exchange. The contributions of this dissertation address SOAP’s poor deserialization per- formance with the design and implementation of differential deserialization (DDS), an optimization technique that exploits similarities between incoming messages to reduce deserialization time. DDS is a fully SOAP compliant technique, and requires no changes to a SOAP client. A performance study demonstrates that DDS can result in performance im- provements up to 226% for some Web services.
When DDS is used with differ- ential serialization (DS), its sender-side analog, the performance study demon- strates even more significant performance improvements. iv ACKNOWLEDGMENTS I would like to thank my advisor, Prof. Lewis for his guidance, su- pervision, and help in the preparation of this disseratation. Also, I would like to thank my committee members; Professors Weiyi Meng, Madhusudhan Govin- daraju, Kenneth Chiu, and Kenneth Kurtz for agreeing to be on my PhD committee and for their feedback and suggestions that improved my disseration immensely.
Most importantly, I would like to thank my mother and father, Suad and Bas- sam, for their endless love, support, and encouragement—I can never thank them enough for this or anything else. Many thanks go to my brother Nael, for his guid- ance and help throughout my Master’s and PhD studies, as well as Suha, Hani, and Sa’ed for their support and encouragement I would also like to thank my aunts Hiyam Abu-Ghazaleh, Siham, Ilham, Hiyam Wafa, Fatima and Maha and my uncles Mahmood, Husam, Wael, and Adnan for their support and encourage- ment. v Contents List of Tables xi List of Figures xiv 1 Introduction 1 2 Background 7 2.1 The extensible markup language .1 Syntax of XML .2 Handling whitespace in XML documents .3 Namespaces in XML .4 Features of XML .1 Overview of SOAP’s syntax .3 Extending a SOAP message: The Header element .4 The SOAP encoding .5 The SOAP HTTP binding .6 SOAP as a remote procedure protocol .1 The potential for improving performance .2 The Data Update Tracking (DUT) table .7 Differential serialization optimizations .8 Summary and relation to DDS .3 Enabling differential deserialization .1 Checkpoints and message portions .3 Switching to fast mode .5 Checkpointing in DDS .6 Other DDS approaches. 47 4 Implementation: Differential Deserialization in the bSOAP Toolkit 49 4.2 A schema-driven deserializer .3 Checkpoint types in bSOAP .1 Creating differential checkpoints .2 Creating lightweight checkpoints .6 Switching to fast mode .1 The matching stack .2 Tracking switching candidates with progressive matching .3 Finalizing state matching .4 Cutting down switching time with differential checkpointing .5 Switching at a lightweight checkpoint .7 Switching to regular mode .8 Removing stale checkpoints .1Lightweight checkpoints and processing interrupts .2Creating base checkpoints .3Managing the number of checkpoints .1Memory blocks in bSOAP .2The active memory blocks stack .3The deserialization pointer .4Reallocating memory blocks .5Destroying unused memory blocks .6Merging newly-allocated memory blocks .12 Checkpointing application memory.
84 5 Performance and Analysis 85 5.2 Baseline deserialization study .4 Progressive matching overhead .6 Dual-mode DDS performance .7 DDS performance using two-stage checksum computation .2 Round-trip performance .3 Near-best case performance .4 DS and DDS performance .3 An interactive molecular dynamics simulation .1 Parallel molecular dynamics simulations .2 DDS and MD Simulations .3 Experimental Setup and Methodology .4 Results and discussion .1 IBM’s differential deserialization .1 Parsing through byte-sequence matching: Deltarser .2 A Deltarser-based differential deserialization .3 Schema-specific parsers .4 Changing the message format .1 Approaches that retain textual XML format .5 Parallel XML parsing. 177 7 Summary and Future Work 180 ix Bibliography 185 A FCP, DCP, and LCP dual-mode performance improvements 195 B FCP, DCP, and LCP dual-mode performance improvements using two- stage checksum computation 202 C Round-trip percent performance improvements 209 D GROMACS tests setup 213 x List of Tables 3.1 Comparison of three checkpointing mechanisms.1 Description of state saved in heavyweight checkpoints.2 A checkpoint’s message portion information.1 Number of created checkpoints and average message portion sizes for LCP, DCP and FCP, and for various array sizes and interrupt frequencies.2 Average number of fast mode switches, checkpoints created and de- stroyed, and percentage of bytes processed in fast mode for FCP and DCP, for a 100K element array and for various number of par- titions, interrupt frequencies, and percentage of values changed be- tween subsequent messages.3 Average number of fast mode switches, checkpoints created and de- stroyed, and percentage of bytes processed in fast mode for LCP, for a 100K element array and for various number of partitions, interrupt frequencies, and percentage of values changed between subsequent messages.1 Percent performance improvement in deserialization times of FCP over bSOAP without DDS support .2 Percent performance improvement in deserialization times of DCP over bSOAP without DDS support .3 Percent performance improvement in deserialization times of LCP over bSOAP without DDS support .4 Percent performance improvement in deserialization times of FCP over bSOAP without DDS support and using dummy deserialization routines.5 Percent performance improvement in deserialization times of DCP over bSOAP without DDS support and using dummy deserialization routines.6 Percent performance improvement in deserialization times of LCP over bSOAP without DDS support and using dummy deserialization routines.1 Percent performance improvement in deserialization times of FCP over bSOAP without DDS support .2 Percent performance improvement in deserialization times of DCP over bSOAP without DDS support .3 Percent performance improvement in deserialization times of LCP over bSOAP without DDS support .4 Percent performance improvement in deserialization times of FCP over bSOAP without DDS support and using dummy deserialization routines.5 Percent performance improvement in deserialization times of DCP over bSOAP without DDS support and using dummy deserialization routines.6 Percent performance improvement in deserialization times of LCP over bSOAP without DDS support and using dummy deserialization routines.1 Percent performance improvement in round-trip times of bSOAP with DS and DDS enabled over bSOAP without DDS support and with a DS implementation serializing all values in a message, but not its structure, for remote functions receiving arrays of various sizes and types, for various percentages of values changed from message to message, and for various message partitions.2 Percent performance improvement in round-trip times of bSOAP over bSOAP without DS and DDS support and using full whitespace stuff- ing, for remote functions receiving arrays of various sizes and types, for various percentages of values changed from message to message, and for various message partitions.3 Percent performance improvement in round-trip times of bSOAP over gSOAP, for remote functions receiving arrays of various sizes and types, for various percentages of values changed from message to message, and for various message partitions. 212 xiii List of Figures 2.1 A sample XML document.2 A sample XML document with namespaces.3 A sample W3C XML schema document.4 Structure of a SOAP message.5 A sample SOAP message.6 An XML fragment showing values encoded per the SOAP encoding.7 A SOAP/HTTP message for a method, add, that adds two integer values.1 Two similar gSOAP-generated SOAP messages to the Google do- GoogleSearch Web Service.2 Checkpoints and message portions.3 Updating checkpoints example.1 Hierarchical relationship between schema objects in a bSOAP schema for a method, getAverage.2 Checkpoint types in bSOAP and their hierarchy.3 Tracking stack changes.4 Creating lightweight checkpoints example.5 Namespace alias used as a value.6 Matching stack example.7 Checkpoints and memory blocks.1 Deserialization time, in milliseconds, for bSOAP and gSOAP for ar- rays of integers and doubles of various sizes.2 Checkpointing and checksumming overhead, for various message sizes and interrupt frequencies.3 Checkpointing overhead with and without checksum computation, for various message sizes and interrupt frequencies.4 Estimated overhead of processing interrupts for various message sizes and interrupt frequencies.5 Progressive matching overhead, for various message sizes and inter- rupt frequencies.6 Fast mode processing times, in milliseconds, for various checksum algorithms and for arrays of various sizes.7 Deserialization time, in milliseconds, for messages divided into 50 and 500 partitions, when 25%, 50%, and 75% percentages of values are changed around the center of each partition between consecutive messages, and for interrupt frequencies of 32, 128, and 512.8 DCP’s and LCP’s memory requirements, for various message sizes and interrupt frequencies.9 FCP’s and DCP’s memory requirements for program stack and other deserializer state, and for various message sizes and interrupt fre- quencies.10 Round-trip time, in milliseconds, for JavaRMI, MICO, gSOAP, and bSOAP (with DS and DDS turned off), for remote methods receiving arrays of various sizes and types.11 Round-trip time, in milliseconds, for JavaRMI, MICO, gSOAP, and bSOAP (with DS and DDS turned off), for remote methods sending arrays of various sizes and types.12 Round-trip time, in milliseconds, for JavaRMI, MICO, gSOAP, and bSOAP (with DS and DDS turned off), for remote methods echoing arrays of various sizes and types.13 Round-trip time, in milliseconds, for JavaRMI, MICO, gSOAP, and bSOAP (with no values changed between consecutive messages), for remote methods receiving arrays of various sizes and types.14 Round-trip time, in milliseconds, for JavaRMI, MICO, gSOAP, and bSOAP (with no values changed between consecutive messages), for remote methods echoing arrays of various sizes and types.15 Round-trip time, in milliseconds, for messages divided into 1 and 500 partitions, when 25%, 50%, 75% and 100% percentages of val- ues are changed around the center of each partition between con- secutive messages, for remote methods receiving arrays of various sizes and types.16 Round-trip time, in milliseconds, for JavaRMI, MICO, and bSOAP for remote methods receiving arrays of various sizes and types. bSOAP round-trip times are plotted for messages divided into 200 partitions, when 25%, 50%, and 75% percentages of values are changed around the center of each partition between consecutive messages.17 Deserialization time, in milliseconds, for bSOAP with and without DDS support, deserializing 100 messages corresponding to atom configurations after 100 simulation timesteps, for the simulation of the dynamics of various molecules.
137 xvi Chapter 1 Introduction Grid computing coordinates multiple, loosely-coupled, heterogeneous, and geo- graphically dispersed computing resources to perform a specific task. The con- trol, discovery, and coordination of the potentially vast amount of resources is enabled by Grid middleware. Several architectures for designing Grid middleware have emerged. The Open Grid Services Architecture (OGSA) [36] is the most widely used.
OGSA exploits existing Web services technologies for their straightforward applicability for Grid computing and their widespread adoption [37]. In particular, OGSA models Grid resources as Grid services, which are a special kind of Web services, and uses WSDL [34] and UDDI [2] for resource description and discovery, respectively.