WEB SERVICE ARCHITECTURE for MOBILE COMPUTING Sangyoon
Total Page:16
File Type:pdf, Size:1020Kb
WEB SERVICE ARCHITECTURE FOR MOBILE COMPUTING Sangyoon Oh Submitted to the faculty of the University Graduate School in partial fulfillment of the requirements for the degree Doctor of Philosophy in the Department of Computer Science, Indiana University August 2006 Accepted by the Graduate Faculty, Indiana University, in partial fulfillment of the requirements for the degree of Doctor of Philosophy. Doctoral Committee ________________________________ Dr. Geoffrey C. Fox (Principal Advisor) ________________________________ Dr. Dennis Gannon ________________________________ Dr. Andrew Lumsdaine ________________________________ Dr. Sun Kim August 1st, 2006 ii © 2006 Sangyoon Oh ALL RIGHTS RESERVED iii Acknowledgements First and foremost, I am sincerely grateful to my advisor, Dr. Geoffrey C. Fox for his guidance and encouragement to this dissertation as well as my entire research career at Indiana University. With his keen insight and extensive experience, he helped me to focus on the important details. Working with him has been one of most rewarding experiences. I am also very thankful to my other committee members. I would like to thank Dr. Andrew Lumsdaine for his valuable feedback and Dr. Sun Kim for his comments and suggestions. I am particularly thankful to Dr. Dennis Gannon for his constructive criticism on my research. I have had the great pleasure of working with a wonderful set of people at Community Grids Lab. I owe a great deal of thanks to Mehmet Aktas for providing technical support for FTHPIS (Fault Tolerant High Performance Information Service) which I used in my prototype implementation and providing encouragement that kept me going through the hard times of the graduate student years. I am much indebted to Dr. David Bryan Carpenter for countless productive discussions on various aspects of my research. Discussions with him helped me to grow professionally. I am also thankful to Dr. Marlon Pierce for his continuous help, support and advice. I would like to thank Dr. Shrideep Pallickara for his help and advice on the topics of security and messaging. iv Many others at Bloomington provided much advice and help to my research. In particular, George Fletcher was deeply involved in many aspects of this research. He provided countless hours of discussion and counsel during my graduate student years. I would like to thank Harshawardhan Gadgil for his early comment on this research. I am grateful to others, including Beytullah Yildiz and Kwangmin Choi, who filled my life in Bloomington with the quality times. I would like to thank staffs of Computer Science department, particularly Sherry Kay who helped me with all the paper work and Lucy Battersby who provided me all necessary information I need to know. Last but not the least, I am especially grateful to my family for their support throughout my long and winding road of graduate studies. My parents provided invaluable support throughout my graduate student years and they encouraged me every step of the way. This would not have been possible without their love and support. My sisters, brother-in-law, and nieces with their love and support made this work worthwhile. v Abstract The conventional Web Service communication framework does not adequately meet the needs of mobile computing. It is physically constrained and requires an optimized messaging scheme to prevent performance degradations in not only mobile computing, but also conventional computing that is interacting with mobile applications. With our novel architecture called the Handheld Flexible Representation (or HHFR), mobile applications can negotiate characteristics for message stream and representation, and exchange messages in an optimized streaming fashion. By distinguishing between message semantics and syntax, the architecture provides an overall system framework for Web Services applications in mobile computing environment. Despite its important role in distributed computing, mobile computing hasn’t reached its full potential because of the limited availability of high speed wireless connections, such as third generation cellular technology (3G) or Broadband Wireless access. In this dissertation, we show that the messaging scheme of our new architecture significantly speeds up the messaging performance in comparison to a conventional SOAP-based Web Service messaging scheme when the request and response messages are in the same syntax, i.e. the same service is used continuously. vi Contents List of Figures 1. Introduction and Motivation………………………………………….............. 1 1.1. Introduction: Web Service Technology and Mobile Computing……........... 2 1.2. Motivation: Problems in Integrating Web Services with Mobile Computing……………………………………………………………......... 4 1.3. Thesis Summary………………………………………………………........ 7 1.4. Thesis Contributions……………………………………………………...... 10 1.5. Thesis Roadmap………………………………………………………........ 13 2. Background and Related Work…………………………………………......... 15 2.1. Lineage of XML Binary Representation………………………………....... 17 2.1.1. XML as a data interchange format………………………………...... 17 2.1.2. XML binary characterization working group…………………......... 18 2.2. XML Alternatives: Self Contained or Not……………………………........ 21 2.2.1. Self contained approaches………………………………………...... 21 2.2.2. Non self contained approaches…………………………………....... 27 2.2.3. Processing headers………………………………………………...... 31 2.3. Compressing XML documents…………………………………………...... 33 2.4. Binary attachments……………………………………………………........ 34 2.4.1. Binary data as a MIME attachment: MTOM……………………...... 35 2.4.2. Wrapping binary data: DIME…………………………………......... 37 2.4.3. Comparing binary XML with sending binary data over SOAP…...... 38 2.5. Summary………………………………………………………………........ 39 vii 3. Background on Mobile Devices…………………………………………......... 40 3.1. Mobile computing environment………………………………………......... 40 3.1.1. Limited programming library……………………………………...... 41 3.1.2. Network connection……………………………………………........ 43 3.2. Current Web Service supports in mobile computing…………………......... 45 3.2.1. Overview………………………………………………………......... 45 3.2.2. Offloading computation using Java Servlet API………………......... 46 3.2.3. kSOAP and J2ME Web Services…………………………………… 47 4. The Handheld Flexible Representation Architecture……………….………. 49 4.1. Design overview…………………………………………………………… 50 4.2. SOAP Infoset based data model and separation of representation……….... 52 4.2.1. XML and SOAP Infoset……………………………………………. 53 4.2.2. Binary representation of SOAP Message…………………………… 54 4.2.3. Simple_DFDL………………………………………………………. 56 4.3. Negotiation of characteristics……………………………………………… 57 4.3.1. Supporting alternative representation of SOAP message…………... 58 4.3.2. Negotiating characteristics of stream………………………………. 58 4.3.3. Negotiation stage……………………………………………………. 60 4.4. Message handling…………………………………………………………... 62 4.4.1. Handler for SOAP Header Processing……………………………… 63 4.4.2. Message Transformation process…….……………………………... 64 4.4.3. View selection handler……………………………………………… 66 4.5. Context store……………………………………………………………….. 68 5. The Prototype Implementation of the HHFR Architecture………………… 70 5.1. Prototype implementation overview……………………………………….. 71 5.1.1. Implementing three key design issues…………………………….... 72 5.1.2. Utilizing existing efforts: Apache Axis, kSOAP, and Information Service of CGL (Fault tolerant High Performance Information viii Service, FTHPIS)……………………………………………………… 73 5.2. Negotiation Scheme………………………………………………………... 74 5.3. The Simple_DFDL: The DFDL-style Data Description Language……….. 77 5.3.1. DFDL overview…………………………………………………….. 78 5.3.2. Simple_DFDL ……………………………………………………… 81 5.3.2.1. Structures and types of Simple_DFDL……………………... 82 5.3.2.2. Declarations of Simple_DFDL …………………………... 84 5.3.2.3. Data processing using Simple_DFDL ……………………… 85 5.3.3. Comparisons between Simple_DFDL and DFDL………………….. 86 5.4. Data streaming……………………………………………………………... 88 5.4.1. High performance communication channel………………………… 89 5.4.2. Queuing in the sender thread……………………………………….. 90 6. Prototype Evaluation and Discussion………………………………………… 92 6.1. Benchmark applications……………………………………………………. 92 6.1.1. String concatenation service………………………………………... 95 6.1.2. Floating point number adding service………………………………. 97 6.2. Performance cost analyze modeling……………………………………….. 99 6.3. Performance evaluation configuration……………………………………... 101 6.3.1. Connection setup……………………………………………………. 102 6.3.2. Measurement methodology…………………………………………. 103 6.4. Observed performance measurements and performance analysis…………. 104 6.4.1. Observed measurements of the benchmark applications…………… 104 6.4.2. Performance analysis……………………………………………….. 105 6.5. HTTP Persistent connection in mobile computing environment…………... 112 6.6. Summary…………………………………………………………………… 113 7. Optimizing Web Service Messaging Using a Context Store for Static Data. 115 7.1. Overview of WS-Context Service implementation of Community Grids 116 Lab (CGL)………………………………………………………………….. 7.2. WS-Context service as a Context-store of the HHFR and its usage……….. 117 ix 7.3. Performance evaluation……………………………………………………. 121 7.3.1. Performance evaluation model……………………………………... 122 7.3.2. Evaluation configuration……………………………………………. 125 7.3.3. Experiment 1: Context-store access time…………………………… 125 7.3.4. Experiment 2: Evaluation of performance measurement of full SOAP message and optimized message with Context-store usage….... 127 7.3.5. Experiment 3: Scalability of the Context-store……………………... 130 7.4. Discussion……………………………………………………………...…... 131 8. Future Work……………………………………………………………………