380 likes | 393 Views
Explore the concerns and challenges of writing software for mobile devices, including power consumption, data storage, responsiveness, and cross-platform consistency.
E N D
Mobile Computing:Concerns for Writing Software in Today’s Mobile World Matthew Castelaz
Definition • Definition Foundation: • Mobile computing involves being free from tethers or a physical link to connect to other nodes on the internet [1]. • Examples: • Smartphones • Wearable devices • Personal Digital Assistants (PDAs) • Laptop’s (when untethered) • Sensors and other “smart” devices
Overview of Usage Growth of mobile usage to access the internet [2].
Overview of Concerns • Power consumption • Data storage • Responsiveness • Cross-platform consistency
Overview of Power Consumption • Global attention to energy consumption • Device form factor • Battery life • Battery charge rate • Battery charge method
Application Layer Focus • Reduce message sizes • Reduce message frequencies • Sensor example
Sensor Example without Accumulation 17 units of energy used 3 1 2 3 1 1 2 1 3 This graph represents a small network of temperature sensors [3].
Sensor Example with Accumulation 9 units of energy used 1 1 1 1 1 1 1 1 1 This graph represents a small network of temperature sensors [3].
Sensor Example Comment • It is important to note that this is just one example which is not applicable across all problems. • What happens if the data’s origin is important?
The Moby Dick Project • Joint European project to develop and define the architecture of a new generation of mobile hand-held computers that will be called the Pocket Companion [4]. • Goal is to reduce power consumption by configuring the system’s architecture with security, IO, and networking in mind. • The Pocket Companion: • Small and portable • Replaces cash, checks, passports, keys, diaries, phones, maps, etc. • Architecture designed to meet the goals of security, power consumption and communication, hybrid networks, data consistency, and environment awareness.
The Pocket Companion Architecture Pocket Companion system architecture [4].
Data Storage - A Traditional Approach • Store data locally • Pros: • Quick access • Security • No network access required • Cons: • Limited storage • Multiple device configurations – expandable storage? • Security • Adds expense to device
Data Storage - A Modern Approach • Utilize cloud storage • Becoming more popular • Ex: Google Pixel • Pros: • Theoretically unlimited storage • Could lead to a unified device configuration • Security – Dropbox example [6] • Cons: • Potential additional storage costs for user • Who owns the data? • Security – Dropbox Example [6]
Responsiveness • Tradeoff with power consumption • Directly affects a user’s experience and perception of the software • Two common approaches • Networking calls • Asynchronous calls
Asynchronous Calls • Let the application continue to respond to inputs while processing some other actions or data in the background.
Asynchronous Android Example • ANR dialog (Application Not Responding) • Caused by synchronous calls blocking the UI or another main thread. • Responsiveness monitored by the following system services [7]: • Activity Manager • Window Manager • Application determined unresponsive if [7]: • No response to input within five seconds • BroadcastReceiver doesn’t finish within ten seconds
Implications of Poor Responsiveness • Users might: • Uninstall the application • Use the application less frequently • Write negative reviews about the application • Distrust the entire brand, causing a loss in future sales
Asynchronous Using Callbacks • First of two options for implementing an asynchronous solution • Relies on BeginGetResponse and EndGetResponse • Response is returned to a worker thread which needs to switch contexts if an update to the UI is required
Asynchronous Using Callbacks Synchronous approach (left) and Callback approach (right) [8].
Asynchronous using Async/Wait • New construct introduced by modern programming languages • Resembles synchronous counterpart but still operates asynchronously • Calling context is captured and is returned to when the asynchronous work is completed. • No longer need to switch contexts to update the UI assuming the calling context was the UI thread.
Asynchronous Using Async/Wait The async/wait [8].
Cross Platform Consistency Platforms ran on smartphones in use within the U.S. according to Nielsen [11]
Cross Platform Consistency Number of Developers for the Corresponding Platforms [10]
Goals of Cross-Platform Consistency • User familiarity • Consistent look, feel, and functionality • Reduce additional development efforts • Acquire additional customers • Allow customers to use the same application on all of their devices
XMLVM • Cross-Compilation framework that translates byte code [9] • Byte code gets represented in XML • XSL (Stylesheets) are used to complete the cross-compilation • Maps components into target language. • What the developer will need: • Knowledge of Java • Access to the Android SDK • Access to IDEs for the target • Only produces source code in the appropriate language for target • Executable still needs to be created
XMLVM Challenges • UI elements vary across frameworks • Decisions needed to be made by XMLVM to best handle these differences • Memory management • Objective-C (iOS) does not garbage collect like Java does, so this needs to be handled • Etc.
XMLVM Applications • Legions (FunkyMobileGames) • Android iOS • Fireworks • Android Windows 7 Phone • Search ”XMLVM” in WP7 Marketplace [10]
Summary • Mobile Computing is all around us • Tradeoffs will be encountered any time networking is involved • Speed/responsiveness vs. power consumption • Security vs. availability • What does the future of mobile computing look like? • Near-continuous improvements on existing technologies • Introduction of new technologies
References [1] What is Mobile Computing. (n.d.). Retrieved December 26, 2016, from http://www.igi-global.com/dictionary/mobile-computing/18821 [2] Insights from KPCB US and global internet trends 2015. Retrieved December 27, 2016, from http://www.smartinsights.com/internet-marketing-statistics/insights-from-kpcb-us-and-global-internet-trends-2015-report/ [3] Sinha, K., Ghosh, S. C., & Sinha, B. P. (2016). Wireless networks and mobile computing. Boca Raton: CRC Press. [4] Havinga, P., & Smit, G. (n.d.). Minimizing energy consumption for handheld computers in Moby Dick. Proceedings 23rd Euromicro Conference New Frontiers of Information Technology - Short Contributions -. doi:10.1109/emscnt.1997.658463
References Continued [5] Mullender, S. J., Corsini, P., & Hartvigsen, G. (1995, December). Moby Dick - The Mobile Digital Companion. Retrieved December 27, 2016, from http://wwwhome.ewi.utwente.nl/~havinga/pp.html [6] Ochrymowicz, R. (2014). Cloud-based storage applications for smart phones: Forensic investigation of cloud storage applications (Unpublished doctoral dissertation). Dublin Institute of Technology. Retrieved December 28, 2016, from http://arrow.dit.ie/cgi/viewcontent.cgi?article=1058&context=scschcomdis [7] Keeping Your App Responsive. (n.d.). Retrieved December 28, 2016, from https://developer.android.com/training/articles/perf-anr.html#anr [8] Dig, D. (2015). Refactoring for Asynchronous Execution on Mobile. IEEE Software, 1-1. doi:10.1109/ms.2015.152
References Continued [9] XMLVM Tutorial. (n.d.). Retrieved December 28, 2016, from http://xmlvm.org/ [10] Puder, A. (n.d.). XMLVM: A Smartphone Cross-Compilation Framework [Scholarly project]. Retrieved December 28, 2016, from http://research.microsoft.com/en-us/um/redmond/events/SS2011/slides/Friday/Arno_Puder.pdf [11] Tops of 2015: Digital. (n.d.). Retrieved December 28, 2016, from http://www.nielsen.com/us/en/insights/news/2015/tops-of-2015-digital.html [12] Android AsyncTask Example Tutorial. (2016). Retrieved December 29, 2016, from http://www.journaldev.com/9708/android-asynctask-example-tutorial
Mobile Computing:Concerns for Writing Software in Today’s Mobile World Matthew Castelaz