Cassandra framework a service oriented distributed multimedia
Distributed Reactive Programming Tools2010
1. Loosely-coupled Distributed Reactive
Programming in Mobile Ad Hoc Networks
Andoni Lombide Carreton, Stijn Mostinckx,
Tom Van Cutsem and Wolfgang De Meuter
Department of Computer Science
Vrije Universiteit Brussel
48th International Conference on Objects, Models, Components, Patterns -- TOOLS 2010
June 28 - July 2 2010
Malàga, Spain
Tuesday 29 June 2010
6. Pervasive Computing and Mobile Ad Hoc
Networks
Mobile devices
Intermittent connectivity
Tuesday 29 June 2010
7. Pervasive Computing and Mobile Ad Hoc
Networks
Mobile devices
Spontaneous interactions
Intermittent connectivity
Tuesday 29 June 2010
8. Pervasive Computing and Mobile Ad Hoc
Networks
Scarce infrastructure
Mobile devices
Spontaneous interactions
Intermittent connectivity
Tuesday 29 June 2010
9. Pervasive Computing and Mobile Ad Hoc
Networks
Scarce infrastructure
Mobile devices
Representation of physical objects
Spontaneous interactions
Intermittent connectivity
Tuesday 29 June 2010
10. Pervasive Computing and Mobile Ad Hoc
Networks
Representation of physical objects
Mobile devices
Spontaneous interactions
Distributed
Event-driven Architecture
Scarce infrastructure
Intermittent connectivity
Tuesday 29 June 2010
11. Pervasive Computing and Mobile Ad Hoc
Networks
Representation of physical objects
Mobile devices
Spontaneous interactions
overy
o c Disc
Ad H Distributed
Event-driven Architecture
Scarce infrastructure
Intermittent connectivity
Tuesday 29 June 2010
12. Pervasive Computing and Mobile Ad Hoc
Networks
Representation of physical objects
Mobile devices
Spontaneous interactions
overy
o c Disc
Ad H Distributed
Event-driven Architecture
Scarce infrastructure
ecent ralized
D Intermittent connectivity
Tuesday 29 June 2010
13. Pervasive Computing and Mobile Ad Hoc
Networks
Representation of physical objects
Mobile devices
Spontaneous interactions
overy
o c Disc
Ad H Distributed
Event-driven Architecture
Res
ilien
Scarce infrastructure t
ecent ralized
D Intermittent connectivity
Tuesday 29 June 2010
14. Pervasive Computing and Mobile Ad Hoc
Networks
Representation of physical objects
Mobile devices
Spontaneous interactions
Event streams
overy
o c Disc
Ad H Distributed
Event-driven Architecture
Res
ilien
Scarce infrastructure t
ecent ralized
D Intermittent connectivity
Tuesday 29 June 2010
15. Pervasive Computing and Mobile Ad Hoc
Networks
Representation of physical objects
Mobile devices
Event streams
Spontaneous interactions
as ting
ro adc
overy B
o c Disc
Ad H Distributed
Event-driven Architecture
Res
ilien
Scarce infrastructure t
ecent ralized
D Intermittent connectivity
Tuesday 29 June 2010
16. Distributed Event-driven Architecture
• Spontaneous discovery of nearby peers
and their ticket offers
• Disconnection/reconnection
• Location of interesting peers changed
• Own location changed
• Price of interesting ticket offers changed
Tuesday 29 June 2010
25. Publishing & discovering objects by topic
ticketVendor
deftype TicketVendor deftype TicketVendor
Tuesday 29 June 2010
26. Publishing & discovering objects by topic
ticketVendor
deftype TicketVendor deftype TicketVendor
export: ticketVendor as: TicketVendor
Tuesday 29 June 2010
27. Publishing & discovering objects by topic
ticketVendor
deftype TicketVendor deftype TicketVendor
export: ticketVendor as: TicketVendor
whenever: TicketVendor discovered: { |ticketVendor|
// React on ticketVendor appearance
when: ticketVendor disconnected: {
// React on disappearance
}
when: ticketVendor reconnected: {
// React on reappearance
}}
Tuesday 29 June 2010
28. Publishing & discovering objects by topic
ticketVendor
deftype TicketVendor deftype TicketVendor
export: ticketVendor as: TicketVendor
whenever: TicketVendor discovered: { |ticketVendor|
// React on ticketVendor appearance
when: ticketVendor disconnected: {
// React on disappearance
}
when: ticketVendor reconnected: {
// React on reappearance
}}
Tuesday 29 June 2010
29. Publishing & discovering objects by topic
ticketVendor
deftype TicketVendor deftype TicketVendor
export: ticketVendor as: TicketVendor
whenever: TicketVendor discovered: { |ticketVendor|
// React on ticketVendor appearance
covery
when: ticketVendor disconnected: {
// React on disappearance
Ad H oc Dis
}
when: ticketVendor reconnected: {
// React on reappearance
}}
Tuesday 29 June 2010
30. Publishing & discovering objects by topic
ticketVendor
deftype TicketVendor deftype TicketVendor
export: ticketVendor as: TicketVendor
whenever: TicketVendor discovered: { |ticketVendor|
// React on ticketVendor appearance
covery
when: ticketVendor disconnected: {
// React on disappearance
Ad H oc Dis
}
when: ticketVendor reconnected: { alized
// React on reappearance D ecentr
}}
Tuesday 29 June 2010
31. Asynchronous communication
getLocation
ticketVendor
when: TicketVendor discovered: { |ticketVendor|
when: ticketVendor<-getLocation()@Due(timeout) becomes: { |loc|
// Update user interface with the location
} catch: TimeoutException using: { |e|
// Remove ticket offer from user interface
}
}
Tuesday 29 June 2010
32. Asynchronous communication
getLocation
ticketVendor
when: TicketVendor discovered: { |ticketVendor|
when: ticketVendor<-getLocation()@Due(timeout) becomes: { |loc|
// Update user interface with the location
} catch: TimeoutException using: { |e|
// Remove ticket offer from user interface
}
}
Tuesday 29 June 2010
33. Asynchronous communication
getLocation
ticketVendor
when: TicketVendor discovered: { |ticketVendor|
when: ticketVendor<-getLocation()@Due(timeout) becomes: { |loc|
// Update user interface with the location
} catch: TimeoutException using: { |e|
// Remove ticket offer from user interface
}
}
Tuesday 29 June 2010
34. Asynchronous communication
ticketVendor
when: TicketVendor discovered: { |ticketVendor|
when: ticketVendor<-getLocation()@Due(timeout) becomes: { |loc|
// Update user interface with the location
} catch: TimeoutException using: { |e|
// Remove ticket offer from user interface
}
}
Tuesday 29 June 2010
35. Asynchronous communication
ticketVendor
when: TicketVendor discovered: { |ticketVendor|
when: ticketVendor<-getLocation()@Due(timeout) becomes: { |loc|
// Update user interface with the location
} catch: TimeoutException using: { |e|
// Remove ticket offer from user interface
}
}
Tuesday 29 June 2010
36. Asynchronous communication
ticketVendor
when: TicketVendor discovered: { |ticketVendor|
when: ticketVendor<-getLocation()@Due(timeout) becomes: { |loc|
// Update user interface with the location
} catch: TimeoutException using: { |e|
// Remove ticket offer from user interface
}
}
Tuesday 29 June 2010
37. Asynchronous communication
ticketVendor
Res
ilien
t
when: TicketVendor discovered: { |ticketVendor|
when: ticketVendor<-getLocation()@Due(timeout) becomes: { |loc|
// Update user interface with the location
} catch: TimeoutException using: { |e|
// Remove ticket offer from user interface
}
}
Tuesday 29 June 2010
38. Ambient References
ting
werchterVendors
as
ro adc
B
def werchterVendors := ambient: TicketVendor where: { |tv|
tv.event == “Rock Werchter”
};
whenAll: werchterVendors<-getLocation()@Expires(5.seconds)
becomes: { |locations|
// Update the map GUI with the locations
}
Tuesday 29 June 2010
39. Ambient References
ting
werchterVendors
as
ro adc
B
def werchterVendors := ambient: TicketVendor where: { |tv|
tv.event == “Rock Werchter”
};
whenAll: werchterVendors<-getLocation()@Expires(5.seconds)
becomes: { |locations|
// Update the map GUI with the locations
}
Tuesday 29 June 2010
40. AmbientTalk/R
gui.centerOn(GPS_Location.latitude, GPS_Location.longitude);
GPS_Location
_.latitude _.longitude
latitude longitude
gui.centerOn(_, _)
Tuesday 29 June 2010
41. AmbientTalk/R
gui.centerOn(GPS_Location.latitude, GPS_Location.longitude);
GPS_Location
_.latitude _.longitude
latitude longitude
gui.centerOn(_, _)
Tuesday 29 June 2010
42. AmbientTalk/R
gui.centerOn(GPS_Location.latitude, GPS_Location.longitude);
GPS_Location
_.latitude _.longitude
latitude longitude
gui.centerOn(_, _)
Tuesday 29 June 2010
58. Limitations and Future Work
• AmbientTalk/R yields a higher computational overhead than plain
AmbientTalk.
• Event message order preservation not guaranteed on very fine-grained levels
over different communication partners.
• No real-time guarantees.
• Event consumers can only create and cancel their distributed dependencies:
they cannot limit the number of propagated events.
Tuesday 29 June 2010
59. Conclusion
• Decentralized publish/subscribe architecture based on UDP broadcasting
allows spontaneous and loosely-coupled group interactions.
• Reactive interpreter allows reacting to and processing of events without
relying on “callback-spaghetti”.
• Ambient behaviors and reactive queries reconcile both programming styles.
• Event propagation happens with asynchronous messages among distributed
event loops: no concurrency issues and resilient to intermittent network
connectivity.
http://soft.vub.ac.be/soft/research/amopcop
Tuesday 29 June 2010