ambienttalk rfid dais2010
TRANSCRIPT
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
Mobile RFID-enabled Applications
2
Monday 7 June 2010
Mobile RFID-enabled Applications
Mobile devices
2
Monday 7 June 2010
Mobile RFID-enabled Applications
Mobile devices
2
Monday 7 June 2010
Mobile RFID-enabled Applications
Mobile devices
Intermittent connectivity
2
Monday 7 June 2010
Mobile RFID-enabled Applications
Mobile devices
Intermittent connectivity
2
Spontaneous interactions
Monday 7 June 2010
Mobile RFID-enabled Applications
Mobile devices
Intermittent connectivity
2
Scarce infrastructure
Spontaneous interactions
Monday 7 June 2010
Mobile RFID-enabled Applications
Mobile devices
Intermittent connectivity
2
Scarce infrastructure
Spontaneous interactions
Representation of physical objects
Monday 7 June 2010
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
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
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
4
Classless object model
Non-blocking communication
Dynamic object discovery
Assumes no infrastructure
Monday 7 June 2010
Event Loop Concurrency in AmbientTalk5
Monday 7 June 2010
Event Loop Concurrency in AmbientTalk
Event Loop
Message queue
5
Monday 7 June 2010
Event Loop Concurrency in AmbientTalk
‘local’ object
5
Monday 7 June 2010
Event Loop Concurrency in AmbientTalk
‘remote’ object
5
Monday 7 June 2010
Event Loop Concurrency in AmbientTalk6
Monday 7 June 2010
Event Loop Concurrency in AmbientTalk
“do m immediately”
obj
obj.m()
6
Monday 7 June 2010
Event Loop Concurrency in AmbientTalk
“do m eventually”
obj<-m()
6
Monday 7 June 2010
Event Loop Concurrency in AmbientTalk
“do m eventually”
obj<-m()
6
Monday 7 June 2010
Event Loop Concurrency in AmbientTalk
?
future
6
Monday 7 June 2010
Event Loop Concurrency in AmbientTalk
?
future
when: future becomes: { |value| // process reply}
6
Monday 7 June 2010
Event Loop Concurrency in AmbientTalk
?
future
when: future becomes: { |value| // process reply}
6
Monday 7 June 2010
Exporting & discovering objects
mplayer
7
Monday 7 June 2010
Exporting & discovering objects
mplayer
deftype MusicPlayer deftype MusicPlayer
7
Monday 7 June 2010
Exporting & discovering objects
mplayer
export: mplayer as: MusicPlayer
deftype MusicPlayer deftype MusicPlayer
7
Monday 7 June 2010
Exporting & discovering objects
mplayer
export: mplayer as: MusicPlayer
whenever: MusicPlayer discovered: { |mplayer| // open a session}
deftype MusicPlayer deftype MusicPlayer
7
Monday 7 June 2010
Exporting & discovering objects
mplayer
export: mplayer as: MusicPlayer
whenever: MusicPlayer discovered: { |mplayer| // open a session}
deftype MusicPlayer deftype MusicPlayer
7
Monday 7 June 2010
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
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
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
Far References
session
when: session<-uploadSong(s)@Due(timeout) becomes: { |ack| // continue exchange} catch: TimeoutException using: { |e| // stop exchange}
8
Monday 7 June 2010
Far References
session
when: session<-uploadSong(s)@Due(timeout) becomes: { |ack| // continue exchange} catch: TimeoutException using: { |e| // stop exchange}
8
Monday 7 June 2010
Far References
session
when: session<-uploadSong(s)@Due(timeout) becomes: { |ack| // continue exchange} catch: TimeoutException using: { |e| // stop exchange}
8
Monday 7 June 2010
RFID and AmbientTalk
RFID event loop
Hardware Abstraction Layer
9
Monday 7 June 2010
RFID and AmbientTalk
RFID event loop
Hardware Abstraction Layer
9
Monday 7 June 2010
RFID and AmbientTalk
RFID event loop
Hardware Abstraction Layer
9
Monday 7 June 2010
RFID and AmbientTalk
RFID event loop
Hardware Abstraction Layer
9
Monday 7 June 2010
RFID and AmbientTalk
RFID event loop
Hardware Abstraction Layer
9
Monday 7 June 2010
RFID and AmbientTalk
RFID event loop
Hardware Abstraction Layer
9
Monday 7 June 2010
RFID and AmbientTalk
RFID event loop
Hardware Abstraction Layer
9
Monday 7 June 2010
RFID and AmbientTalk
RFID event loop
Hardware Abstraction Layer
9
Monday 7 June 2010
RFID and AmbientTalk
RFID event loop
Hardware Abstraction Layer
9
Monday 7 June 2010
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
16
Monday 7 June 2010
17
Monday 7 June 2010
Implementation
RFID hardware level
18RFID Hardware Abstraction Layer
Monday 7 June 2010
Implementation
RFID hardware level
Java RFID library level
JNI
18RFID Hardware Abstraction Layer
Monday 7 June 2010
Implementation
RFID hardware level
Java RFID library level
JNI
public class Transponder { ... }
18RFID Hardware Abstraction Layer
Monday 7 June 2010
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
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
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
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
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
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