Top Banner
Haggle: Seamless Networking for Mobile Applications Jing Su University of Toronto (interned at Intel Research Cambridge) James Scott Microsoft Research Cambridge (previously Intel Research Cambridge)
55
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: talk

Haggle:Seamless Networking

for Mobile Applications

Jing Su University of Toronto

(interned at Intel Research Cambridge)

James ScottMicrosoft Research Cambridge

(previously Intel Research Cambridge)

Page 2: talk

Haggle:Seamless Networking

for Mobile Applications

Eben Upton, Meng How Lim (Intel Research Cambridge)

Ashvin Goel, Eyal De Lara (U. of Toronto)

Jon Crowcroft, Pan Hui (Cambridge University)

Christophe Diot (Thomson)

In collaboration with others from the EU-funded project

Page 3: talk

3

Scenario

Not available Slow Expensive!

- cellular?

Page 4: talk

4

Scenario

Not available Congested Non-open Non-free

Cellular

zzzgrrrr

- hotspot?

Page 5: talk

5

Scenario

Ad hoc P2PCellular Access

Point

grrrrZZZzzz

- Ad hoc?

Page 6: talk

6

Scenario

Cellular AccessPoint

P2P

Email context lost

grrrr zzz ZZZ@*#

%&!- Just use USB key

Page 7: talk

7

Why doesn’t P2P email work?

Email clients tied to Internet services Needs DNS to look up MX record “DNS, who is the mail server for work.com?”

Without Internet, email doesn’t work

To: [email protected]

Page 8: talk

8

Observation

Mobile networking experience is poor Manual configuration of device and interfaces Different apps for different configs

Apps cannot react to or take advantage of rich mobile environments

The mobile hardware works

Need systems software solution

Page 9: talk

9

Solution

Separate applications from underlying networking concerns Applications focus on their logic

New node architecture manages network Late-bind network resources based on

capabilities, context, and preferences Provide integrated resource management

Page 10: talk

10

Approach

Separating networking from applications

Page 11: talk

11

What’s in an App?Application Logic

Network Code

Protocol(s)

Data Metadata

Page 12: talk

12

Application Logic

What’s in an App?

Network Code

Protocol(s)

Data Metadata

Email client

Mail Files

POP/SMTP

TCP/IP

Messages,

attachments, folders,

tags, flags, etc

Page 13: talk

13

Externalize Data and Networking

Application

Logic

Wifi

Network

Code

Email

Protocol

HTTP

Protocol

P2P

Protocol

Bluetooth

Network

Code

Metadata

Data

Data and Meta-Data Storage

Protocols Network Interfaces

Page 14: talk

14

Support Mobile Networking

Separate networking from application to enable seamless mobile networking

What are mobile networking environments? Infrastructure Ad hoc Delay Tolerant / Pocket Switched Networks

Haggle targets all environments

Page 15: talk

15

The Mobile Networking User

Infrastructure

Ad HocNetwork

DelayTolerant

Naming: IP, DNSForwarding: dedicated routers

everything is reachable

Naming: MAC address, peer discoveryForwarding: ad hoc, cooperative forwarding

peers are reachable

Naming: MAC, IP, … Forwarding: postal truck routing

long disconnects

Page 16: talk

16

Haggle Architecture

Data-centric app API Free from net complexity

Seamless mobile networking Late binding Integrated resource

management

Haggle Application Interface

Applications (messaging, web, etc)

Interface

Res

ourc

e

Data

Name

Protocol

Forw

ardi

ng

Net Interfaces (WiFi, BT, GPRS, etc)

Page 17: talk

17

Haggle Architecture

Late Binding

Integrated Resource Management

Page 18: talk

18

P2P

Protocol

SMS

Protocol

email

Protocol

Bluetooth

Interface

WiFi

Interface

Protocols Interfaces

Alice

Bluetooth

01:12:E8...

alice@

Names

Late Binding Send

Metadata

Page 19: talk

19

Late Binding Receive

Bluetooth

Interface

WiFi

Interface

P2P

Protocol

SMS

Protocol

email

Protocol

Metadata

Page 20: talk

20

Haggle Architecture

Late Binding

Integrated Resource Management

Page 21: talk

21

Resource Management

Actions are delegated to Haggle as a Task Must consider Benefit and Cost of action

Can change moment by moment Benefit : e.g. priorities and preferences Cost : e.g. energy, time, money

Resource manager does cost/benefit comparison using some utility function

Page 22: talk

22

Implications of using Tasks

Network architecture balances how and when network resources are best used

Easily enable new application behavior Optional network tasks Predictive downloads High/Low priority operations Hoarding

Page 23: talk

23

Implementation Status

Implemented in Java J2ME for XP, Linux, Windows Mobile

Ported to C# .NET (runs better on Windows Mobile)

Code at http://haggle.cvs.sourceforge.net/ (GPL)

Prototype Apps: Messaging, Web

Page 24: talk

24

Haggle Applications (email)

HaggleHaggle

Page 25: talk

25

Haggle Applications (web)

HaggleHaggle

GetNews

cnn.comcnn.com

Page 26: talk

26

Email Results

Page 27: talk

27

Web Results

Page 28: talk

28

Conclusions

Haggle is a stab at a clean-slate redesign of the network architecture for mobile nodes

Take networking out of the application Seamless mobile experience for user

If data could get there or be found there, Haggle enables it

One application for one user level task

Page 29: talk

29

The End!

http://www.haggleproject.org/

[email protected]://www.cs.toronto.edu/~jingsu/

[email protected]://research.microsoft.com/~jws/

Thanks for listening Any questions?

Page 30: talk

30

Extra slides

Page 31: talk

31

Aside on security etc

Security was “left out” for version 1 in this 4-year EU project, but threats were considered

Data security can reuse existing solutions of authentication/encryption

Some new threats to privacy Neighbourhood visibility means trackability

Page 32: talk

32

Future Work Ideas:resource-aware media sharing

Haggle can do predictive application data store, evict it if “more important” data comes along Keep your photo albums in empty laptop space Keep “public” media in TiVo-like fashion

Haggle makes forwarding decisions with knowledge of resource consumption and application priorities Doesn’t ship holiday snaps over GPRS from Australia

Haggle can share data with neighbours, facilitating use of free fast local connectivity wherever possible

Page 33: talk

33

Phase transitions and networks Solid networks: wired, or fixed wireless mesh

Long lived end-to-end routes Liquid networks: Mobile Ad-Hoc Networking

(MANET) Short lived end-to-gateway routes

Gaseous networks: Delay Tolerant Networking (DTN), Pocket Switched Networking (PSN) No routes at all! Opportunistic, store and forward networking One way paths, asymmetry, node mobility carries data

Haggle targets all three Data may move across all three to get end-to-end Nodes “change phase” at any time – an integrated solution

is needed to handle transitions transparently

Page 34: talk

34

Problem Scenario: Messaging

Bob wants to send a message to Alice Obvious choice: email!

No hotspot High cellular costs

Current solutions require manual labor Reconfigure ad hoc connectivity Use USB key

Current solutions are incomplete.Don’t preserve context

Page 35: talk

35

Problem Scenario: Searching

Want some info while at a conference Local food information Today’s news headlines

Cellular or hotspot might be unavailable, congested, or expensive

Chances are, others around have info But we can’t get at, let alone share, this data

Page 36: talk

36

Underlying Problem

Applications must specify networking details Bind connection addresses, protocols, interfaces

Dynamic binding is hard Apps are designed to assume specific networking

modes and availability of specific services. Resource usage coordination hard

Leave it to manual user intervention/selection Data context is hidden in app logic

Page 37: talk

37

Solution

Free apps from networking responsibility Focus on processing, procuring, and

disseminating data Expose meta-data and relations

Search across apps and nodes Node architecture contains network logic

Binding decisions, resource management Apps function dynamically in mobile environments

Page 38: talk

38

Externalize Naming, Routing, and Resource Management

Haggle targets all networking types Well connected infrastructure Mobile ad hoc networks Delay tolerant / pocket switched network

Naming changes across different networks Underlying forwarding assumptions change Automatically manage device use of

communication due to power, priority, and cost.

Page 39: talk

39

Externalize Data and Networking

Application can procure or disseminate data through any combination of protocols and networks

Application

Logic

Wifi

Network

Code

Email

Protocol

HTTP

Protocol

P2P

Protocol

Bluetooth

Network

Code

Metadata

Data

Page 40: talk

40

Data Object

Basic building block of Haggle Contains a set of type/value attribute pairs

type pdf file

data . . .

tag work

tag important

type Rfc822 (email)

text Blah

from [email protected]

… …

Page 41: talk

41

Data Object Filters

Filter object

regex is MP3 and has tag U2

persist no

Filter object

regex is HTML and contains news and timestamp > 30 minutes ago

persist yes

Page 42: talk

42

Forwarding Objects

type pdf file

data . . .

tag work

tag important

type Email message

text Blah

Flag important

Name object

Name “Alice Smith”

Name object

Name [email protected]

Name object

Name 00:12:EF:…

Name object

Name PDA device

Forwarding object

TTL 255

priority high

Page 43: talk

43

Data Object Filters are Powerful Mechanisms

One-Off Persistent

Local “Desktop” Search

(find mp3s with artist “U2”)

Listen

(wants to receive incoming data)

Remote “Web” Search

(find “london restaurants”)

Subscribe

(send all photos created by user X to X’s PC)

Page 44: talk

44

Forwarding Objects

Full structure is sent, empowering intermediary nodes to: Use data as they see fit Use up-to-date state to

make best forwarding decision

Forward

DataData

DataData

NameName

Name

Name

Page 45: talk

45

NeighbourDiscovery

Connectivities have responsibility for neighbour discovery

Protocols use neighbours to “mark” NOs “nearby”

Resource management controls frequency of neighbour discovery

Haggle Application Interface

Applications (messaging, web, etc)

Protocol

Res

ourc

e

Data

Name

Connectivity

Forw

ardi

ng

Connectivities (WiFi, BT, GPRS, etc)

1. Set task

2. Execute

5. In

sert

new

nam

es

3: Discovery

4. Neighbour list

Page 46: talk

46

SendingData

Haggle Application Interface

Applications (messaging, web, etc)

Protocol

Res

ourc

e

Data

Name

Connectivity

Forw

ardi

ng

Connectivities (WiFi, BT, GPRS, etc)

5. Set task “send via X”

6. Execute (when worth it)

1. In

sert

dat

a

7. Send!

2. In

sert

nam

es

3. C

all “

sen

d”

9. Raw data10

. Co

nne

ct &

tran

smit

8. G

et &

enc

ode

data

4. Decide next hop X

API for send split into three (sets of) calls

FO can be sent to many nodes using many protocols

Asynchronous Benefits of send

change with time and context

Page 47: talk

47

ReceivingData

Incoming data is still processed using tasks

Eventually inserted into Data Manager

Apps “listen” by registering interests (DOFilters)

Haggle Application Interface

Applications (messaging, web, etc)

Protocol

Res

ourc

e

Data

Name

Connectivity

Forw

ardi

ng

Connectivities (WiFi, BT, GPRS, etc)

7. Notify interested apps

6. Insert data objects

8. Mine names

2. Incomin

g connection

1. Bind to networks

3. Connection

5. Incoming data

4. Query

reso

urce use

Page 48: talk

48

Email App Legacy Support

Haggle API

Localhost

SMTP/POP proxy

Native Haggle App

From: [email protected]

To: [email protected]

... email ... w/ attach

ForwardingObject

DataObject

NameObject

Page 49: talk

49

Email App Legacy Support

InternetInternet

Email client on Haggle

Standardemailclient

email

email

Email client on Haggle

emailP2P

Haggle Data Object

Haggle Data Objectencapsulated in email

Page 50: talk

50

Web App Legacy Support

Haggle API

Localhost

HTTP proxy

Native Haggle App

GET slashdot.org

Found?

Look for URL

in Cache

HTTP 1.1

slashdot.org

ForwardingObject

DataObject

FilterObject

Page 51: talk

51

Web App Legacy Support

InternetInternet

Web client

Web server

httpObject request

Internalobjectcache

httphttp

Haggle Haggle

Page 52: talk

52

Example msg fwd object

message/rfc822

... email...

application/pdf

... pdf document

Alice

00:01:23:45:67:89

[email protected] Cell Phone

Forwarding

Page 53: talk

53

Future work idea:Resource-aware media sharing

Devices could do a lot of media sharing proactively Predictive content download Auto backup/hoarding of multiple caches of content

(e.g. photos, media) Sharing media with friends/family/public

But resource management is crucial Contrast laptop in docking station to laptop on plane Proactive tasks can exhaust battery life easily Don’t send holiday snaps over GPRS from Australia

Current architecture does not suffice IP stack is difficult to configure with user priorities (e.g. when

should smart phone use GPRS and when WiFi?) Opportunistic neighbourhood connectivity unutilised Current file system makes it hard for apps to fill disk with

“predictive” content

Page 54: talk

54

Email ResultsI don't show

“no haggle adhoc”, because

it obviously won't work.

Page 55: talk

55

Web ResultsI don't show

“no haggle P2P”,

because it obviously

won't work.