skip to main content
10.1145/3197231.3197237acmconferencesArticle/Chapter ViewAbstractPublication PagesicseConference Proceedingsconference-collections
research-article

ANEL: robust mobile network programming using a declarative language

Published: 27 May 2018 Publication History

Abstract

The dynamics of mobile networks make it difficult for mobile apps to deliver a seamless user experience. In particular, intermittent connections and weak signals pose challenges for app developers. While recent network libraries have simplified network programming, much expert knowledge is still required. However, most mobile app developers are relative novices and tend to assume a reliable network connection, paying little attention to handling network errors in programming until users complain and leave bad reviews.
We argue that the difficulty of avoiding such software defects can be mitigated through an annotation language that allows developers to declaratively state desired and actual properties of the application, largely without reference to fault-tolerant concepts, much less implementation. A pre-compiler can process these annotations, replacing calls to standard networking libraries with customized calls to a specialized library that enhances the reliability. This paper presents ANEL, a declarative language and middleware for Android that enables non-experts. We demonstrate the expressiveness and practicability of ANEL annotation through case studies and usability studies on real-world networked mobile apps. We also show that the ANEL middleware introduces negligible runtime performance overhead.

References

[1]
Android Asynchrounous Http Library. http://loopj.com/android-async-http/.
[2]
Android network libraries. http://www.appbrain.com/stats/libraries/tag/network/android-network-libraries.
[3]
AndroidAnnotaions. http://androidannotations.org/
[4]
App Developers Who Are Too Young to Drive. http://online.wsj.com/articles/SB10001424052702303410404577468670147772802.
[5]
Bitstrips. http://www.bitstrips.com/.
[6]
ButterKnife. http://jakewharton.github.io/butterknife/
[7]
Creating a Sync Adapter. https://developer.android.com/training/sync-adapters/creating-sync-adapter.html
[8]
DownloadManager. https://developer.android.com/reference/android/app/DownloadManager.html
[9]
Fun Run 2. http://play.google.com/store/apps/details?id=com.dirtybit.funrun2.
[10]
GpsLogger. http://code.mendhak.com/gpslogger/
[11]
Hacker news. https://github.com/manmal/hn-android
[12]
Instagram photo viewer. https://github.com/tanlnm512/InstagramPhotoViewer
[13]
JobScheduler. https://developer.android.com/reference/android/app/job/JobScheduler.html/.
[14]
Kangaroo. https://github.com/mehikmat/Kangaroo
[15]
Lexical and Dynamic Scoping. https://courses.cs.washington.edu/courses/cse341/09wi/general-concepts/scoping.html
[16]
Mobile development is tougher than people think-A brief look at what makes mobile app development so tricky. http://www.itworld.com/article/2701225/mobile/mobile-development-is-tougher-than-people-think.html.
[17]
New York Times search. https://github.com/tanlnm512/NewYorkTimesNewsSearch
[18]
OkHttp. http://square.github.io/okhttp/.
[19]
Retrofit. http://square.github.io/retrofit/.
[20]
State of The Developer Nation Q3 2014. http://www.visionmobile.com/product/developer-economics-q3-2014/.
[21]
Steam. https://play.google.com/store/apps/details?id=com.valvesoftware.android.steam.community.
[22]
Trepn Power Profiler. https://developer.qualcomm.com/software/trepn-power-profiler
[23]
Twitter Lite. https://github.com/tanlnm512/Twitter
[24]
UK App Economy 2014. http://www.visionmobile.com/product/uk-app-economy-2014/.
[25]
Volley. http://developer.android.com/training/volley/index.html.
[26]
Ebuddy + weak signal = battery death. http://androidforums.com/threads/ebuddy-weak-signal-battery-death.85643/.
[27]
Android App not seeing Server over wifi. https://forums.plex.tv/index.php/topic/103094-android-app-not-seeing-server-over-wifi.
[28]
Steven Arzt, Siegfried Rasthofer, Christian Fritz, Eric Bodden, Alexandre Bartel, Jacques Klein, Yves Le Traon, Damien Octeau, and Patrick McDaniel. 2014. FlowDroid: Precise Context, Flow, Field, Object-sensitive and Lifecycle-aware Taint Analysis for Android Apps. In Proceedings of the 35th ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI'14). ACM, Edinburgh, United Kingdom, 259--269.
[29]
Michael Backes, Sebastian Gerling, Christian Hammer, Matteo Maffei, and Philipp von Styp-Rekowsky. 2013. AppGuard: Enforcing User Requirements on Android Apps. In Proceedings of the 19th International Conference on Tools and Algorithms for the Construction and Analysis of Systems (TACAS'13). Springer-Verlag, Berlin, Heidelberg, 543--548. <sub>3</sub>9
[30]
Eric Bodden. 2013. Easily Instrumenting Android Applications for Security Purposes. In Proceedings of the 2013 ACM SIGSAC Conference on Computer & Communications Security (CCS '13). ACM, New York, NY, USA, 1499--1502.
[31]
Nathan Cooprider, Will Archer, Eric Eide, David Gay, and John Regehr. 2007. Efficient Memory Safety for TinyOS. In Proceedings of the 5th International Conference on Embedded Networked Sensor Systems (SenSys '07). ACM, New York, NY, USA, 205--218.
[32]
Haryadi S. Gunawi, Cindy Rubio-González, Andrea C. Arpaci-Dusseau, Remzi H. Arpaci-Dussea, and Ben Liblit. 2008. EIO: Error Handling is Occasionally Correct. In Proceedings of the 6th USENIX Conference on File and Storage Technologies (FAST'08). USENIX Association, Berkeley, CA, USA, Article 14, 16 pages. http://dl.acm.org/citation.cfm?id=1364813.1364827
[33]
Samuel Z. Guyer and Calvin Lin. 1999. An Annotation Language for Optimizing Software Libraries. In Proceedings of the 2Nd Conference on Domain-specific Languages (DSL '99). ACM, New York, NY, USA, 39--52.
[34]
Peng Huang, Tianyin Xu, Xinxin Jin, and Yuanyuan Zhou. 2016. DefDroid: Towards a More Defensive Mobile OS Against Disruptive App Behavior. In Proceedings of the 14th Annual International Conference on Mobile Systems, Applications, and Services (MobiSys '16). ACM, New York, NY, USA, 221--234.
[35]
Konrad Jamrozik and Andreas Zeller. 2016. DroidMate: A Robust and Extensible Test Generator for Android. In Proceedings of the International Conference on Mobile Software Engineering and Systems (MOBILESoft '16). ACM, New York, NY, USA, 293--294.
[36]
Xinxin Jin, Peng Huang, Tianyin Xu, and Yuanyuan Zhou. 2016. NChecker: Saving Mobile App Developers from Network Disruptions. In Proceedings of the Eleventh European Conference on Computer Systems (EuroSys '16). ACM, New York, NY, USA, Article 22, 16 pages.
[37]
Rob Johnson and David Wagner. 2004. Finding User/Kernel Pointer Bugs with Type Inference. In Proceedings of the 13th Conference on USENIX Security Symposium - Volume 13 (SSYM'04). USENIX Association, Berkeley, CA, USA, 9--9. http://dl.acm.org/citation.cfm?id=1251375.1251384
[38]
Mary Beth Kery, Claire Le Goues, and Brad A. Myers. 2016. Examining Programmer Practices for Locally Handling Exceptions. In Proceedings of the 13th International Conference on Mining Software Repositories (MSR '16). ACM, New York, NY, USA, 484--487.
[39]
Hammad Khalid. 2013. On Identifying User Complaints of iOS Apps. In Proceedings of the 2013 International Conference on Software Engineering (ICSE'13). IEEE Press, San Francisco, CA, USA, 1474--1476. http://dl.acm.org/citation.cfm?id=2486788.2487044
[40]
Sarfraz Khurshid, Darko Marinov, and Daniel Jackson. 2002. An Analyzable Annotation Language. In Proceedings of the 17th ACM SIGPLAN Conference on Object-oriented Programming, Systems, Languages, and Applications (OOPSLA '02). ACM, New York, NY, USA, 231--245.
[41]
G. Kiczales. 1996. Beyond the Black Box: Open Implementation. IEEE Softw. 13, 1 (Jan. 1996), 8, 10--11.
[42]
Gregor Kiczales and Erik Hilsdale. 2001. Aspect-oriented Programming. SIGSOFT Softw. Eng. Notes 26, 5 (Sept. 2001), 313--.
[43]
Chieh-Jan Mike Liang, Nicholas D. Lane, Niels Brouwers, Li Zhang, Börje F. Karlsson, Hao Liu, Yan Liu, Jun Tang, Xiang Shan, Ranveer Chandra, and Feng Zhao. 2014. Caiipa: Automated Large-scale Mobile App Testing Through Contextual Fuzzing. In Proceedings of the 20th Annual International Conference on Mobile Computing and Networking (MobiCom '14). ACM, Maui, Hawaii, USA, 519--530.
[44]
Victor B. Lortz and Kang G. Shin. 1994. Combining Contracts and Exemplar-based Programming for Class Hiding and Customization. In Proceedings of the Ninth Annual Conference on Object-oriented Programming Systems, Language, and Applications (OOPSLA '94). ACM, New York, NY, USA, 453--467.
[45]
Chris Maeda, Arthur Lee, Gail Murphy, and Gregor Kiczales. 1997. Open Implementation Analysis and Design. In Proceedings of the 1997 Symposium on Software Reusability (SSR '97). ACM, New York, NY, USA, 44--52.
[46]
Ke Mao, Mark Harman, and Yue Jia. 2016. Sapienz: Multi-objective Automated Testing for Android Applications. In Proceedings of the 25th International Symposium on Software Testing and Analysis (ISSTA 2016). ACM, New York, NY, USA, 94--105.
[47]
K. Moran, M. Linares-VÃąsquez, C. Bernal-CÃąrdenas, C. Vendome, and D. Poshyvanyk. 2016. Automatically Discovering, Reporting and Reproducing Android Application Crashes. In 2016 IEEE International Conference on Software Testing, Verification and Validation (ICST). 33--44.
[48]
Nima Nikzad, Octav Chipara, and William G. Griswold. 2014. APE: An Annotation Language and Middleware for Energy-efficient Mobile Application Development. In Proceedings of the 36th International Conference on Software Engineering (ICSE 2014). ACM, New York, NY, USA, 515--526.
[49]
Nima Nikzad, Marjan Radi, Octav Chipara, and William G. Griswold. 2015. Managing the Energy-Delay Tradeoff in Mobile Applications with Tempus. In Proceedings of the 16th Annual Middleware Conference (Middleware '15). ACM, New York, NY, USA, 259--270.
[50]
F. Palomba, M. Linares-VÃąsquez, G. Bavota, R. Oliveto, M. Di Penta, D. Poshyvanyk, and A. De Lucia. 2015. User reviews matter! Tracking crowdsourced reviews to support evolution of successful apps. In 2015 IEEE International Conference on Software Maintenance and Evolution (ICSME). 291--300.
[51]
Xiaohu Qie, Ruoming Pang, and Larry Peterson. 2002. Defensive Programming: Using an Annotation Toolkit to Build DoS-resistant Software. SIGOPS Oper. Syst. Rev. 36, SI (Dec. 2002), 45--60.
[52]
D. Quinlan, M. Schordan, R. Vuduc, and Qing Yi. 2006. Annotating user-defined abstractions for optimization. In Proceedings 20th IEEE International Parallel Distributed Processing Symposium. 8 pp.-.
[53]
Lenin Ravindranath, Sharad Agarwal, Jitendra Padhye, and Chris Riederer. 2014. Procrastinator: Pacing Mobile Apps' Usage of the Network. In Proceedings of the 12th Annual International Conference on Mobile Systems, Applications, and Services (MobiSys '14). ACM, New York, NY, USA, 232--244.
[54]
Lenin Ravindranath, Suman Nath, Jitendra Padhye, and Hari Balakrishnan. 2014. Automatic and Scalable Fault Detection for Mobile Applications. In Proceedings of the 12th Annual International Conference on Mobile Systems, Applications, and Services (MobiSys'14). ACM, Bretton Woods, New Hampshire, USA, 190--203.
[55]
Hina Shah, Carsten Görg, and Mary Jean Harrold. 2008. Why Do Developers Neglect Exception Handling?. In Proceedings of the 4th International Workshop on Exception Handling (WEH '08). ACM, New York, NY, USA, 62--68.
[56]
Alok Tongaonkar, Shuaifu Dai, Antonio Nucci, and Dawn Song. 2013. Understanding Mobile App Usage Patterns Using In-app Advertisements. In Proceedings of the 14th International Conference on Passive and Active Measurement (PAM'13). Springer-Verlag, Hong Kong, China, 63--72. <sub>7</sub>
[57]
Raja Vallée-Rai, Phong Co, Etienne Gagnon, Laurie Hendren, Patrick Lam, and Vijay Sundaresan. 1999. Soot - a Java Bytecode Optimization Framework. In Proceedings of the 1999 Conference of the Centre for Advanced Studies on Collaborative Research (CASCON'99). IBM Press, Mississauga, Ontario, Canada, 13--. http://dl.acm.org/citation.cfm?id=781995.782008
[58]
Ding Yuan, Yu Luo, Xin Zhuang, Guilherme Renna Rodrigues, Xu Zhao, Yongle Zhang, Pranay U. Jain, and Michael Stumm. 2014. Simple Testing Can Prevent Most Critical Failures: An Analysis of Production Failures in Distributed Data-Intensive Systems. In 11th USENIX Symposium on Operating Systems Design and Implementation (OSDI 14). USENIX Association, Broomfield, CO, 249--265. https://www.usenix.org/conference/osdi14/technical-sessions/presentation/yuan
[59]
Feng Zhou, Jeremy Condit, Zachary Anderson, Ilya Bagrak, Rob Ennals, Matthew Harren, George Necula, and Eric Brewer. 2006. SafeDrive: Safe and Recoverable Extensions Using Language-based Techniques. In Proceedings of the 7th USENIX Symposium on Operating Systems Design and Implementation - Volume 7 (OSDI '06). USENIX Association, Berkeley, CA, USA, 4--4. http://dl.acm.org/citation.cfm?id=1267308.1267312

Cited By

View all

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
MOBILESoft '18: Proceedings of the 5th International Conference on Mobile Software Engineering and Systems
May 2018
275 pages
ISBN:9781450357128
DOI:10.1145/3197231
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 27 May 2018

Permissions

Request permissions for this article.

Check for updates

Qualifiers

  • Research-article

Conference

ICSE '18
Sponsor:

Upcoming Conference

ICSE 2025

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)2
  • Downloads (Last 6 weeks)1
Reflects downloads up to 22 Dec 2024

Other Metrics

Citations

Cited By

View all

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media