Code In The Air: Simplifying Tasking on Smartphones Lenin Ravindranath, Arvind Thiagarajan, Hari Balakrishnan, Sam Madden Massachusetts Institute of Technology.

Slides:



Advertisements
Similar presentations
Service Oriented Architecture for Mobile Applications Swarupsingh Baran University of North Carolina Charlotte.
Advertisements

Outline Activity recognition applications
COM vs. CORBA.
VTrack: Energy-Aware Traffic Delay Estimation Using Mobile Phones Lenin Ravindranath, Arvind Thiagarajan, Katrina LaCurts, Sivan Toledo, Jacob Eriksson,
Programming Paradigms and languages
The Cricket Compass for Context-Aware Mobile Applications Nissanka B. Priyantha.
Kien A. Hua Division of Computer Science University of Central Florida.
Presented by: Sheekha Khetan. Mobile Crowdsensing - individuals with sensing and computing devices collectively share information to measure and map phenomena.
VTrack: Accurate, Energy-Aware Road Traffic Delay Estimation Using Mobile Phones Arvind Thiagarajan, Lenin Ravindranath, Katrina LaCurts, Sivan Toledo,
Suman Nath Microsoft Research. Continuous Context-Aware Apps Continuous sensing of user’s context How much do I jog? Monitor indoor location Alert when.
SCENARIO Suppose the presenter wants the students to access a file Supply Credenti -als Grant Access Is it efficient? How can we make this negotiation.
Validata Release Coordinator Accelerated application delivery through automated end-to-end release management.
Think. Learn. Succeed. Aura: An Architectural Framework for User Mobility in Ubiquitous Computing Environments Presented by: Ashirvad Naik April 20, 2010.
© 2009 Research In Motion Limited Methods of application development for mobile devices.
Improving Energy Efficiency of Location Sensing on Smartphones Kyu-Han Kim and Jatinder Pal Singh Deutsche Telekom Inc. R&D Lab USA Zhenyun Zhuang Georgia.
Mobile Application Development
May-June 2001 ISISTAN Research Institute – Tandil, Argentina Software Design Methodologies: UML in Action Dr. Mohamed Fayad, J.D. Edwards Professor Department.
© 2004, The Trustees of Indiana University 1 OneStart Workflow Basics Brian McGough, Manager, Systems Integration, UITS Ryan Kirkendall, Lead Developer.
© M.E. Fayad SJSU -- CmpE Analysis Heuristics Dr. M.E. Fayad, Professor Computer Engineering Department, Room #283I College of Engineering San.
Wireless “ESP”: Using Sensors to Develop Better Network Protocols Hari Balakrishnan Lenin Ravindranath, Calvin Newport, Sam Madden M.I.T. CSAIL.
Wireless “ESP”: Using Sensors to Develop Better Network Protocols Lenin Ravindranath Calvin Newport, Hari Balakrishnan, Sam Madden Massachusetts Institute.
Timecard: Controlling User-Perceived Delays in Server-Based Mobile Applications Lenin Ravindranath, Jitu Padhye, Ratul Mahajan, Hari Balakrishnan.
1 Event-Driven Architectures: A Devil’s Advocate’s View K. Mani Chandy Computer Science Department and Information Science and Technology Institute California.
Finding Nearby Wireless Hotspots CSE 403 LCA Presentation Team Members: Chris Scoville Tessa MacDuff Matt Mohebbi Aiman Erbad Khalil El Haitami.
Microsoft Visual Basic 2012 CHAPTER ONE Introduction to Visual Basic 2012 Programming.
Project Rickshaw SEARCH - FIND - GO. Project Rickshaw TEAM MEMBERS KEVIN AUGUSTINO – MATT FOX – DAVID MOORE SPONSORS KARASU TECHNOLOGIES - ERIK PAUL -
Mobile Web Applications
MVC pattern and implementation in java
Architecture Of ASP.NET. What is ASP?  Server-side scripting technology.  Files containing HTML and scripting code.  Access via HTTP requests.  Scripting.
A Scalable Application Architecture for composing News Portals on the Internet Serpil TOK, Zeki BAYRAM. Eastern MediterraneanUniversity Famagusta Famagusta.
Electronic Visualization Laboratory, University of Illinois at Chicago PAVIS Pervasive Adaptive Visualization and Interaction Service Javid Alimohideen.
ASP.NET The.NET Framework. The.NET Framework is Microsoft’s distributed run-time environment for creating, deploying, and using applications over the.
MBL393 Location Aware Devices Chung Webster Application Development Consultant.
Smart Phone Laboratory ECEN 489 Srinivas Shakkottai.
Kaifei Chen, Siyuan He, Beidi Chen, John Kolb, Randy H. Katz, David E
(1) WattDepot: A software ecosystem for energy data collection, storage, analysis, and visualization Robert S. Brewer, Philip M. Johnson Collaborative.
WEB 304 An Overview of ASP.NET and Windows Workflow Foundation Kashif Alam Program Manager Developer Division Microsoft Corporation.
Atomate It! End-user Context- Sensitive Automation using Heterogeneous Information Sources on the Web Max Van Kleek et el. MIT Presented by Sangkeun Lee,
4/2/03I-1 © 2001 T. Horton CS 494 Object-Oriented Analysis & Design Software Architecture and Design Readings: Ambler, Chap. 7 (Sections to start.
SAMANVITHA RAMAYANAM 18 TH FEBRUARY 2010 CPE 691 LAYERED APPLICATION.
Timecard: Controlling User-Perceived Delays in Server-Based Mobile Applications Lenin Ravindranath, Jitu Padhye, Ratul Mahajan, Hari Balakrishnan.
Code In The Air. s = gps.getSpeed(); d = gps.getDirection(); send(5sec, s + d); Phones execute code based on location.
Final Year Projects Prof. Joseph Ng. Mobile Application Development Sensor Programming Android Platform Preferred Applications on the following domains:
Mobile web Sebastian Lopienski IT Technical Forum 29 June 2012.
Office Business Applications Workshop Defining Business Process and Workflows.
“On Track Fitness” A new app to record physical activities from an urban area using smart phones for personal logging & community sharing Presented by:
The Second Life of a Sensor: Integrating Real-World Experience in Virtual Worlds using Mobile Phones Mirco Musolesi, Emiliano Miluzzo, Nicholas D. Lane,
Distribution and components. 2 What is the problem? Enterprise computing is Large scale & complex: It supports large scale and complex organisations Spanning.
Network Computing Laboratory A programming framework for Stream Synthesizing Service.
End-to-End Performance Analytics For Mobile Apps Lenin Ravindranath, Jitu Padhye, Ratul Mahajan Microsoft Research 1.
Cevgroup.org C utting E dge V isionaries. cevgroup.org TODAY’s TALK 1) Internet Of Things (IoT) 2) Wi-Fi Controlled Robots 3) Augmented Reality.
Secure middleware patterns E.B.Fernandez. Middleware security Architectures have been studied and several patterns exist Security aspects have not been.
Lecture VIII: Software Architecture
Audio & Vibration MOBILE IS EVERYWHERE Problems: External stimuli & noise Seeing & hearing challenges Accessibility Solutions: Audio & Vibrations.
Introduction to ASP.NET development. Background ASP released in 1996 ASP supported for a minimum 10 years from Windows 8 release ASP.Net 1.0 released.
© 2012 IBM Corporation IBM Worklight Overview Martin Triska – IBM Worklight specialist (420) July 2012.
C ONTEXT AWARE SMART PHONE YOGITHA N. & PREETHI G.D. 6 th SEM, B.E.(C.S.E) SIDDAGANGA INSTITUTE OF TECHNOLOGY TUMKUR
Efficient Opportunistic Sensing using Mobile Collaborative Platform MOSDEN.
INTRODUCING HYBRID APP KAU with MICT PARK IT COMPANIES Supported by KOICA
Context-Aware Middleware for Resource Management in the Wireless Internet US Lab 신현정.
More Security and Programming Language Work on SmartPhones Karthik Dantu and Steve Ko.
Self Healing and Dynamic Construction Framework:
Ieva Juodelytė IT 3 kursas 4 grupė
Software Design and Architecture
Distribution and components
Week 01 Comp 7780 – Class Overview.
PredictRemainingTime
Model-View-Controller Patterns and Frameworks
ARCHITECTURE OVERVIEW
Location Based Reminding System
Presentation transcript:

Code In The Air: Simplifying Tasking on Smartphones Lenin Ravindranath, Arvind Thiagarajan, Hari Balakrishnan, Sam Madden Massachusetts Institute of Technology

GPS WiFi Cell Accl Gyro Compass Mic Light Proximity Infer WalkingRunningSitting Biking Driving Indoors OutdoorsAtHome AtOffice A growing class of smartphone applications Tasking Applications Barometer

Tasking Applications Run continuously – In the background – Often require no user input Infer user context and activity – Process data from multiple sensors Trigger actions when right conditions are met Often involve coordination between multiple users or devices

Alert me when my wife leaves her work Make my phone silent when I am in the lab and meeting my advisor Put my laptop to sleep if I am not nearby for 10 minutes Trivial for end-users to state – As condition-action rules Non-trivial or extremely difficult to develop Alert me when my wife leaves her work Make my phone silent when I am in the lab and meeting my advisor Put my laptop to sleep if I am not nearby for 10 minutes Disable Wi-Fi when I am outdoors and walking Turn-on bluetooth when I start driving

Today they are difficult to develop… Poor abstractions – Requires grappling with low level sensor data – For example: “is walking” – process accelerometer data – An ideal solution: isWalking primitive Poor programming support – Tasking applications are often inherently distributed – Involves writing server-side and smartphone code – A better approach: Macroprogramming approach No end-user support – End-users have no interest or ability to write code – Solution: A easy way to combine existing capabilities to create tasks Simple implementations can be energy consuming

Code In The Air (CITA) A system that significantly lowers the barrier for programming and executing tasking applications Activity detection as primitives – For example: IsWalking, IsBiking, etc. Programming model – Write centralized code even for tasks involving multiple devices – Automatic partitioning and coordination Significantly reduces coding and deployment effort Developers End-Users UI to program condition-action rules “Mix and match” existing activities and tasks to create new tasks

Tasks CITA Architecture Activity Layer Sensors Activity Layer Sensors Activity Layer Task runtime Task Compiler UI Developers UI Tasking Framework Tasks Sub task Users CITA Client CITA Server Raises the abstraction - “activities” – isDriving – isBiking – isNearby Accurate and energy- efficient recognition Activity Layer Tasking Framework Developer writes task – JavaScript Compile into sub-tasks – Server-side code – Mobile code Manages task execution run-time and coordination UI for end-users

Activity Layer Raises the abstraction from “raw sensor data hacking” to activities and “activity composition” Several inbuilt user activity detectors isOutdoors isWalkingisBiking isDrivingisMoving inPlaceenterPlaceleavePlaceisNearby isIndoorsisStatic Extensible activity layer: Build and deploy new activity detectors

Place Hierarchies Energy-efficient detection of activities

Activity Composition Compose lower-level activities using logical predicates to create higher-level activities – Reuse activities created by others to create complex activities Disable Wi-Fi when user is outdoors and walking isOutdoors AND isWalking NOT isOutdoors isBiking OR isDriving leave(Work) AND isDriving WITHIN 5 min NOT isNearby(p, l) FOR 1 min isPlace(Home) NEXT isPlace(Work) Put my laptop to sleep if I am not nearby for 10 minutes

Activity Composition Lenin.inMeeting in (StataBuilding) NOT in (Office) nearby (Hari) FOR 2 min AND OR nearby (Sam) FOR 2 min NOT Lenin.inMeeting AND nearby (Lenin) Alert me to “pay him for the movie” Energy-efficient detection of composed activities

Scripts CITA Architecture Activity Layer Sensors Activity Layer Sensors Activity Layer Task runtime Task Compiler UI Developers UI Tasking Framework Tasks Sub task Users CITA Client CITA Server Raises the abstraction - “activities” – isDriving – isBiking – isNearby Accurate and energy- efficient recognition Activity Layer Tasking Framework Developer writes task – JavaScript Compile into sub-tasks – Server-side code – Mobile code Manages task execution run-time and coordination UI for end-users

Tasking Framework Developers write scripts to build tasking applications Activities and tasks are added to the UI for end users to use UI allows users to specify “condition-action” tasks Activities and tasks are reused to build complex tasks Developers End-Users ecosystem Programming Model User Interface

Code In The Air UI

Programming Model Tasks are written as JavaScript programs Devices are exposed as objects – A developer can simply call methods on the object to manipulate it – Work with multiple phones in a single script CITA automatically partitions the task into sub-tasks, executes and coordinates them across devices p = getDevice(‘Lenin’, ‘Android’) p.ringer.setMode(SILENT); q = getDevice(‘Arvind’, ‘Default’) r = q.ringer.getMode(); p.ringer.setMode(r);

Example: Single-Device Task p = getDevice(param_user, param_phone); p.registerCallback(“outdoor_walking", "trueAction", "falseAction"); function trueAction(e) { oldState = p.wifi.getState(); store.add(“oldState”, oldState); p.wifi.disable(); } function falseAction(e) { p.wifi.setState(store.remove(“oldState”)); } Disable Wi-Fi when outdoors and moving outdoor AND walking true false

Example: Multi-Device Task p = getDevice(“hari”, default); q = getDevice(“lenin”, default); p.registerCallback(“enter(hari.office)", "trueAction"); function trueAction() { q.alert(“Hari is here"); } Alert me when Hari comes to his office hari lenin this.registerActivityCallback(“enter(office)", “lenin.phone:trueAction"); function trueAction() { this.alert(“Hari is here"); } CITA Server Call: lenin.phone.trueAction

Example: Cloud-Enabled Task p = getDevice(param_user, param_phone); p.registerActivityCallback("biking", "trueAction", "falseAction"); function trueAction(e) { params = new Object(); params.samplePeriod = 1; params.tag = getUniqueId(); p.registerDataCallback("gps.data", "dataAction", params); } function falseAction(e) { p.unregisterCallback("gps.data", "dataAction"); } function dataAction(e) { Server.store.add("bikingTracks", e.tag, e.data.time, e.data.lat, e.data.lng); } Store GPS tracks in server when biking

Code Partitioning Function level partitioning F1 { p.foo() } F2 { p.foo() q.foo() } p.registerCallback() F3 { a = b + c; } Even a random partitioning – Does not affect the correctness of the execution – Calls and callbacks are delegated appropriately

Challenges Push Mechanism – Dial-to-Deliver Handle disconnections – Calls and callbacks can be delayed or dropped – Developer can set policies Privacy – User policies Energy – Enforce energy budget – User policies

Related Work Tasking applications – Locale, Tasker, TouchDevelop Programming frameworks – AppInventor – Visual programming interface – PhoneGap, Appcelerator – HTML/JavaScript framework – AppMakr – Web based feeds – PRISM – Sensing applications – mCrowd – Crowd sourcing applications – SeeMon – Composition framework for activities

Code In The Air A system that significantly lowers the barrier for programming and executing tasking applications – Developers: JavaScript based – End Users: UI based Status – Energy-efficient activity detectors – Android client – iPhone client – Windows laptop client – Plan to release by this Fall

CITA If I am leaving home and the weather forecast is rainy, alert me to take an umbrella If I am leaving home and the weather forecast is rainy, alert me to take an umbrella

Backup

Place Hierarchies Named Location Location Hierarchy - Room level - Floor level - Building level - Box (Map) SSID

Energy Efficient Detection in (Seattle) Which sensor to use? How often to sample? Measure of distance? Rate of movement Hari’s Office Sample only when moved Lenin’s Office In (Hari.Office)

Activity Detection Divide and run individual activity detectors in the respective devices – If activity spans multiple devices, coordinate at the server. Energy efficient execution – Cost modeling predicates – Low energy cost execution plan isOutdoors AND isWalking

Handling Disconnections When devices are disconnected – Calls and callbacks cannot be delivered in real-time GPS Alert BobAlice Delayed Dropped after some time Developers can set policies on how to deal with disconnections – Task-wide policies – Callback specific policies

Energy-Efficient Detection GPS Accl Gyro Predict Speed From rate of change - Access Points - Cell Towers Cell towers APs

Today they are difficult to develop… Poor abstractions – Requires grappling with low level sensor data – For example: “is walking” – process accelerometer data – An ideal solution: isWalking primitive Poor programming support – Tasking applications are often inherently distributed – Involves writing server-side and smartphone code – A better approach: Macroprogramming approach No end-user support – End-users have no interest or ability to write code – Solution: A easy way to combine existing capabilities to create tasks

Today they are difficult to develop… Poor abstractions – Requires grappling with low level sensor data – For example: “is walking” – process accelerometer data Poor programming support – Tasking applications are often inherently distributed – Involves writing server-side and smartphone code No end-user support – End-users have no interest or ability to write code – No way to put together an application