Distributed Objects at the Edge of the Cloud Using Emerald Test Evaluation of Compiling and Running Emerald Programs on Smartphones

Distributed Objects at the Edge of the Cloud Using Emerald Test Evaluation of Compiling and Running Emerald Programs on Smartphones

Distributed Objects at the Edge of the Cloud using Emerald Test evaluation of compiling and running Emerald programs on Smartphones Khiem-Kim Ho Xuan - kkho@ifi.uio.no master thesis spring 2014 Distributed Objects at the Edge of the Cloud using Emerald Khiem-Kim Ho Xuan - kkho@ifi.uio.no January 26, 2014 ii Abstract This thesis is about research and implementation on a distributed object- oriented programming language called Emerald on smartphones. Our goal is to couple smartphones seamlessly to the cloud where we span the gap between apps and cloud services. We therefore want to use a distributed object-oriented programming language that has object mobility to allow moving both programs and data seamlessly across the spectrum of smartphones, near and far clouds. We have ported the Emerald language on Android thereafter we have experimented with various use cases and performed an evaluation. The evaluation includes benchmarking of the Android implementation of Emerald and more subjective evaluation of the chosen use cases. We also present some limitations of what Android can provide when it comes to distributing objects and how far we are willing to go to make it work. iii iv Contents I Introduction 1 1 Introduction 3 1.1 Motivation . .3 1.2 Goal . .4 1.3 Approach . .4 1.4 Work done . .4 1.5 Results . .5 1.6 Contributions . .5 1.6.1 Porting Emerald on Android Smartphones . .5 1.6.2 Created an app that would use Emerald . .5 1.6.3 Evaluate the performance on Smartphones . .6 1.6.4 Limitations in the Emerald Implementation . .6 1.7 Conclusion . .6 1.8 Outline . .6 II Background 9 2 Background 11 2.1 Traditional Cloud Computing . 11 2.2 Near-Far Cloud Model . 12 2.3 Peer-to-Peer Model (P2P) . 13 2.4 Distributed Systems . 14 2.5 Planetlab . 15 2.6 The Smartphones . 16 2.7 The Actual Smartphone Usage . 17 2.8 Summary . 17 3 Distributed Objects 19 3.1 Emerald Programming Language . 20 3.1.1 Objects and Types in Emerald . 21 3.1.2 Distribution Of Objects . 23 3.2 Discussion . 26 3.3 Summary . 26 v 4 Android - the Smartphone OS 27 4.1 Software Stack . 28 4.1.1 Linux Kernel . 28 4.1.2 Libraries . 29 4.1.3 Android runtime . 29 4.1.4 Application Framework . 30 4.1.5 Application Layer . 30 4.2 Application Components . 31 4.2.1 Activity . 31 4.2.2 Service . 31 4.2.3 Content provider . 32 4.2.4 Broadcast receiver . 32 4.2.5 Additional components . 32 4.3 The Activity Lifecycle . 33 4.3.1 The Activity Stack . 34 4.4 Android Native Development Kit (NDK) . 35 4.5 Google Cloud Messaging (GCM) . 36 4.6 Discussion . 37 4.7 Summary . 38 III Porting Emerald 39 5 Porting Emerald 41 5.1 Running Emerald on the Terminal Emulator IDE app . 41 5.1.1 Results . 42 5.1.2 Discussion . 43 5.2 Android NDK and Standalone-toolchain . 43 5.2.1 The User interface for the Emerald compiler . 44 5.2.2 Cross compiling the Emerald source . 47 5.2.3 Compiling and executing Emerald files . 47 5.2.4 Result . 48 5.2.5 Discussion . 48 5.3 Summary . 49 6 The Application - Emerald-Lite 51 6.1 Main menu . 51 6.1.1 Implementation in Android . 52 6.1.2 TermService . 53 6.1.3 TermSession . 54 6.1.4 Term . 55 6.1.5 EmulatorView . 56 6.1.6 TerminalEmulator . 58 6.2 Interacting C++ code through JNI . 60 6.3 Implementation in Android . 60 6.4 Summary . 63 vi 7 Performance & Evaluation 65 7.1 The Testbeds - Distributing from thin client to any possible clouds . 66 7.2 Discussion . 68 7.3 Basic Remote Invocation Performance . 69 7.3.1 Discussion . 70 7.3.2 Great Circle Distance . 70 7.4 Evaluation Criteria . 71 7.5 Phone-to-Phone . 72 7.5.1 Results . 73 7.5.2 Discussion . 73 7.5.3 Distribution measurements . 73 7.6 Localmachines . 74 7.6.1 Results . 75 7.6.2 Discussion . 75 7.6.3 Distribution Measurements . 76 7.7 Planetlab . 76 7.7.1 Results . 77 7.7.2 Discussion . 78 7.7.3 Distribution Measurements . 78 7.8 Amazon EC2 server . 81 7.8.1 Results . 82 7.8.2 Discussion . 82 7.8.3 Distribution Measurements . 82 7.9 Seamless Near-Far Cloud Evaluation . 85 7.10 Discussion . 86 7.11 The Data object . 86 7.12 The Peer object . 87 7.13 Summary . 87 IV Conclusion 89 8 Conclusion 91 8.1 Contributions . 91 8.1.1 Porting Emerald on Android Smartphones . 91 8.1.2 Created an app that would use Emerald . 92 8.1.3 Evaluate the Performance on Smartphones . 92 8.1.4 Limitations in the Emerald Implementation . 92 Appendix A Future works 93 Appendix B Code 95 B.1 Kilroy . 95 B.2 CPU Execution Time . 96 B.3 Local vs. Remote Invocation . 96 B.4 P2P model - a Near-Far Cloud Model approach . 98 B.4.1 The Data object . 98 vii B.4.2 The Peer object . 98 B.4.3 Main Object . 99 viii List of Figures 1.1 A seamless computation model . .4 2.1 The Traditional Cloud Computing Model . 12 2.2 The Near-Far Cloud Model . 13 2.3 A simple P2P model . 14 2.4 The nodes spread across the world[26] . 16 3.1 The client-server model example of how distribution of objects are set up . 20 3.2 A simple Emerald object creation . 22 3.3 A type conformity example . 23 3.4 Kilroy program - moving itself to all Emerald nodes that are available . 24 3.5 The Call-back problem[17] . 25 3.6 Avoiding Call-back problem[17] . 25 4.1 Java vs. Android . 28 4.2 The Android Software Stack . 28 4.3 The Linux Kernel in the Android Software Stack . 29 4.4 The Libraries in the Android Software Stack . 29 4.5 The Android run time in the Android Software Stack . 30 4.6 The Application Framwork in the Android Software Stack . 30 4.7 The Application Layer in the Android Software Stack . 31 4.8 Implementing an Activity class . 31 4.9 Implementing a Service class . 32 4.10 Implementing a ContentProvider class . ..

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    123 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us