Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.
Agenda • Motivation • System Architecture • Mobile Data Management • Context Awareness • Q & A
Motivation • People are lazy when doing fitness • Import competition among friends to push them to do more exercise • “Mike is running longer than Jim” • “You’re the laziest among your friends” • Track and rank their degree of running activity
System Architecture • Mobile Client-Server Model with: • Single Server • Multiple Clients
Server Side Design • A lightweight server implementation containing all business logic and data storage • Database Server • NoSQL database MongoDB • Application Server • Python with Asynchronous socket server TCP 4009 Port Asynchronous Socket Server Python Script Engine MongoDB Python Driver User Information Activity Information Mongo DB
Database Design User Collection Activity Collection
Mobile Data Management • Disconnected Operation • Local Data Copy • Local Command Queue • Data Dissemination • Pub / Sub Model • Push & Pull • Data Caching • DC-PS-SL
Disconnected Operation • User can view / modify the data no matter there is network or not. • If network is available, communicate with server directly. • If no network, store the operation command sequence into the local queue. • Send the queued commands when reconnected.
Data Dissemination • Pub / Sub Model • User can subscribe messages from interested users in “Setting -> Friend Setting” • Only those subscribed message will be disseminated to user.
Pull and Push • Pull the activity list down to pull data from server manually. • Data push can be enabled in “Settings”
Push Policy Design • New Friend Push: • Push as soon as some user follow you • New Activity Push: • Push only when: • Your rank will be surpassed soon. (lead <5%) • The rank has changed
Data Caching • Cache data on cellphone • Replace cached item only when expired. • User can set the cache period in Settings, default is 60 days. • User can manually clear all cached items
DC-PS-SL • DC: (Delta Consistency) Server only push to client when satisfy certain policy (as described in push policy design). • PS: Push • SL: (Stateless) Server doesn’t maintain state information of client, client may miss the push when disconnected.