Simba: Tunable End-To-End Data Consistency for Mobile Apps

Simba: Tunable End-To-End Data Consistency for Mobile Apps

Simba: Tunable End-to-End Data Consistency for Mobile Apps Dorian Perkins∗†, Nitin Agrawal†, Akshat Aranya†, Curtis Yu∗, Younghwan Go⋆†, Harsha V. Madhyastha‡, Cristian Ungureanu† ⋆ NEC Labs America†, UC Riverside∗, KAIST , and U Michigan‡ Abstract The root cause for the undesirable status quo is that every developerre-solves the same set of underlyingchallenges for Developers of cloud-connected mobile apps need to ensure data consistency. Instead, in this paper, we advocate the need the consistency of application and user data across multiple for a high-level programming abstraction that provides end- devices. Mobile apps demand different choices of distributed to-end data consistency and, in particular, is well-suited for data consistency under a variety of usage scenarios. The the needs of mobile apps. Three key properties distinguish apps also need to gracefully handle intermittent connectivity the associated challenges from prior work. and disconnections, limited bandwidth, and client and server First, unlike recent efforts that have examined when it is failures. The data model of the apps can also be complex, reasonable to trade-off consistency in order to minimize la- spanning inter-dependent structured and unstructured data, tencies in the setting of geo-distributed services [29, 30, 32, and needs to be atomically stored and updated locally, on 55], whether to sacrifice strong consistency is not a choice the cloud, and on other mobile devices. for mobile apps; the limited and intermittent connectivity on In this paper we study several popular apps and find mobile devices makes it a must for mobile apps to deal with that many exhibit undesirable behavior under concurrent use weaker forms of consistency in order to facilitate app usage due to inadequate treatment of data consistency. Motivated in disconnected mode. Often, mobile apps maintain a local by the shortcomings, we propose a novel data abstraction, copy of application state and user data (e.g., photos, notes, called a sTable, that unifies a tabular and object data model, and documents) and orchestrate the synchronization of these and allows apps to choose from a set of distributed consis- across devices in a reliable, consistent, and efficient manner. tency schemes; mobile apps written to this abstraction can Second, unlike prior work on managing data consistency effortlessly sync data with the cloud and other mobile de- across weakly-connected clients [26, 35, 56], for efficiency vices while benefiting from end-to-end data consistency. We purposes, mobile apps do not always need the strongest build Simba, a data-sync service, to demonstrate the utility form of consistency that is feasible even when connected. and practicality of our proposed abstraction, and evaluate it Due to carrier bandwidth caps and users’ expectations of an both by writing new apps and porting existing inconsistent interactive app experience, mobile app developers have to apps to make them consistent. Experimental results show often explicitly design their apps to make do with weaker that Simba performs well with respect to sync latency, band- consistency. Moreover, an app typically operates on different width consumption, server throughput, and scales for both kinds of data, which require or benefit from different forms the number of users and the amount of data. of consistency (e.g., app-crash log vs. user’s shopping cart). 1. Introduction Third, as shown by recent studies [10, 51], the majority of mobile apps employ data models spanning databases, file Applications for mobile devices, or apps, often use cloud- sytems, and key-value stores, and it is crucial to manage data based services to enable sharing of data among users and to at application-relevant granularity. Cloud-connected mobile offer a seamless experience across devices; ensuring consis- apps need to manage this inter-dependent data not only lo- tency across users and devices is thus a primary requirement cally, but also on cloud storage and across devices. for mobile apps. However, in spite of significant advances To understand how developers manage these challenges on distributed consistency [29, 30, 32, 55] in recent times, associated with ensuring data consistency across devices, we application developers continue to struggle with writing ap- studied a number of popular mobile apps. We make four pri- plications that are correct and consistent [11]. mary observations from our study. First, we find that differ- ent mobile apps — even different components of the same Permission to make digital or hard copies of all or part of this work for personal or app — operate with different consistency semantics; thus, 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 there is no one-size-fits-all solution for cloud-based data on the first page. Copyrights for components of this work owned by others than the sync. Second, while many apps chose weaker consistency author(s) 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 semantics for the sake of availability and efficiency, their and/or a fee. Request permissions from [email protected]. data synchronization is designed poorly, leading to incon- EuroSys’15, April 21–24, 2015, Bordeaux, France. Copyright is held by the owner/author(s). Publication rights licensed to ACM. sistencies and loss of user data. Third, though several apps ACM 978-1-4503-3238-5/15/04. $15.00. use existing commercial sync services (e.g., Dropbox), even http://dx.doi.org/10.1145/2741948.2741974 such apps exhibit undesirable behavior under concurrent granularity. Data granularity is the aggregation of data on use. The dominant reason being that apps choose the sync which operations need to apply together, e.g., tabular, object, service oblivious to the ramifications of their last-writer- or both; in the case of cloud-connected apps, granularity im- wins semantics on the data model. Fourth, while most apps plies the unit of data on which local and sync operations are store inter-dependent unstructured (e.g., photos and videos) applied together. We adopted this terminology from Gray et and structured data (e.g., album info and metadata), existing al. [21], who present an excellent discussion on the relation- sync services offer either file-only [3, 5, 25, 53] or table- ship between consistency and granularity. only [15, 23, 42] abstractions. As a result, atomicity of gran- We chose a variety of apps for our study, including: 1) ular data is not preserved under sync even for a popular app apps such as Pinterest, Instagram, and Facebook that roll such as Evernote which claims so [16]. their own data store, 2) apps such as Fetchnotes (Kinvey), Mobile apps are ultimately responsible for the user ex- Township (Parse), and Syncboxapp (Dropbox) that use an perience and need to guarantee data consistency in an end- existing data platform (in parenthesis), and 3) apps such as to-end manner [48]. Motivated by the observations from our Dropbox, Evernote, and Google Drive that can also act as a study, we propose a novel data synchronization abstraction sync service with APIs for third-party use. The apps in our that offers powerful semantics for mobile apps. Our pro- study also have diverse functionality ranging from games, posed abstraction, which we call sTable, offers tunable con- photo sharing, and social networking, to document editing, sistency and atomicity over coarse-grained inter-dependent password management, and commerce. data, while gracefully accommodating disconnected oper- 2.1 Methodology ations. sTables span both structured and unstructured data (i.e., database tables and objects), providing a data model We setup each app on two mobile devices, a Samsung that unifies the two. Thus, sTables enable apps to store all Galaxy Nexus phone and an Asus Nexus tablet, both run- of their data in a single synchronized store. To our knowl- ning Android 4.0+, with the same user account; the devices edge, our sTable abstraction is the first to provide atomicity connected to the Internet via WiFi (802.11n) and 4G (T- guarantees across unified tabular and object rows. Further- Mobile). We manually performed a series of operations on more, to support varying consistency requirements across each app and made a qualitative assessment. apps and across an app’s components, every sTable can be For consistency, our intent was to observe as a user of associated with one of three consistency semantics, resem- the system which, in the case of mobile apps, broadened the bling strong, causal, and eventual consistency. The sTable scope from server only to server and client. Since most of abstraction subsumes all network I/O necessary for its con- the apps in the study are proprietary, we did not have access sistent sync. sTables are thus especially suited to developing to the service internals; instead, we relied on user-initiated cloud-connected mobile apps. actions and user-visible observations on mobile devices. To demonstrate the simplicity and power of sTables, we For granularity, we inspected the app’s local schema for have built Simba, a data-sync service that meets the diverse dependencies between tabular and object data. Apps typi- data management needs of mobile apps. By providing a cally used either a flat file or a SQLite database to store high-level data abstraction with tunable consistency seman- pointers to objects stored elsewhere on the file system. To tics, and an implementation faithful to it, Simba alleviates confirm our hypothesis, we traced the local I/O activity to the deficiencies in existing data-sync services. The key chal- correlate accesses to SQLite and the file system. lenges that Simba addresses are end-to-end atomic updates, First, for each app, we performed a number of user oper- locally and remotely, to unified app data, and an efficient ations, on one or both devices, while being online; this in- sync protocol for such data over low-bandwidth networks.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    16 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