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 2018Publication 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/.Google ScholarGoogle Scholar
  2. Android network libraries. http://www.appbrain.com/stats/libraries/tag/network/android-network-libraries.Google ScholarGoogle Scholar
  3. AndroidAnnotaions. http://androidannotations.org/Google ScholarGoogle Scholar
  4. App Developers Who Are Too Young to Drive. http://online.wsj.com/articles/SB10001424052702303410404577468670147772802.Google ScholarGoogle Scholar
  5. Bitstrips. http://www.bitstrips.com/.Google ScholarGoogle Scholar
  6. ButterKnife. http://jakewharton.github.io/butterknife/Google ScholarGoogle Scholar
  7. Creating a Sync Adapter. https://developer.android.com/training/sync-adapters/creating-sync-adapter.htmlGoogle ScholarGoogle Scholar
  8. DownloadManager. https://developer.android.com/reference/android/app/DownloadManager.htmlGoogle ScholarGoogle Scholar
  9. Fun Run 2. http://play.google.com/store/apps/details?id=com.dirtybit.funrun2.Google ScholarGoogle Scholar
  10. GpsLogger. http://code.mendhak.com/gpslogger/Google ScholarGoogle Scholar
  11. Hacker news. https://github.com/manmal/hn-androidGoogle ScholarGoogle Scholar
  12. Instagram photo viewer. https://github.com/tanlnm512/InstagramPhotoViewerGoogle ScholarGoogle Scholar
  13. JobScheduler. https://developer.android.com/reference/android/app/job/JobScheduler.html/.Google ScholarGoogle Scholar
  14. Kangaroo. https://github.com/mehikmat/KangarooGoogle ScholarGoogle Scholar
  15. Lexical and Dynamic Scoping. https://courses.cs.washington.edu/courses/cse341/09wi/general-concepts/scoping.htmlGoogle ScholarGoogle Scholar
  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.Google ScholarGoogle Scholar
  17. New York Times search. https://github.com/tanlnm512/NewYorkTimesNewsSearchGoogle ScholarGoogle Scholar
  18. OkHttp. http://square.github.io/okhttp/.Google ScholarGoogle Scholar
  19. Retrofit. http://square.github.io/retrofit/.Google ScholarGoogle Scholar
  20. State of The Developer Nation Q3 2014. http://www.visionmobile.com/product/developer-economics-q3-2014/.Google ScholarGoogle Scholar
  21. Steam. https://play.google.com/store/apps/details?id=com.valvesoftware.android.steam.community.Google ScholarGoogle Scholar
  22. Trepn Power Profiler. https://developer.qualcomm.com/software/trepn-power-profilerGoogle ScholarGoogle Scholar
  23. Twitter Lite. https://github.com/tanlnm512/TwitterGoogle ScholarGoogle Scholar
  24. UK App Economy 2014. http://www.visionmobile.com/product/uk-app-economy-2014/.Google ScholarGoogle Scholar
  25. Volley. http://developer.android.com/training/volley/index.html.Google ScholarGoogle Scholar
  26. Ebuddy + weak signal = battery death. http://androidforums.com/threads/ebuddy-weak-signal-battery-death.85643/.Google ScholarGoogle Scholar
  27. Android App not seeing Server over wifi. https://forums.plex.tv/index.php/topic/103094-android-app-not-seeing-server-over-wifi.Google ScholarGoogle Scholar
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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 Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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 Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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 Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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 Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  41. G. Kiczales. 1996. Beyond the Black Box: Open Implementation. IEEE Softw. 13, 1 (Jan. 1996), 8, 10--11. Google ScholarGoogle ScholarDigital LibraryDigital Library
  42. Gregor Kiczales and Erik Hilsdale. 2001. Aspect-oriented Programming. SIGSOFT Softw. Eng. Notes 26, 5 (Sept. 2001), 313--. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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.Google ScholarGoogle Scholar
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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.-. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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> Google ScholarGoogle ScholarDigital LibraryDigital Library
  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 Google ScholarGoogle ScholarDigital LibraryDigital Library
  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 Google ScholarGoogle ScholarDigital LibraryDigital Library
  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 Google ScholarGoogle ScholarDigital LibraryDigital Library

Recommendations

Comments

Login options

Check if you have access through your login credentials or your institution to get full access on this article.

Sign in
  • 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

    Copyright © 2018 ACM

    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]

    Publisher

    Association for Computing Machinery

    New York, NY, United States

    Publication History

    • Published: 27 May 2018

    Permissions

    Request permissions about this article.

    Request Permissions

    Check for updates

    Qualifiers

    • research-article

    Upcoming Conference

    ICSE 2025

PDF Format

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader