Page 1
Ambient-Oriented Dataflow Programming for Mobile RFID-Enabled Applications
Andoni Lombide Carreton
Promotor: Prof. Dr. Wolfgang De MeuterCopromotor: Prof. Dr. Theo D’Hondt Vrije Universiteit Brussel
Brussels, Belgium
Private PhD Defense, October 11th 2011, Brussels 1
Page 2
Roadmap
2
Part I: Mobile RFID-Enabled Applications
Part II: Ambient-Oriented Programming for Mobile RFID-Enabled Applications
Part III: Node-Centric Ambient-Oriented Dataflow Programming
Part IV: Network-Centric Ambient-Oriented Dataflow Programming
Part V: Conclusion
Page 3
Part I: Mobile RFID-Enabled Applications
3
Page 4
RFID Technology
0 cm ~ 10 m
0 Kb ~ 32 Kb
0.02$ ~ 0.50$
4
Page 5
Mobile RFID-Enabled Applications
5
Page 13
Event-based Decoupling and Inversion of Control
(register-connection-callback (lambda (tagged-object)
...))
(register-reply-callback (lambda (reply) ...))
(register-disconnection-callback (lambda (tagged-object) ...))
8
Page 14
Event-based Decoupling and Inversion of Control
(register-connection-callback (lambda (tagged-object)
...))
(register-reply-callback (lambda (reply) ...))
(register-disconnection-callback (lambda (tagged-object) ...))
8
Page 15
Event-based Decoupling and Inversion of Control
(register-connection-callback (lambda (tagged-object) (set! ...) ...))
(register-reply-callback (lambda (reply) (set! ...) ...))
(register-disconnection-callback (lambda (tagged-object) (set! ...) ...))
Shared state
Shared state
Shared state
?
Shared state9
Page 16
Event-based Decoupling and Inversion of Control
(register-connection-callback (lambda (tagged-object) (set! ...) ...))
(register-reply-callback (lambda (reply) (set! ...) ...))
(register-disconnection-callback (lambda (tagged-object) (set! ...) ...))
Shared state
Shared state
Shared state
?
Shared state9
Page 17
Event-based Decoupling and Inversion of Control
(register-connection-callback (lambda (tagged-object) (set! ...) ...))
(register-reply-callback (lambda (reply) (set! ...) ...))
(register-disconnection-callback (lambda (tagged-object) (set! ...) ...))
Shared state
Shared state
Shared state
?
Shared state9
Page 18
Event-based Decoupling and Inversion of Control
(register-connection-callback (lambda (tagged-object) (set! ...) ...))
(register-reply-callback (lambda (reply) (set! ...) ...))
(register-disconnection-callback (lambda (tagged-object) (set! ...) ...))
Shared state
Shared state
Shared state
?
Shared state
Decoupling in space
Decoupling in time
Decoupling in arity
Rich representation of events
No inversion of control
Global control flow management9
Page 19
RFID-tagged Things as Objects
book.addReview(“Good book”);
println(book.getReviews());
10
Page 20
RFID-tagged Things as Objects
1. Addressing physical objects
2. Storing application-specific data on RFID tags
3. Reactivity to appearing and disappearing objects
4. Asynchronous, fault-tolerant communication
5. Data consistency
6. Infrastructureless operation
10
Page 21
RFID-tagged Things as Objects
1. Addressing physical objects
2. Storing application-specific data on RFID tags
3. Reactivity to appearing and disappearing objects
4. Asynchronous, fault-tolerant communication
5. Data consistency
6. Infrastructureless operation
10
Page 22
RFID-tagged Things as Objects
1. Addressing physical objects
2. Storing application-specific data on RFID tags
3. Reactivity to appearing and disappearing objects
4. Asynchronous, fault-tolerant communication
5. Data consistency
6. Infrastructureless operation
10
Page 23
RFID-tagged Things as Objects
1. Addressing physical objects
2. Storing application-specific data on RFID tags
3. Reactivity to appearing and disappearing objects
4. Asynchronous, fault-tolerant communication
5. Data consistency
6. Infrastructureless operation
10
Page 24
RFID-tagged Things as Objects
1. Addressing physical objects
2. Storing application-specific data on RFID tags
3. Reactivity to appearing and disappearing objects
4. Asynchronous, fault-tolerant communication
5. Data consistency
6. Infrastructureless operation
10
Page 25
RFID-tagged Things as Objects
1. Addressing physical objects
2. Storing application-specific data on RFID tags
3. Reactivity to appearing and disappearing objects
4. Asynchronous, fault-tolerant communication
5. Data consistency
6. Infrastructureless operation
10
Page 26
Survey of Related Work
Publish/subscribe systems
Reactive programming
Explicit dataflow programming
Node-centric sensor-network programming
Network-centric sensor-network programming 11
Page 27
Survey of Related Work
Publish/subscribe systems
Reactive programming
Explicit dataflow programming
Node-centric sensor-network programming
Network-centric sensor-network programming
Publish/subscribe + dataflow programming = ambient-oriented dataflow
11
Page 28
Part II: Ambient-Oriented Programming for Mobile RFID-Enabled Applications
12
Page 29
RFID in AmbientTalk
RFID event loop
Hardware Abstraction Layer
13
Page 30
RFID in AmbientTalk
RFID event loop
Hardware Abstraction Layer
13
Page 31
RFID in AmbientTalk
RFID event loop
Hardware Abstraction Layer
13
Page 32
RFID in AmbientTalk
RFID event loop
Hardware Abstraction Layer
13
Page 33
RFID in AmbientTalk
RFID event loop
Hardware Abstraction Layer
13
Page 34
RFID in AmbientTalk
RFID event loop
Hardware Abstraction Layer
13
Page 35
RFID in AmbientTalk
RFID event loop
Hardware Abstraction Layer
13
Page 36
RFID in AmbientTalk
RFID event loop
Hardware Abstraction Layer
13
Page 37
RFID in AmbientTalk
RFID event loop
Hardware Abstraction Layer
13
Page 38
Things: Proxies for Tags
deftype Book;
def aBook := thing: { 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
14
Page 39
Things: Proxies for Tags
deftype Book;
def aBook := thing: { 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
14
Page 40
Storing Objects on RFID Tags
def aBook := thing: { ... };
when: BlankTag discovered: { |tag| when: tag<-initialize(aBook) becomes: { |bookReference| // ... }}
RFID event loop
Hardware Abstraction Layer
tagaBook
15
Page 41
Storing Objects on RFID Tags
def aBook := thing: { ... };
when: BlankTag discovered: { |tag| when: tag<-initialize(aBook) becomes: { |bookReference| // ... }}
RFID event loop
Hardware Abstraction Layer
tagaBook
15
Page 42
Storing Objects on RFID Tags
def aBook := thing: { ... };
when: BlankTag discovered: { |tag| when: tag<-initialize(aBook) becomes: { |bookReference| // ... }}
RFID event loop
Hardware Abstraction Layer
tagaBook
15
Page 43
Storing Objects on RFID Tags
def aBook := thing: { ... };
when: BlankTag discovered: { |tag| when: tag<-initialize(aBook) becomes: { |bookReference| // ... }}
RFID event loop
Hardware Abstraction Layer
tag
bookReferenceaBook
15
Page 44
Reactivity to Appearing and Disappearing Things
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 };}; 16
Page 45
Reactivity to Appearing and Disappearing Things
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 };}; 16
Page 46
Reactivity to Appearing and Disappearing Things
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 };}; 16
Page 47
Reactivity to Appearing and Disappearing Things
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 };}; 16
Page 48
Asynchronous and Fault-tolerant Communication with Things
RFID event loop
Hardware Abstraction Layerwhen: book<-getTitle() becomes: { |title| system.println(“TITLE: “ + title) };system.println(“Here first!”);
17
Page 49
Asynchronous and Fault-tolerant Communication with Things
RFID event loop
Hardware Abstraction Layerwhen: book<-getTitle() becomes: { |title| system.println(“TITLE: “ + title) };system.println(“Here first!”);
17
Page 50
Asynchronous and Fault-tolerant Communication with Things
RFID event loop
Hardware Abstraction Layerwhen: book<-getTitle() becomes: { |title| system.println(“TITLE: “ + title) };system.println(“Here first!”);
17
Page 51
Asynchronous and Fault-tolerant Communication with Things
RFID event loop
Hardware Abstraction Layerwhen: book<-getTitle() becomes: { |title| system.println(“TITLE: “ + title) };system.println(“Here first!”);
17
Page 52
Asynchronous and Fault-tolerant Communication with Things
RFID event loop
Hardware Abstraction Layerwhen: book<-getTitle() becomes: { |title| system.println(“TITLE: “ + title) };system.println(“Here first!”);
17
Page 53
Asynchronous and Fault-tolerant Communication with Things
RFID event loop
Hardware Abstraction Layerwhen: book<-getTitle() becomes: { |title| system.println(“TITLE: “ + title) };system.println(“Here first!”);
17
Page 54
Asynchronous and Fault-tolerant Communication with Things
RFID event loop
Hardware Abstraction Layerwhen: book<-getTitle() becomes: { |title| system.println(“TITLE: “ + title) };system.println(“Here first!”);
17
Page 57
Summary
1. Addressing physical objects
2. Storing application-specific data on RFID tags
3. Reactivity to appearing and disappearing objects
4. Asynchronous, fault-tolerant communication
5. Data consistency
6. Infrastructureless operation
19
Page 58
Summary
1. Addressing physical objects
2. Storing application-specific data on RFID tags
3. Reactivity to appearing and disappearing objects
4. Asynchronous, fault-tolerant communication
5. Data consistency
6. Infrastructureless operation
19
Page 59
Part III: Node-Centric Ambient-Oriented Dataflow Programming
20
Page 60
The Ticket Trader Application
21
Page 61
The Ticket Trader Application
21
Event Signaling Reacting
New ticket trader connected
Automatic notification by AmbientTalk whenever:discovered:
Ticket trader disconnected
Automatic notification by AmbientTalk when:disconnected:
Ticket trader reconnected
Automatic notification by AmbientTalk
when:reconnected:
New ticket for sale notifyTicketForSale asynchronous message
notifyTicketForSale callback
Price of ticket changed
notifyPriceChanged asynchronous message
notifyPriceChanged callback
Location of ticket trader changed
notifyLocationChanged asynchronous message
notifyLocationChanged callback
Own location changed
GPS abstraction invokes callback with new coordinates
Callback registered on GPS abstraction
Page 62
Reactive Programming in AmbientTalk/R
GUI.centerOn(GPSLocation.latitude, GPSLocation.longitude);
.latitude .longitude
GUI.centerOn(_, _)
H
H+1
GPSLocation
latitude longitude
22
Page 63
Node-Centric Ambient-Oriented Dataflow Programming
subscribe( )
subscribe( )
publish( )
23
Page 64
Node-Centric Ambient-Oriented Dataflow Programming
subscribe( )
subscribe( )
publish( )
23
Page 65
Node-Centric Ambient-Oriented Dataflow Programming
subscribe( )
subscribe( )
publish( )
23
Page 66
Node-Centric Ambient-Oriented Dataflow Programming
subscribe( )
subscribe( )
publish( )
23
Page 67
Node-Centric Ambient-Oriented Dataflow Programming
subscribe( )
subscribe( )
publish( )
23
Page 68
Node-Centric Ambient-Oriented Dataflow Programming
subscribe( )
subscribe( )
publish( )
23
Page 69
Node-Centric Ambient-Oriented Dataflow Programming
subscribe( )
subscribe( )
publish( )
23
Page 70
Node-Centric Ambient-Oriented Dataflow Programming
subscribe( )
subscribe( )
publish( )
23
Page 71
Node-Centric Ambient-Oriented Dataflow Programming
subscribe( )
subscribe( )
publish( )
23
Page 72
Node-Centric Ambient-Oriented Dataflow Programming
subscribe( )
subscribe( )
publish( )
23
Page 73
Node-Centric Ambient-Oriented Dataflow Programming
subscribe( )
subscribe( )
publish( )
23
Page 74
Node-Centric Ambient-Oriented Dataflow Programming
subscribe( )
subscribe( )
publish( )
23
Page 75
Node-Centric Ambient-Oriented Dataflow Programming
subscribe( )
subscribe( )
publish( )
23
Page 76
Node-Centric Ambient-Oriented Dataflow Programming
subscribe( )
subscribe( )
publish( )
23
Page 77
Node-Centric Ambient-Oriented Dataflow Programming
subscribe( )
subscribe( )
publish( )
23
Page 78
Node-Centric Ambient-Oriented Dataflow Programming
subscribe( )
subscribe( )
publish( )
23
Page 79
Node-Centric Ambient-Oriented Dataflow Programming
subscribe( )
subscribe( )
publish( )
23
Page 80
Node-Centric Ambient-Oriented Dataflow Programming
subscribe( )
subscribe( )
publish( )
23
Page 81
Ambient Behaviorsdeftype TicketVendorLocation;
exportBehavior: GPSLocation as: TicketVendorLocation to: { |buyer| buyer.interestedIn == “Rock Werchter” };
deftype TicketVendorLocation;
def vendorLocation := ambientBehavior: TicketVendorLocation where: { def interestedIn := “Rock Werchter” } @Any;
GUI.showLocationOnMap(vendorLocation); 24
Page 82
Ambient Behaviorsdeftype TicketVendorLocation;
exportBehavior: GPSLocation as: TicketVendorLocation to: { |buyer| buyer.interestedIn == “Rock Werchter” };
deftype TicketVendorLocation;
def vendorLocation := ambientBehavior: TicketVendorLocation where: { def interestedIn := “Rock Werchter” } @Any;
GUI.showLocationOnMap(vendorLocation); 24
Page 83
Ambient Behaviorsdeftype TicketVendorLocation;
exportBehavior: GPSLocation as: TicketVendorLocation to: { |buyer| buyer.interestedIn == “Rock Werchter” };
deftype TicketVendorLocation;
def vendorLocation := ambientBehavior: TicketVendorLocation where: { def interestedIn := “Rock Werchter” } @Any;
GUI.showLocationOnMap(vendorLocation); 24
Page 84
Ambient Behaviorsdeftype TicketVendorLocation;
exportBehavior: GPSLocation as: TicketVendorLocation to: { |buyer| buyer.interestedIn == “Rock Werchter” };
deftype TicketVendorLocation;
def vendorLocation := ambientBehavior: TicketVendorLocation where: { def interestedIn := “Rock Werchter” } @Any;
GUI.showLocationOnMap(vendorLocation); 24
Page 85
Ambient Behaviorsdeftype TicketVendorLocation;
exportBehavior: GPSLocation as: TicketVendorLocation to: { |buyer| buyer.interestedIn == “Rock Werchter” };
deftype TicketVendorLocation;
def vendorLocation := ambientBehavior: TicketVendorLocation where: { def interestedIn := “Rock Werchter” } @Any;
GUI.showLocationOnMap(vendorLocation); 24
Page 86
Ambient Behaviorsdeftype TicketVendorLocation;
exportBehavior: GPSLocation as: TicketVendorLocation to: { |buyer| buyer.interestedIn == “Rock Werchter” };
deftype TicketVendorLocation;
def vendorLocations := ambientBehavior: TicketVendorLocation where: { def interestedIn := “Rock Werchter” } @All(3.seconds);
vendorLocations.each: { |loc| GUI.showLocationOnMap(loc) }; 24
Page 87
Ambient Behaviorsdeftype TicketVendorLocation;
exportBehavior: GPSLocation as: TicketVendorLocation to: { |buyer| buyer.interestedIn == “Rock Werchter” };
deftype TicketVendorLocation;
def vendorLocations := ambientBehavior: TicketVendorLocation where: { def interestedIn := “Rock Werchter” } @All(3.seconds);
vendorLocations.each: { |loc| GUI.showLocationOnMap(loc) }; 24
Page 88
Ambient Behaviorsdeftype TicketVendorLocation;
exportBehavior: GPSLocation as: TicketVendorLocation to: { |buyer| buyer.interestedIn == “Rock Werchter” };
deftype TicketVendorLocation;
def vendorLocations := ambientBehavior: TicketVendorLocation where: { def interestedIn := “Rock Werchter” } @All(3.seconds);
vendorLocations.each: { |loc| GUI.showLocationOnMap(loc) }; 24
Page 89
Ambient Behaviorsdeftype TicketVendorLocation;
exportBehavior: GPSLocation as: TicketVendorLocation to: { |buyer| buyer.interestedIn == “Rock Werchter” };
deftype TicketVendorLocation;
def vendorLocations := ambientBehavior: TicketVendorLocation where: { def interestedIn := “Rock Werchter” } @All(3.seconds);
vendorLocations.each: { |loc| GUI.showLocationOnMap(loc) }; 24
Page 90
Ambient Behaviorsdeftype TicketVendorLocation;
exportBehavior: GPSLocation as: TicketVendorLocation to: { |buyer| buyer.interestedIn == “Rock Werchter” };
deftype TicketVendorLocation;
def vendorLocations := ambientBehavior: TicketVendorLocation where: { def interestedIn := “Rock Werchter” } @All(3.seconds);
vendorLocations.each: { |loc| GUI.showLocationOnMap(loc) }; 24
Page 91
Reactive Queries
deftype TicketVendor;
export: ticketVendor as: TicketVendor with: { def event := “Rock Werchter” };
deftype TicketVendor;
def werchterVendors := ambient: TicketVendor where: { |vendor| vendor.event == “Rock Werchter” };
def locations := werchterVendors<-getLocation()@Refresh(3.seconds);
locations.each: { |loc| GUI.showLocationOnMap(loc) }; 25
Page 92
Reactive Queries
deftype TicketVendor;
export: ticketVendor as: TicketVendor with: { def event := “Rock Werchter” };
deftype TicketVendor;
def werchterVendors := ambient: TicketVendor where: { |vendor| vendor.event == “Rock Werchter” };
def locations := werchterVendors<-getLocation()@Refresh(3.seconds);
locations.each: { |loc| GUI.showLocationOnMap(loc) }; 25
Page 93
Reactive Queries
deftype TicketVendor;
export: ticketVendor as: TicketVendor with: { def event := “Rock Werchter” };
deftype TicketVendor;
def werchterVendors := ambient: TicketVendor where: { |vendor| vendor.event == “Rock Werchter” };
def locations := werchterVendors<-getLocation()@Refresh(3.seconds);
locations.each: { |loc| GUI.showLocationOnMap(loc) };
???
25
Page 94
Reactive Queries
deftype TicketVendor;
export: ticketVendor as: TicketVendor with: { def event := “Rock Werchter” };
deftype TicketVendor;
def werchterVendors := ambient: TicketVendor where: { |vendor| vendor.event == “Rock Werchter” };
def locations := werchterVendors<-getLocation()@Refresh(3.seconds);
locations.each: { |loc| GUI.showLocationOnMap(loc) };
? ? ?
25
Page 95
Reactive Queries
deftype TicketVendor;
export: ticketVendor as: TicketVendor with: { def event := “Rock Werchter” };
deftype TicketVendor;
def werchterVendors := ambient: TicketVendor where: { |vendor| vendor.event == “Rock Werchter” };
def locations := werchterVendors<-getLocation()@Refresh(3.seconds);
locations.each: { |loc| GUI.showLocationOnMap(loc) }; 25
Page 96
Reactive Queries
deftype TicketVendor;
export: ticketVendor as: TicketVendor with: { def event := “Rock Werchter” };
deftype TicketVendor;
def werchterVendors := ambient: TicketVendor where: { |vendor| vendor.event == “Rock Werchter” };
def locations := werchterVendors<-getLocation()@Refresh(3.seconds);
locations.each: { |loc| GUI.showLocationOnMap(loc) }; 25
Page 97
Reactive Queries
deftype TicketVendor;
export: ticketVendor as: TicketVendor with: { def event := “Rock Werchter” };
deftype TicketVendor;
def werchterVendors := ambient: TicketVendor where: { |vendor| vendor.event == “Rock Werchter” };
def locations := werchterVendors<-getLocation()@Refresh(3.seconds);
locations.each: { |loc| GUI.showLocationOnMap(loc) }; 25
Page 98
Reactive Queries
deftype TicketVendor;
export: ticketVendor as: TicketVendor with: { def event := “Rock Werchter” };
deftype TicketVendor;
def werchterVendors := ambient: TicketVendor where: { |vendor| vendor.event == “Rock Werchter” };
def locations := werchterVendors<-getLocation()@Refresh(3.seconds);
locations.each: { |loc| GUI.showLocationOnMap(loc) }; 25
Page 99
Quantitative Evaluation
26
Page 100
Quantitative Evaluation
26
Page 101
Quantitative Evaluation
26
Page 102
Qualitative Evaluation
27
Event Signaling Reacting
New ticket trader connected
Automatic notification by AmbientTalk whenever:discovered:
Ticket trader disconnected
Automatic notification by AmbientTalk when:disconnected:
Ticket trader reconnected
Automatic notification by AmbientTalk
when:reconnected:
New ticket for sale notifyTicketForSale asynchronous message
notifyTicketForSale callback
Price of ticket changed
notifyPriceChanged asynchronous message
notifyPriceChanged callback
Location of ticket trader changed
notifyLocationChanged asynchronous message
notifyLocationChanged callback
Own location changed
GPS abstraction invokes callback with new coordinates
Callback registered on GPS abstraction
Page 103
Qualitative Evaluation
27
Page 104
Qualitative Evaluation
27
Page 105
Qualitative Evaluation
27
Page 106
Qualitative Evaluation
27
Page 107
Qualitative Evaluation
27
Page 108
Qualitative Evaluation
27
def allNearbyOffers := ambientBehavior: TicketOffer @All(_timespan_);
allNearbyOffers.filter: { |offer| (offer.eventName == event).and: { (offer.price <= maxPrice).and: { GPSLocation.distanceTo(offer.location) <= maxDistance }}};
Page 109
Case Study: The Book Recommender Application in the Ambient Library
28
scannedrecommended
recommended in library
Page 110
Case Study: The Book Recommender Application in the Ambient Library
28
scannedrecommended
recommended in library
Page 111
Part IV: Network-Centric Ambient-Oriented Dataflow Programming
29
Page 112
Network-Centric Visual Dataflow Programming in AmbientTalk/RV
scannedrecommended
recommended in library
30
11
Page 113
Network-Centric Visual Dataflow Programming in AmbientTalk/RV
scannedrecommended
recommended in library
30
11BookRecommender ->
showBooks(books); showSimilarBooks(recommended); showRecommendationsInStock(recommendedInStock);
Shelf ->
deftype Book; def booksInstock := /.bridges.rfid.ReactiveRFIDService.scan(Book); similarBooks.filter: { |book| booksInStock.contains(book) };
recommendedInStock similarBooks
books
BookScanner ->
deftype Book; /.bridges.rfid.ReactiveRFIDService.scan(Book);
recommended
scannedBooks
EBookReader ->
scannedBooks.map: { |book| generateSimilarBooks(book) };
1
1
1
1
1
*
1
1
Page 114
Deploying an AmbientTalk/R Dataflow ProgramV
def BookRecommenderApp := extend: OperatorHostInterface with: { def showBooks(books) { ... }; def showSimilarBooks(books) { ... }; def showRecommendationsInStock(books) { ... };};
deftype BookRecommender;export: BookRecommenderApp as: BookRecommender;
AmbientTalk/R VM
JVM
31
BookRecommender ->
showBooks(books); showSimilarBooks(recommended); showRecommendationsInStock(recommendedInStock);
Page 115
Dataflow Dependencies
Rebinding dataflow dependency
Fixed dataflow dependency
32
BookScanner ->
deftype Book; /.bridges.rfid.ReactiveRFIDService.scan(Book);
1
1
BookRecommender ->
showBooks(books); showSimilarBooks(recommended); showRecommendationsInStock(recommendedInStock);
books
1
EBookReader ->
scannedBooks.map: { |book| generateSimilarBooks(book) };
Shelf ->
deftype Book; def booksInstock := /.bridges.rfid.ReactiveRFIDService.scan(Book); similarBooks.filter: { |book| booksInStock.contains(book) };
*
similarBooks
Page 116
Dependency Arities
33
1
BookRecommender ->
showBooks(books); showSimilarBooks(recommended); showRecommendationsInStock(recommendedInStock);
1
*
EBookReader ->
scannedBooks.map: { |book| generateSimilarBooks(book) };
1recommendedInStock similarBooks
Shelf ->
deftype Book; def booksInstock := /.bridges.rfid.ReactiveRFIDService.scan(Book); similarBooks.filter: { |book| booksInStock.contains(book) };
Page 117
Dependency Arities
33
*
BookRecommender ->
showBooks(books); showSimilarBooks(recommended); showRecommendationsInStock(recommendedInStock);
1
*
EBookReader ->
scannedBooks.map: { |book| generateSimilarBooks(book) };
1recommendedInStock similarBooks
Shelf ->
deftype Book; def booksInstock := /.bridges.rfid.ReactiveRFIDService.scan(Book); similarBooks.filter: { |book| booksInStock.contains(book) };
Page 118
Dependency Semantics
Incoming 1 Incoming *
Outgoing 1Signal one value to a
single (rebound or fixed) node
Signal one value to all reachable nodes of same
role
Outgoing *Signal set of values to a single (rebound or fixed)
node
Signal set of values to all reachable nodes of same
role
Binding semantics Arity semantics34
Page 119
Part V: Conclusion
35
Page 120
Limitations and Avenues for Future Research
• Event-loop based architecture prevents RFID events to be processed in parallel.
• Security was not considered. For RFID it requires revising the technology stack down to the hardware level.
• No distributed glitch prevention. It requires consistent distributed message ordering.
• AmbientTalk/R needs more tooling (e.g. visual scalability, syntax for content-based subscriptions...).
V
36
Page 121
Summarizing the Contributions
1. Addressing physical objects
2. Storing application-specific data on RFID tags
3. Reactivity to appearing and disappearing objects
4. Asynchronous, fault-tolerant communication
5. Data consistency
6. Infrastructureless operation
37
Page 122
Summarizing the Contributions
1. Addressing physical objects
2. Storing application-specific data on RFID tags
3. Reactivity to appearing and disappearing objects
4. Asynchronous, fault-tolerant communication
5. Data consistency
6. Infrastructureless operation
Ambi
ent-O
rient
ed P
rogr
amm
ing
with
Pas
sive
RFID
37
Page 123
Summarizing the Contributions
1. Addressing physical objects
2. Storing application-specific data on RFID tags
3. Reactivity to appearing and disappearing objects
4. Asynchronous, fault-tolerant communication
5. Data consistency
6. Infrastructureless operation
Ambi
ent-O
rient
ed P
rogr
amm
ing
with
Pas
sive
RFID
37
Decoupling in space
Decoupling in time
Decoupling in arity
Page 124
Summarizing the Contributions
1. Addressing physical objects
2. Storing application-specific data on RFID tags
3. Reactivity to appearing and disappearing objects
4. Asynchronous, fault-tolerant communication
5. Data consistency
6. Infrastructureless operation
No inversion of control
Ambi
ent-O
rient
ed P
rogr
amm
ing
with
Pas
sive
RFID
37
Decoupling in space
Decoupling in time
Decoupling in arity
Page 125
Summarizing the Contributions
1. Addressing physical objects
2. Storing application-specific data on RFID tags
3. Reactivity to appearing and disappearing objects
4. Asynchronous, fault-tolerant communication
5. Data consistency
6. Infrastructureless operation
No inversion of control
Ambi
ent-O
rient
ed P
rogr
amm
ing
with
Pas
sive
RFID
37
Decoupling in space
Decoupling in time
Decoupling in arity Publish/subscribe + dataflow programming = ambient-oriented dataflow
Page 126
Summarizing the Contributions
1. Addressing physical objects
2. Storing application-specific data on RFID tags
3. Reactivity to appearing and disappearing objects
4. Asynchronous, fault-tolerant communication
5. Data consistency
6. Infrastructureless operation
Ambi
ent-O
rient
ed P
rogr
amm
ing
with
Pas
sive
RFID
37
Decoupling in space
Decoupling in time
Decoupling in arity
Rich representation of events
No inversion of control
Page 127
Summarizing the Contributions
1. Addressing physical objects
2. Storing application-specific data on RFID tags
3. Reactivity to appearing and disappearing objects
4. Asynchronous, fault-tolerant communication
5. Data consistency
6. Infrastructureless operation
Ambi
ent-O
rient
ed P
rogr
amm
ing
with
Pas
sive
RFID
37
Global control flow management
Decoupling in space
Decoupling in time
Decoupling in arity
Rich representation of events
No inversion of control
Page 128
Summarizing the Contributions
1. Addressing physical objects
2. Storing application-specific data on RFID tags
3. Reactivity to appearing and disappearing objects
4. Asynchronous, fault-tolerant communication
5. Data consistency
6. Infrastructureless operation
Ambi
ent-O
rient
ed P
rogr
amm
ing
with
Pas
sive
RFID
37
Decoupling in space
Decoupling in time
Decoupling in arity
Rich representation of events
No inversion of control
Global control flow management
Page 129
Why Ambient-Oriented Language Abstractions?38
Page 130
Why Ambient-Oriented Language Abstractions?39
Page 131
Why Ambient-Oriented Language Abstractions?40
Page 132
Why Ambient-Oriented Language Abstractions?41