1. Distributed Object-Oriented Programming with
RFID Technology
Andoni Lombide Carreton, Kevin Pinte and Wolfgang De Meuter
Department of Computer Science
Vrije Universiteit Brussel
10th IFIP International Conference on Distributed Applications and Interoperable Systems
June 7-10 2010
Amsterdam, the Netherlands 1
Monday 7 June 2010
7. Mobile RFID-enabled Applications
Scarce infrastructure
Mobile devices
Spontaneous interactions
Intermittent connectivity
2
Monday 7 June 2010
8. Mobile RFID-enabled Applications
Scarce infrastructure
Mobile devices
Representation of physical objects
Spontaneous interactions
Intermittent connectivity
2
Monday 7 June 2010
9. 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
10. 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
11. 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
12. Assumes no Non-blocking
infrastructure communication
Classless Dynamic object
object model discovery
4
Monday 7 June 2010
35. RFID and AmbientTalk
RFID event loop
Hardware Abstraction Layer
9
Monday 7 June 2010
36. RFID and AmbientTalk
RFID event loop
Hardware Abstraction Layer
9
Monday 7 June 2010
37. RFID and AmbientTalk
RFID event loop
Hardware Abstraction Layer
9
Monday 7 June 2010
38. RFID and AmbientTalk
RFID event loop
Hardware Abstraction Layer
9
Monday 7 June 2010
39. RFID and AmbientTalk
RFID event loop
Hardware Abstraction Layer
9
Monday 7 June 2010
40. RFID and AmbientTalk
RFID event loop
Hardware Abstraction Layer
9
Monday 7 June 2010
41. RFID and AmbientTalk
RFID event loop
Hardware Abstraction Layer
9
Monday 7 June 2010
42. RFID and AmbientTalk
RFID event loop
Hardware Abstraction Layer
9
Monday 7 June 2010
43. RFID and AmbientTalk
RFID event loop
Hardware Abstraction Layer
9
Monday 7 June 2010
44. Addressing physical objects as software objects
deftype Book;
def aBook := object: {
def isbn := 123;
def title := “My book”;
def reviews := Vector.new();
RFID event loop
def setTitle(newTitle)@Mutator {
title := newTitle;
};
Hardware Abstraction Layer
def addReview(review)@Mutator {
reviews.add(review);
};
} taggedAs: Book;
10
Monday 7 June 2010
45. Addressing physical objects as software objects
deftype Book;
def aBook := object: {
def isbn := 123;
def title := “My book”;
def reviews := Vector.new();
RFID event loop
def setTitle(newTitle)@Mutator {
title := newTitle;
};
Hardware Abstraction Layer
def addReview(review)@Mutator {
reviews.add(review);
};
} taggedAs: Book;
10
Monday 7 June 2010
46. Storing objects on RFID tags
tag
aBook
RFID event loop
def aBook := object: { ... };
Hardware Abstraction Layer
when: BlankTag discovered: { |tag|
when: tag<-initialize(aBook)
becomes: { |bookReference|
// ...
}
} 11
Monday 7 June 2010
47. Storing objects on RFID tags
tag
aBook
RFID event loop
def aBook := object: { ... };
Hardware Abstraction Layer
when: BlankTag discovered: { |tag|
when: tag<-initialize(aBook)
becomes: { |bookReference|
// ...
}
} 11
Monday 7 June 2010
48. Storing objects on RFID tags
tag
aBook
RFID event loop
def aBook := object: { ... };
Hardware Abstraction Layer
when: BlankTag discovered: { |tag|
when: tag<-initialize(aBook)
becomes: { |bookReference|
// ...
}
} 11
Monday 7 June 2010
49. Storing objects on RFID tags
tag
aBook
bookRe
ference
RFID event loop
def aBook := object: { ... };
Hardware Abstraction Layer
when: BlankTag discovered: { |tag|
when: tag<-initialize(aBook)
becomes: { |bookReference|
// ...
}
} 11
Monday 7 June 2010
50. Reactivity to appearing and disappearing objects
RFID event loop
whenever: Book discovered: { |book|
// React on appearance
whenever: book disconnected: { Hardware Abstraction Layer
// React on disappearance
}
whenever: book reconnected: {
// React on reappearance
}
12
}
Monday 7 June 2010
51. Reactivity to appearing and disappearing objects
RFID event loop
whenever: Book discovered: { |book|
// React on appearance
whenever: book disconnected: { Hardware Abstraction Layer
// React on disappearance
}
whenever: book reconnected: {
// React on reappearance
}
12
}
Monday 7 June 2010
52. Reactivity to appearing and disappearing objects
RFID event loop
whenever: Book discovered: { |book|
// React on appearance
whenever: book disconnected: { Hardware Abstraction Layer
// React on disappearance
}
whenever: book reconnected: {
// React on reappearance
}
12
}
Monday 7 June 2010
53. Reactivity to appearing and disappearing objects
RFID event loop
whenever: Book discovered: { |book|
// React on appearance
whenever: book disconnected: { Hardware Abstraction Layer
// React on disappearance
}
whenever: book reconnected: {
// React on reappearance
}
12
}
Monday 7 June 2010
54. Asynchronous communication
RFID event loop
when: book<-getTitle() Hardware Abstraction Layer
becomes: { |title|
system.println(“TITLE: “ + title)
};
system.println(“Here first!”);
13
Monday 7 June 2010
55. Asynchronous communication
RFID event loop
when: book<-getTitle() Hardware Abstraction Layer
becomes: { |title|
system.println(“TITLE: “ + title)
};
system.println(“Here first!”);
13
Monday 7 June 2010
56. Asynchronous communication
RFID event loop
when: book<-getTitle() Hardware Abstraction Layer
becomes: { |title|
system.println(“TITLE: “ + title)
};
system.println(“Here first!”);
13
Monday 7 June 2010
57. Asynchronous communication
RFID event loop
when: book<-getTitle() Hardware Abstraction Layer
becomes: { |title|
system.println(“TITLE: “ + title)
};
system.println(“Here first!”);
13
Monday 7 June 2010
58. Asynchronous communication
RFID event loop
when: book<-getTitle() Hardware Abstraction Layer
becomes: { |title|
system.println(“TITLE: “ + title)
};
system.println(“Here first!”);
13
Monday 7 June 2010
59. Asynchronous communication
RFID event loop
when: book<-getTitle() Hardware Abstraction Layer
becomes: { |title|
system.println(“TITLE: “ + title)
};
system.println(“Here first!”);
13
Monday 7 June 2010
60. Asynchronous communication
RFID event loop
when: book<-getTitle() Hardware Abstraction Layer
becomes: { |title|
system.println(“TITLE: “ + title)
};
system.println(“Here first!”);
13
Monday 7 June 2010
61. Fault-tolerant communication
RFID event loop
def myReview := “Not for beginners”;
Hardware Abstraction Layer
when: book<-addReview(myReview)@Due(10.seconds)
becomes: { |ack|
// Message processed successfully
} catch: TimeoutException using: { |exc|
// Message timed out
} 14
Monday 7 June 2010
62. Fault-tolerant communication
RFID event loop
def myReview := “Not for beginners”;
Hardware Abstraction Layer
when: book<-addReview(myReview)@Due(10.seconds)
becomes: { |ack|
// Message processed successfully
} catch: TimeoutException using: { |exc|
// Message timed out
} 14
Monday 7 June 2010
63. Fault-tolerant communication
RFID event loop
def myReview := “Not for beginners”;
Hardware Abstraction Layer
when: book<-addReview(myReview)@Due(10.seconds)
becomes: { |ack|
// Message processed successfully
} catch: TimeoutException using: { |exc|
// Message timed out
} 14
Monday 7 June 2010
64. 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
65. 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
66. 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
67. 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
68. 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
71. Implementation
RFID hardware level
RFID Hardware Abstraction Layer
18
Monday 7 June 2010
72. Implementation
Java RFID library level
JNI
RFID hardware level
RFID Hardware Abstraction Layer
18
Monday 7 June 2010
73. Implementation
public class Transponder {
Java RFID library level }
...
JNI
RFID hardware level
RFID Hardware Abstraction Layer
18
Monday 7 June 2010
74. Implementation
AT RFID Event Loop
Symbiosis
public class Transponder {
Java RFID library level }
...
JNI
RFID hardware level
RFID Hardware Abstraction Layer
18
Monday 7 June 2010
75. Implementation
when: tag<-getSerial() becomes: { |nr|
AT RFID Event Loop }
...
Symbiosis
public class Transponder {
Java RFID library level }
...
JNI
RFID hardware level
RFID Hardware Abstraction Layer
18
Monday 7 June 2010
76. Implementation
Thing level
Object serialization/backend connection
when: tag<-getSerial() becomes: { |nr|
AT RFID Event Loop }
...
Symbiosis
public class Transponder {
Java RFID library level }
...
JNI
RFID hardware level
RFID Hardware Abstraction Layer
18
Monday 7 June 2010
77. Implementation
Thing level book<-setTitle(“Title”);
Object serialization/backend connection
when: tag<-getSerial() becomes: { |nr|
AT RFID Event Loop }
...
Symbiosis
public class Transponder {
Java RFID library level }
...
JNI
RFID hardware level
RFID Hardware Abstraction Layer
18
Monday 7 June 2010
78. 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
79. 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