Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Managing the Object Soup in Ambient-Oriented Applications

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

More Decks by Nick De Cooman

Other Decks in Programming

Transcript

  1. 2 Life More and More Mobile Mobile ad hoc networks

    No shared infrastructure Volatile connections Dynamic network topology
  2. 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.
  3. 7 Aliasing Behavioral Protocol actor actor uponBindingLocalAlias uponLocalAliasing uponRemoteAliasing uponBindingRemoteAlias

    uponDefiningPrincipal Protocol A Receiving remote reference = acquiring remote reference + resolving remote reference C D
  4. Ownership Type Tags 12 Out of the box aliasing strategies

    Aliasing behavioral protocol + Chameleon objects LOCAL READONLY UNIQUE
  5. 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
  6. 14 ReadOnly Ownership Type Tag Bob Alice local object only

    read messages remote client object READONLY
  7. 15 Unique Ownership Type Tag Waiting Released Expired Acquired Eve

    Bob Alice UNIQUE remote client object acquired waiting expired
  8. 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
  9. 18 Research Training Promoter Prof. Dr. Wolfgang De Meuter Elisa

    Gonzalez Boix - Christophe Scholliers Advisors
  10. 18 Research Training Promoter Prof. Dr. Wolfgang De Meuter Elisa

    Gonzalez Boix - Christophe Scholliers Advisors http://sites.google.com/site/nickdecooman
  11. 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
  12. 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: { ... };