Transcript
Page 1: AmbientTalk Rfid Dais2010

Distributed Object-Oriented Programming with RFID Technology

Andoni Lombide Carreton, Kevin Pinte and Wolfgang De Meuter

Department of Computer ScienceVrije Universiteit Brussel

10th IFIP International Conference on Distributed Applications and Interoperable SystemsJune 7-10 2010Amsterdam, the Netherlands 1

Monday 7 June 2010

Page 2: AmbientTalk Rfid Dais2010

Mobile RFID-enabled Applications

2

Monday 7 June 2010

Page 3: AmbientTalk Rfid Dais2010

Mobile RFID-enabled Applications

Mobile devices

2

Monday 7 June 2010

Page 4: AmbientTalk Rfid Dais2010

Mobile RFID-enabled Applications

Mobile devices

2

Monday 7 June 2010

Page 5: AmbientTalk Rfid Dais2010

Mobile RFID-enabled Applications

Mobile devices

Intermittent connectivity

2

Monday 7 June 2010

Page 6: AmbientTalk Rfid Dais2010

Mobile RFID-enabled Applications

Mobile devices

Intermittent connectivity

2

Spontaneous interactions

Monday 7 June 2010

Page 7: AmbientTalk Rfid Dais2010

Mobile RFID-enabled Applications

Mobile devices

Intermittent connectivity

2

Scarce infrastructure

Spontaneous interactions

Monday 7 June 2010

Page 8: AmbientTalk Rfid Dais2010

Mobile RFID-enabled Applications

Mobile devices

Intermittent connectivity

2

Scarce infrastructure

Spontaneous interactions

Representation of physical objects

Monday 7 June 2010

Page 9: AmbientTalk Rfid Dais2010

5 Requirements

• Addressing physical objects (“things”)

• Storing application objects on RFID tags

• Reactivity to appearing and disappearing “things”

• Asynchronous communication with “things”

• Fault-tolerant communication

3

Monday 7 June 2010

Page 10: AmbientTalk Rfid Dais2010

5 Requirements

• Addressing physical objects (“things”)

• Storing application objects on RFID tags

• Reactivity to appearing and disappearing “things”

• Asynchronous communication with “things”

• Fault-tolerant communication

3

Monday 7 June 2010

Page 11: AmbientTalk Rfid Dais2010

5 Requirements

• Addressing physical objects (“things”)

• Storing application objects on RFID tags

• Reactivity to appearing and disappearing “things”

• Asynchronous communication with “things”

• Fault-tolerant communication

3

Monday 7 June 2010

Page 12: AmbientTalk Rfid Dais2010

4

Classless object model

Non-blocking communication

Dynamic object discovery

Assumes no infrastructure

Monday 7 June 2010

Page 13: AmbientTalk Rfid Dais2010

Event Loop Concurrency in AmbientTalk5

Monday 7 June 2010

Page 14: AmbientTalk Rfid Dais2010

Event Loop Concurrency in AmbientTalk

Event Loop

Message queue

5

Monday 7 June 2010

Page 15: AmbientTalk Rfid Dais2010

Event Loop Concurrency in AmbientTalk

‘local’ object

5

Monday 7 June 2010

Page 16: AmbientTalk Rfid Dais2010

Event Loop Concurrency in AmbientTalk

‘remote’ object

5

Monday 7 June 2010

Page 17: AmbientTalk Rfid Dais2010

Event Loop Concurrency in AmbientTalk6

Monday 7 June 2010

Page 18: AmbientTalk Rfid Dais2010

Event Loop Concurrency in AmbientTalk

“do m immediately”

obj

obj.m()

6

Monday 7 June 2010

Page 19: AmbientTalk Rfid Dais2010

Event Loop Concurrency in AmbientTalk

“do m eventually”

obj<-m()

6

Monday 7 June 2010

Page 20: AmbientTalk Rfid Dais2010

Event Loop Concurrency in AmbientTalk

“do m eventually”

obj<-m()

6

Monday 7 June 2010

Page 21: AmbientTalk Rfid Dais2010

Event Loop Concurrency in AmbientTalk

?

future

6

Monday 7 June 2010

Page 22: AmbientTalk Rfid Dais2010

Event Loop Concurrency in AmbientTalk

?

future

when: future becomes: { |value| // process reply}

6

Monday 7 June 2010

Page 23: AmbientTalk Rfid Dais2010

Event Loop Concurrency in AmbientTalk

?

future

when: future becomes: { |value| // process reply}

6

Monday 7 June 2010

Page 24: AmbientTalk Rfid Dais2010

Exporting & discovering objects

mplayer

7

Monday 7 June 2010

Page 25: AmbientTalk Rfid Dais2010

Exporting & discovering objects

mplayer

deftype MusicPlayer deftype MusicPlayer

7

Monday 7 June 2010

Page 26: AmbientTalk Rfid Dais2010

Exporting & discovering objects

mplayer

export: mplayer as: MusicPlayer

deftype MusicPlayer deftype MusicPlayer

7

Monday 7 June 2010

Page 27: AmbientTalk Rfid Dais2010

Exporting & discovering objects

mplayer

export: mplayer as: MusicPlayer

whenever: MusicPlayer discovered: { |mplayer| // open a session}

deftype MusicPlayer deftype MusicPlayer

7

Monday 7 June 2010

Page 28: AmbientTalk Rfid Dais2010

Exporting & discovering objects

mplayer

export: mplayer as: MusicPlayer

whenever: MusicPlayer discovered: { |mplayer| // open a session}

deftype MusicPlayer deftype MusicPlayer

7

Monday 7 June 2010

Page 29: AmbientTalk Rfid Dais2010

Far References

session

uploadSong

when: session<-uploadSong(s)@Due(timeout) becomes: { |ack| // continue exchange} catch: TimeoutException using: { |e| // stop exchange}

8

Monday 7 June 2010

Page 30: AmbientTalk Rfid Dais2010

Far References

session

uploadSong

when: session<-uploadSong(s)@Due(timeout) becomes: { |ack| // continue exchange} catch: TimeoutException using: { |e| // stop exchange}

8

Monday 7 June 2010

Page 31: AmbientTalk Rfid Dais2010

Far References

session

uploadSong

when: session<-uploadSong(s)@Due(timeout) becomes: { |ack| // continue exchange} catch: TimeoutException using: { |e| // stop exchange}

8

Monday 7 June 2010

Page 32: AmbientTalk Rfid Dais2010

Far References

session

when: session<-uploadSong(s)@Due(timeout) becomes: { |ack| // continue exchange} catch: TimeoutException using: { |e| // stop exchange}

8

Monday 7 June 2010

Page 33: AmbientTalk Rfid Dais2010

Far References

session

when: session<-uploadSong(s)@Due(timeout) becomes: { |ack| // continue exchange} catch: TimeoutException using: { |e| // stop exchange}

8

Monday 7 June 2010

Page 34: AmbientTalk Rfid Dais2010

Far References

session

when: session<-uploadSong(s)@Due(timeout) becomes: { |ack| // continue exchange} catch: TimeoutException using: { |e| // stop exchange}

8

Monday 7 June 2010

Page 35: AmbientTalk Rfid Dais2010

RFID and AmbientTalk

RFID event loop

Hardware Abstraction Layer

9

Monday 7 June 2010

Page 36: AmbientTalk Rfid Dais2010

RFID and AmbientTalk

RFID event loop

Hardware Abstraction Layer

9

Monday 7 June 2010

Page 37: AmbientTalk Rfid Dais2010

RFID and AmbientTalk

RFID event loop

Hardware Abstraction Layer

9

Monday 7 June 2010

Page 38: AmbientTalk Rfid Dais2010

RFID and AmbientTalk

RFID event loop

Hardware Abstraction Layer

9

Monday 7 June 2010

Page 39: AmbientTalk Rfid Dais2010

RFID and AmbientTalk

RFID event loop

Hardware Abstraction Layer

9

Monday 7 June 2010

Page 40: AmbientTalk Rfid Dais2010

RFID and AmbientTalk

RFID event loop

Hardware Abstraction Layer

9

Monday 7 June 2010

Page 41: AmbientTalk Rfid Dais2010

RFID and AmbientTalk

RFID event loop

Hardware Abstraction Layer

9

Monday 7 June 2010

Page 42: AmbientTalk Rfid Dais2010

RFID and AmbientTalk

RFID event loop

Hardware Abstraction Layer

9

Monday 7 June 2010

Page 43: AmbientTalk Rfid Dais2010

RFID and AmbientTalk

RFID event loop

Hardware Abstraction Layer

9

Monday 7 June 2010

Page 44: AmbientTalk Rfid Dais2010

Addressing physical objects as software objects

deftype Book;

def aBook := object: { def isbn := 123; def title := “My book”; def reviews := Vector.new();

def setTitle(newTitle)@Mutator { title := newTitle; };

def addReview(review)@Mutator { reviews.add(review); };} taggedAs: Book;

RFID event loop

Hardware Abstraction Layer

10

Monday 7 June 2010

Page 45: AmbientTalk Rfid Dais2010

Addressing physical objects as software objects

deftype Book;

def aBook := object: { def isbn := 123; def title := “My book”; def reviews := Vector.new();

def setTitle(newTitle)@Mutator { title := newTitle; };

def addReview(review)@Mutator { reviews.add(review); };} taggedAs: Book;

RFID event loop

Hardware Abstraction Layer

10

Monday 7 June 2010

Page 46: AmbientTalk Rfid Dais2010

Storing objects on RFID tags

def aBook := object: { ... };

when: BlankTag discovered: { |tag| when: tag<-initialize(aBook) becomes: { |bookReference| // ... }}

RFID event loop

Hardware Abstraction Layer

11

tagaBook

Monday 7 June 2010

Page 47: AmbientTalk Rfid Dais2010

Storing objects on RFID tags

def aBook := object: { ... };

when: BlankTag discovered: { |tag| when: tag<-initialize(aBook) becomes: { |bookReference| // ... }}

RFID event loop

Hardware Abstraction Layer

11

tagaBook

Monday 7 June 2010

Page 48: AmbientTalk Rfid Dais2010

Storing objects on RFID tags

def aBook := object: { ... };

when: BlankTag discovered: { |tag| when: tag<-initialize(aBook) becomes: { |bookReference| // ... }}

RFID event loop

Hardware Abstraction Layer

11

tagaBook

Monday 7 June 2010

Page 49: AmbientTalk Rfid Dais2010

Storing objects on RFID tags

def aBook := object: { ... };

when: BlankTag discovered: { |tag| when: tag<-initialize(aBook) becomes: { |bookReference| // ... }}

RFID event loop

Hardware Abstraction Layer

11

tag

bookReferenceaBook

Monday 7 June 2010

Page 50: AmbientTalk Rfid Dais2010

Reactivity to appearing and disappearing objects

RFID event loop

Hardware Abstraction Layer

whenever: Book discovered: { |book| // React on appearance whenever: book disconnected: { // React on disappearance } whenever: book reconnected: { // React on reappearance }} 12

Monday 7 June 2010

Page 51: AmbientTalk Rfid Dais2010

Reactivity to appearing and disappearing objects

RFID event loop

Hardware Abstraction Layer

whenever: Book discovered: { |book| // React on appearance whenever: book disconnected: { // React on disappearance } whenever: book reconnected: { // React on reappearance }} 12

Monday 7 June 2010

Page 52: AmbientTalk Rfid Dais2010

Reactivity to appearing and disappearing objects

RFID event loop

Hardware Abstraction Layer

whenever: Book discovered: { |book| // React on appearance whenever: book disconnected: { // React on disappearance } whenever: book reconnected: { // React on reappearance }} 12

Monday 7 June 2010

Page 53: AmbientTalk Rfid Dais2010

Reactivity to appearing and disappearing objects

RFID event loop

Hardware Abstraction Layer

whenever: Book discovered: { |book| // React on appearance whenever: book disconnected: { // React on disappearance } whenever: book reconnected: { // React on reappearance }} 12

Monday 7 June 2010

Page 54: AmbientTalk Rfid Dais2010

Asynchronous communication

RFID event loop

Hardware Abstraction Layerwhen: book<-getTitle() becomes: { |title| system.println(“TITLE: “ + title) };system.println(“Here first!”);

13

Monday 7 June 2010

Page 55: AmbientTalk Rfid Dais2010

Asynchronous communication

RFID event loop

Hardware Abstraction Layerwhen: book<-getTitle() becomes: { |title| system.println(“TITLE: “ + title) };system.println(“Here first!”);

13

Monday 7 June 2010

Page 56: AmbientTalk Rfid Dais2010

Asynchronous communication

RFID event loop

Hardware Abstraction Layerwhen: book<-getTitle() becomes: { |title| system.println(“TITLE: “ + title) };system.println(“Here first!”);

13

Monday 7 June 2010

Page 57: AmbientTalk Rfid Dais2010

Asynchronous communication

RFID event loop

Hardware Abstraction Layerwhen: book<-getTitle() becomes: { |title| system.println(“TITLE: “ + title) };system.println(“Here first!”);

13

Monday 7 June 2010

Page 58: AmbientTalk Rfid Dais2010

Asynchronous communication

RFID event loop

Hardware Abstraction Layerwhen: book<-getTitle() becomes: { |title| system.println(“TITLE: “ + title) };system.println(“Here first!”);

13

Monday 7 June 2010

Page 59: AmbientTalk Rfid Dais2010

Asynchronous communication

RFID event loop

Hardware Abstraction Layerwhen: book<-getTitle() becomes: { |title| system.println(“TITLE: “ + title) };system.println(“Here first!”);

13

Monday 7 June 2010

Page 60: AmbientTalk Rfid Dais2010

Asynchronous communication

RFID event loop

Hardware Abstraction Layerwhen: book<-getTitle() becomes: { |title| system.println(“TITLE: “ + title) };system.println(“Here first!”);

13

Monday 7 June 2010

Page 61: AmbientTalk Rfid Dais2010

Fault-tolerant communication

RFID event loop

Hardware Abstraction Layerdef myReview := “Not for beginners”;when: book<-addReview(myReview)@Due(10.seconds) becomes: { |ack| // Message processed successfully } catch: TimeoutException using: { |exc| // Message timed out }

14

Monday 7 June 2010

Page 62: AmbientTalk Rfid Dais2010

Fault-tolerant communication

RFID event loop

Hardware Abstraction Layerdef myReview := “Not for beginners”;when: book<-addReview(myReview)@Due(10.seconds) becomes: { |ack| // Message processed successfully } catch: TimeoutException using: { |exc| // Message timed out }

14

Monday 7 June 2010

Page 63: AmbientTalk Rfid Dais2010

Fault-tolerant communication

RFID event loop

Hardware Abstraction Layerdef myReview := “Not for beginners”;when: book<-addReview(myReview)@Due(10.seconds) becomes: { |ack| // Message processed successfully } catch: TimeoutException using: { |exc| // Message timed out }

14

Monday 7 June 2010

Page 64: AmbientTalk Rfid Dais2010

Addressing groups of RFID-tagged objects

def books := ambient: Book;

def computerScienceBooks := ambient: Book where: { |b| b.category == “Computer Science”};

def shelfFuture := computerScienceBooks<-getShelf()@Any;when: shelfFuture becomes: { |shelf| system.println(“Place the book in shelf: “ + shelf);};

computerScienceBook<-setShelf(“5D”)@[ All, Sustain ]; 15

Monday 7 June 2010

Page 65: AmbientTalk Rfid Dais2010

Addressing groups of RFID-tagged objects

def books := ambient: Book;

def computerScienceBooks := ambient: Book where: { |b| b.category == “Computer Science”};

def shelfFuture := computerScienceBooks<-getShelf()@Any;when: shelfFuture becomes: { |shelf| system.println(“Place the book in shelf: “ + shelf);};

computerScienceBook<-setShelf(“5D”)@[ All, Sustain ]; 15

Monday 7 June 2010

Page 66: AmbientTalk Rfid Dais2010

Addressing groups of RFID-tagged objects

def books := ambient: Book;

def computerScienceBooks := ambient: Book where: { |b| b.category == “Computer Science”};

def shelfFuture := computerScienceBooks<-getShelf()@Any;when: shelfFuture becomes: { |shelf| system.println(“Place the book in shelf: “ + shelf);};

computerScienceBook<-setShelf(“5D”)@[ All, Sustain ]; 15

Monday 7 June 2010

Page 67: AmbientTalk Rfid Dais2010

Addressing groups of RFID-tagged objects

def books := ambient: Book;

def computerScienceBooks := ambient: Book where: { |b| b.category == “Computer Science”};

def shelfFuture := computerScienceBooks<-getShelf()@Any;when: shelfFuture becomes: { |shelf| system.println(“Place the book in shelf: “ + shelf);};

computerScienceBook<-setShelf(“5D”)@[ All, Sustain ]; 15

Monday 7 June 2010

Page 68: AmbientTalk Rfid Dais2010

Addressing groups of RFID-tagged objects

def books := ambient: Book;

def computerScienceBooks := ambient: Book where: { |b| b.category == “Computer Science”};

def shelfFuture := computerScienceBooks<-getShelf()@Any;when: shelfFuture becomes: { |shelf| system.println(“Place the book in shelf: “ + shelf);};

computerScienceBook<-setShelf(“5D”)@[ All, Sustain ]; 15

Monday 7 June 2010

Page 69: AmbientTalk Rfid Dais2010

16

Monday 7 June 2010

Page 70: AmbientTalk Rfid Dais2010

17

Monday 7 June 2010

Page 71: AmbientTalk Rfid Dais2010

Implementation

RFID hardware level

18RFID Hardware Abstraction Layer

Monday 7 June 2010

Page 72: AmbientTalk Rfid Dais2010

Implementation

RFID hardware level

Java RFID library level

JNI

18RFID Hardware Abstraction Layer

Monday 7 June 2010

Page 73: AmbientTalk Rfid Dais2010

Implementation

RFID hardware level

Java RFID library level

JNI

public class Transponder { ... }

18RFID Hardware Abstraction Layer

Monday 7 June 2010

Page 74: AmbientTalk Rfid Dais2010

Implementation

RFID hardware level

Java RFID library level

JNI

Symbiosis

AT RFID Event Loop

public class Transponder { ... }

18RFID Hardware Abstraction Layer

Monday 7 June 2010

Page 75: AmbientTalk Rfid Dais2010

Implementation

RFID hardware level

Java RFID library level

JNI

Symbiosis

AT RFID Event Loop

public class Transponder { ... }

when: tag<-getSerial() becomes: { |nr| ...}

18RFID Hardware Abstraction Layer

Monday 7 June 2010

Page 76: AmbientTalk Rfid Dais2010

Implementation

RFID hardware level

Java RFID library level

Thing level

JNI

Symbiosis

AT RFID Event Loop

Object serialization/backend connection

public class Transponder { ... }

when: tag<-getSerial() becomes: { |nr| ...}

18RFID Hardware Abstraction Layer

Monday 7 June 2010

Page 77: AmbientTalk Rfid Dais2010

Implementation

RFID hardware level

Java RFID library level

Thing level

JNI

Symbiosis

AT RFID Event Loop

Object serialization/backend connection

public class Transponder { ... }

when: tag<-getSerial() becomes: { |nr| ...}

book<-setTitle(“Title”);

18RFID Hardware Abstraction Layer

Monday 7 June 2010

Page 78: AmbientTalk Rfid Dais2010

Limitations and Future Work

• Processing RFID events happens sequentially within one event loop. May lead to performance problems in very large systems?

• No data protection when multiple RFID devices write to tags concurrently.

• Efficient serialization of proxy objects is work in progress. For cheap passive tags, we need to fit the data on ~8K of memory.

• New generation of active RFID hardware may provide solutions.

19

Monday 7 June 2010

Page 79: AmbientTalk Rfid Dais2010

Conclusion

• Represent RFID-tagged things as true mutable proxy objects in an object-oriented system.

• Reactivity to appearing and disappearing things.

• Asynchronous and fault-tolerant communication.

• Addressing and communicating with groups of intensionally described things.

http://soft.vub.ac.be/soft/research/amopcop 20

Monday 7 June 2010


Top Related