Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Managing the Object Soup in Ambient-Oriented Applications
Search
Nick De Cooman
September 07, 2012
Programming
0
570
Managing the Object Soup in Ambient-Oriented Applications
This deck summarizes my master's thesis and was presented at the final defense in September 2012.
Nick De Cooman
September 07, 2012
Tweet
Share
More Decks by Nick De Cooman
See All by Nick De Cooman
Serverless Architecture
ndecooma
1
34
React Native: Modern web techniques for mobile
ndecooma
0
230
Sigfox — A cellular networks, just for things
ndecooma
0
360
An Introduction to Unclouded.io
ndecooma
0
310
AmbiScrabble Game for the iPhone
ndecooma
0
220
What My Master Thesis is About
ndecooma
1
180
Other Decks in Programming
See All in Programming
敵対的ポイフル
futabato
0
130
AppRouter Panel Talk
yosuke_furukawa
PRO
1
460
Amazon SQSコンシューマー疎結合への旅 - 出張! #DevelopersIO IT技術ブログの中の人が語る勉強会 #3
quiver
0
300
Domain-Driven Transformation
hschwentner
2
1.5k
Ruby Function Composition
bkuhlmann
1
340
CA.swift19 恋するAIアプリ開発の裏側
oskmr
0
380
if constexpr文はテンプレート世界のラムダ式である
faithandbrave
3
670
Goのmultiple errorsについて (2024年4月版)
syumai
4
1.2k
SwiftUIで使いやすいToastの作り方 / How to build a Toast system which is easy to use in SwiftUI
lovee
3
170
try! Swift Tokyo 2024 参加報告 / try! Swift Tokyo 2024 Report
hironytic
0
220
Code Reviews
bkuhlmann
4
900
Try creating your own orderedmap
kazamori
1
180
Featured
See All Featured
The Straight Up "How To Draw Better" Workshop
denniskardys
228
130k
Unsuck your backbone
ammeep
663
57k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
26
2.3k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
21
1.9k
The Pragmatic Product Professional
lauravandoore
26
5.8k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
188
16k
Reflections from 52 weeks, 52 projects
jeffersonlam
345
19k
The Mythical Team-Month
searls
216
42k
Building Better People: How to give real-time feedback that sticks.
wjessup
356
18k
Put a Button on it: Removing Barriers to Going Fast.
kastner
58
3.1k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
323
20k
Become a Pro
speakerdeck
PRO
13
4.6k
Transcript
MANAGING THE OBJECT SOUP IN AMBIENT-ORIENTED APPLICATIONS NICK DE COOMAN
2 Life More and More Mobile Mobile ad hoc networks
No shared infrastructure Volatile connections Dynamic network topology
3 WeScribble
3 WeScribble
3 WeScribble
4 Functional Requirements for WeScribble 1 2 Remote drawers can
only read the properties of a shape, not change it. A shape can be temporary owned by one drawer at a time and this only for a limited duration.
5 In this Thesis... We propose software abstractions to organize
the object reference soup
5 In this Thesis... We propose software abstractions to organize
the object reference soup
6 Aliasing Behavioral Protocol actor actor
6 Aliasing Behavioral Protocol actor actor def a := object:
{ ... }
6 Aliasing Behavioral Protocol actor actor uponDefiningPrincipal Protocol def a
:= object: { ... }
6 Aliasing Behavioral Protocol actor actor uponDefiningPrincipal Protocol def a
:= object: { ... }
6 Aliasing Behavioral Protocol actor actor uponDefiningPrincipal Protocol A
6 Aliasing Behavioral Protocol actor actor uponDefiningPrincipal Protocol A def
b := a
6 Aliasing Behavioral Protocol actor actor uponBindingLocalAlias uponDefiningPrincipal Protocol A
def b := a
6 Aliasing Behavioral Protocol actor actor uponBindingLocalAlias uponDefiningPrincipal Protocol A
B
6 Aliasing Behavioral Protocol actor actor uponBindingLocalAlias uponDefiningPrincipal Protocol A
B def addShape(arg){...}; addShape(a)
6 Aliasing Behavioral Protocol actor actor uponBindingLocalAlias uponLocalAliasing uponDefiningPrincipal Protocol
A B def addShape(arg){...}; addShape(a)
6 Aliasing Behavioral Protocol actor actor uponBindingLocalAlias uponLocalAliasing uponDefiningPrincipal Protocol
A B ARG
7 Aliasing Behavioral Protocol actor actor uponBindingLocalAlias uponLocalAliasing uponDefiningPrincipal Protocol
A B ARG
7 Aliasing Behavioral Protocol actor actor uponBindingLocalAlias uponLocalAliasing uponDefiningPrincipal Protocol
A
7 Aliasing Behavioral Protocol actor actor uponBindingLocalAlias uponLocalAliasing uponDefiningPrincipal Protocol
A when: ServiceTag discovered: { |c| ... } remote reference acquired C
7 Aliasing Behavioral Protocol actor actor uponBindingLocalAlias uponLocalAliasing uponDefiningPrincipal Protocol
A when: ServiceTag discovered: { |c| ... } C
7 Aliasing Behavioral Protocol actor actor uponBindingLocalAlias uponLocalAliasing uponRemoteAliasing uponDefiningPrincipal
Protocol A when: ServiceTag discovered: { |c| ... } C
7 Aliasing Behavioral Protocol actor actor uponBindingLocalAlias uponLocalAliasing uponRemoteAliasing uponDefiningPrincipal
Protocol A when: ServiceTag discovered: { |c| ... } C
7 Aliasing Behavioral Protocol actor actor uponBindingLocalAlias uponLocalAliasing uponRemoteAliasing uponDefiningPrincipal
Protocol A C
7 Aliasing Behavioral Protocol actor actor uponBindingLocalAlias uponLocalAliasing uponRemoteAliasing uponDefiningPrincipal
Protocol A def d := c C D
7 Aliasing Behavioral Protocol actor actor uponBindingLocalAlias uponLocalAliasing uponRemoteAliasing uponBindingRemoteAlias
uponDefiningPrincipal Protocol A C D
7 Aliasing Behavioral Protocol actor actor uponBindingLocalAlias uponLocalAliasing uponRemoteAliasing uponBindingRemoteAlias
uponDefiningPrincipal Protocol A Receiving remote reference = acquiring remote reference + resolving remote reference C D
Aliasing Behavioral Protocol at Work 8 Distributed object graph inspector
Ownership Domains CASE STUDY 1 CASE STUDY 2
Typestate-oriented Programming 9 10 Aliasing behavioral protocol alone is insufficient
to organize the object soup
Chameleon Objects 10 Typestate-oriented programming for ambient-oriented applications remote reference
local reference transition()
Chameleon Objects 10 Typestate-oriented programming for ambient-oriented applications remote reference
local reference transition()
Chameleon Objects Typestate-oriented programming for ambient-oriented applications remote reference local
reference 11 transition()
Ownership Type Tags 12 Out of the box aliasing strategies
Aliasing behavioral protocol + Chameleon objects LOCAL READONLY UNIQUE
13 Local Ownership Type Tag Bob Alice local object ✕
messages disallowed remote client object def raiseError := { raise: XIllegalOperation.new("Cannot expose remote alias") }; def uponRemoteAliasing(localProxy, aliasReceiver, remoteAlias){ raiseError() }; def uponBindingRemoteAlias(localProxy, aliasReceiver, fieldObj, remoteAlias){ raiseError() }; LOCAL
14 ReadOnly Ownership Type Tag Bob Alice local object only
read messages remote client object READONLY
15 Unique Ownership Type Tag Waiting Released Expired Acquired Eve
Bob Alice UNIQUE remote client object acquired waiting expired
16 WeScribble def makeShape(color, position, size){ def shape := object:
{ def getShapeData(){ [position, color, size] }; def changeColor(newColor){ color := newColor }; def reposition(newPosition){ position := newPosition }; def becomeTemporaryOwner(){ temporaryOwned }; def remove(){ ... }; } taggedAs: [ReadOnly]; def temporaryOwned := object: { def changeColor(newColor){ shape.changeColor(newColor) }; def reposition(newPosition){ shape.reposition(newPosition); } } taggedAs: [Unique]; export: shape as: ShapeObj; shape } READONLY SHAPE shape temporaryOwned UNIQUE
17 Conclusion LOCAL READONLY UNIQUE Ownership Type Tags Chameleon Objects
Aliasing Behavioral Protocol
18 Research Training Promoter Prof. Dr. Wolfgang De Meuter Elisa
Gonzalez Boix - Christophe Scholliers Advisors
18 Research Training Promoter Prof. Dr. Wolfgang De Meuter Elisa
Gonzalez Boix - Christophe Scholliers Advisors http://sites.google.com/site/nickdecooman
19 Related Work
19 Related Work Alias Detection
19 Related Work Alias Advertisement
19 Related Work Alias Prevention
19 Related Work Alias Control
Typechecking Chameleon Objects 20 def obj := chameleonObject: { |
install | def state1 := object: { def change(){ toState2() }; def foo(){ n()+2 }; }; def state2 := object: { def change(a){ foobar(bar(a)) }; def bar(b){ 9 }; }; def foobar(z){ toState1(z) }; def toState1(a){ install(state1) }; def toState2(){ install(state2) }; def n(){ 22 }; toState1(n()) }; obj.foo(); obj.change(); obj.bar(7); obj.change(33); state2 state1 change change BODY toState2 foobar toState1
Dynamically Tagged Objects 21 Chameleon object should obtain type tags
of the current state def obj := dynamicallyTaggedObject: { ... }; tag: obj as: [TypeTag1, TypeTag2]; when: obj isTaggedAs: TypeTag1 do: { ... };
22 Conclusion LOCAL READONLY UNIQUE Ownership Type Tags Chameleon Objects
Aliasing Behavioral Protocol