LOMOTEY-THESIS.Pdf (2.594Mb)
Total Page:16
File Type:pdf, Size:1020Kb
ENABLING MOBILE DEVICES TO HOST CONSUMERS AND PROVIDERS OF RESTFUL WEB SERVICES A Thesis Submitted to the College of Graduate Studies and Research In Partial Fulfillment of the Requirements For the Degree of Master of Science In the Department of Computer Science University of Saskatchewan Saskatoon By RICHARD KWADZO LOMOTEY Keywords: mobile Web resources hosting, middleware, cloud computing, REST Copyright Richard Kwadzo Lomotey, March 2012. All rights reserved. PERMISSION TO USE In presenting this thesis in partial fulfillment of the requirements for a Postgraduate degree from the University of Saskatchewan, I agree that the Libraries of this University may make it freely available for inspection. I further agree that permission for copying of this thesis in any manner, in whole or in part, for scholarly purposes may be granted by the professor or professors who supervised my thesis work or, in their absence, by the Head of the Department or the Dean of the College in which my thesis work was done. It is understood that any copying or publication or use of this thesis or parts thereof for financial gain shall not be allowed without my written permission. It is also understood that due recognition shall be given to me and to the University of Saskatchewan in any scholarly use which may be made of any material in my thesis. Requests for permission to copy or to make other use of material in this thesis in whole or part should be addressed to: Head of the Department of Computer Science 176 Thorvaldson Building 110 Science Place University of Saskatchewan Saskatoon, Saskatchewan Canada S7N 5C9 i ABSTRACT The strong growth in the use of mobile devices such as smartphones and tablets in Enterprise Information Systems has led to growing research in the area of mobile Web services. Web services are applications that are developed based on network standards such as Services Oriented Architecture and Representational State Transfer (REST). The mobile research community mostly focused on facilitating the mobile devices as client consumers especially in heterogeneous Web services. However, with the advancement in mobile device capabilities in terms of processing power and storage, this thesis seeks to utilize these devices as hosts of REST Web services. In order to host services on mobile devices, some key challenges have to be addressed. Since data and services accessibility is facilitated by the mobile devices which communicate via unstable wireless networks, the challenges of network latency and synchronization of data (i.e. the Web resources) among the mobile participants must be addressed. To address these challenges, this thesis proposes a cloud-based middleware that enables reliable communication between the mobile hosts in unreliable Wi-Fi networks. The middleware employs techniques such as message routing and Web resources state changes detection in order to push data to the mobile participants in real time. Additionally, to ensure high availability of data, the proposed middleware has a cache component which stores the replicas of the mobile hosts’ Web resources. As a result, in case a mobile host is disconnected, the Web resources of the host can be accessed on the middleware. The key contributions of this thesis are the identification of mobile devices as hosts of RESTful Web services and the implementation of middleware frameworks that support mobile communication in unreliable networks. ii ACKNOWLEDGEMENTS First of all I would like to express my genuine thanks to my supervisor, Dr. Ralph Deters for his advice, intuitive criticisms, patience, and financial assistance throughout my entire duration of study. Also, my sincere thanks to the members of my advisory committee: Dr. Julita Vassileva, Dr. John Cooke, and Dr. Ha H. Nguyen for their valuable advices and insightful suggestions. Furthermore, I would like to thank Mr. Andrew Kostiuk and TRLabs for their support. Also, I would like to appreciate Ms. Jan Thompson and Ms. Gwen Lancaster, at the Department of Computer Science, University of Saskatchewan, who have been very helpful and kind throughout my study. Thanks to all students of the Multi-Agent Distributed Mobile and Ubiquitous Computing (MADMUC) Lab for their friendship. Finally, I would like to thank my wife, Emelia Lomotey; my mother, Doris Dartey; and my entire family for the unconditional love and generosity. iii TABLE OF CONTENTS PERMISSION TO USE ................................................................................................................... i ABSTRACT .................................................................................................................................... ii ACKNOWLEDGEMENTS ........................................................................................................... iii TABLE OF CONTENTS ............................................................................................................... iv LIST OF TABLES ......................................................................................................................... vi LIST OF FIGURES ...................................................................................................................... vii LIST OF ABBREVIATIONS ........................................................................................................ ix CHAPTER 1 ................................................................................................................................... 1 INTRODUCTION .......................................................................................................................... 1 1.1 Background ............................................................................................................................... 1 1.2 Challenges in Mobile Web Hosting Environment .................................................................... 3 1.2.1 Network Latency ................................................................................................................ 4 1.2.2 Resource State Synchronization ........................................................................................ 5 1.3 Conclusion ................................................................................................................................ 6 CHAPTER 2 ................................................................................................................................... 8 LITERATURE REVIEW ............................................................................................................... 8 2.1 The CAP Theorem .................................................................................................................... 8 2.1.1 ACID ................................................................................................................................ 10 2.1.2 SAGAS ............................................................................................................................ 11 2.1.3 BASE ............................................................................................................................... 11 2.1.4 Summary .......................................................................................................................... 14 2.2 Web Services .......................................................................................................................... 15 2.3 SOA......................................................................................................................................... 17 2.3.1 SOAP Based Web Services ............................................................................................. 19 2.3.2 WSDL .............................................................................................................................. 21 2.3.3 Summary .......................................................................................................................... 21 2.4 REST ....................................................................................................................................... 21 2.4.1 REST Architecture ........................................................................................................... 21 2.4.2 WADL.............................................................................................................................. 23 2.4.3 RESTful Web Services .................................................................................................... 24 3.4.4 Mobile RESTful Web Services ........................................................................................ 26 2.4.5 Computational REST (CREST) ....................................................................................... 28 2.4.6 ROA ................................................................................................................................. 31 2.4.7 Summary .......................................................................................................................... 32 2.5 Cloud Computing .................................................................................................................... 32 2.6 Middleware Proxies ................................................................................................................ 34 2.7 Mobility................................................................................................................................... 36 2.7.1 Middleware Caching .......................................................................................................