research:ambientrefs
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
research:ambientrefs [2006/07/11 20:58] – added tvcutsem | research:ambientrefs [2010/09/13 15:13] (current) – fixed tvcutsem | ||
---|---|---|---|
Line 1: | Line 1: | ||
===== Ambient References ===== | ===== Ambient References ===== | ||
+ | [[http:// | ||
{{ ambientrefs.jpg }} | {{ ambientrefs.jpg }} | ||
- | Ambient references are a novel remote object | + | Ambient references are a novel type of remote object |
+ | Remote object references are " | ||
- | == Motivation == | + | === Motivation |
One may wonder why new referencing abstractions are required for mobile networks. In order to motivate the need for new referencing abstractions at the language level, we list a number of desirable properties of remote references for mobile networks which current remote referencing abstractions do not offer: | One may wonder why new referencing abstractions are required for mobile networks. In order to motivate the need for new referencing abstractions at the language level, we list a number of desirable properties of remote references for mobile networks which current remote referencing abstractions do not offer: | ||
- | - **Provisional References**: remote references should be able to point to remote objects which are "not yet available" | + | - **Intensional Naming**: in mobile networks, one does not always know the identity or the exact number of the services one requires. Hence, rather than having to // |
- | - **Resilience to Partial Failure**: remote references for mobile networks should be able to tolerate network disconnections because of the volatile connnections hardware phenomenon of mobile | + | - **Resilience to Partial Failure**: remote references for mobile networks should be able to tolerate network disconnections because |
- | - **Transitory Addressing**: remote references in mobile networks should bind to (point to) objects based on what services that object provides, rather than based on a low-level UID, object-id, IP address or MAC address. Such low-level IDs preclude the reference from reconfiguring itself by rebinding to a different object providing the same or equally matching services. | + | - **Roaming**: remote references in mobile networks should bind to (point to) objects based on what services that object provides, rather than based on a low-level UID, object-id, IP address or MAC address. Such low-level IDs preclude the reference from reconfiguring itself by rebinding to a different object providing the same or equally matching services. In other words, we want object references for MANETs to integrally support roaming by being able to opportunistically bind to whatever proximate matching service is available, regardless of its identity. |
- | - **Group Communication**: in mobile networks, one often wants to communicate with an entire group of objects. To this end, remote references should be introduced that automatically | + | - **Broadcasting**: in mobile networks, one often wants to communicate with an entire group of proximate |
- | == Design == | + | === Design |
- | Ambient references | + | Ambient references |
- | When the service object to which an ambient reference is bound moves out of communication range, the ambient reference can become unbound again. It becomes a dangling pointer anew and immediately becomes | + | Ambient references unify two concepts: they are both a peer-to-peer discovery channel |
- | === Describing | + | An ambient reference is initialized with a type tag: a network-wide name that describes a service known to the distributed peers. At any point in time, an ambient reference designates the set of proximate |
- | An ambient | + | <code javascript> |
+ | def printers := ambient: Printer; | ||
+ | </code> | ||
+ | |||
+ | The variable '' | ||
+ | It is possible to restrict the set of service objects which an ambient reference may designate even further, by using so-called filter queries. For example, suppose one only wants to send documents to a printer that supports a resolution greater than 400 dpi. This can be expressed as: | ||
<code javascript> | <code javascript> | ||
- | printer | + | def printers := ambient: Printer |
</ | </ | ||
- | The code excerpt above creates an ambient reference to an object providing the '' | + | == Message Passing Styles == |
- | The primary advantage of using such service types rather than e.g. name servers, IP addresses or URLs is, evidently, abstraction over the machine address of the host providing the services. Ambient references | + | An ambient reference |
- | === Communicating with services | + | === Point-to-point |
+ | Here is how to send a point-to-point message to any matching printer: | ||
+ | <code javascript> | ||
+ | printers< | ||
+ | </ | ||
- | Asynchronous messages may be sent to an ambient reference at any point in time. For example, in order to print a document on a nearby printer, the '' | + | The ''< |
+ | |||
+ | AmbientTalk/ | ||
<code javascript> | <code javascript> | ||
- | printer< | + | def answer := printers< |
+ | when: answer becomes: { |ack| | ||
+ | system.println(" | ||
+ | } | ||
</ | </ | ||
- | In this example code ''< | + | Ambient references seamlessly support roaming via point-to-point messaging: multiple messages sent to the same ambient reference |
- | One may wonder how return values can be acquired from such asynchronous message sends. | + | We will discuss later what happens if there are //no// matching '' |
+ | |||
+ | === One-to-many === | ||
+ | |||
+ | The following piece of code illustrates how to broadcast | ||
<code javascript> | <code javascript> | ||
- | answer | + | def peers := ambient: ChatPeer; |
- | when(answer) lambda(ok) -> { | + | ... |
- | if (ok) | + | peers<-receiveTextMessage("hello world")@All; |
- | print("document successfully transmitted"); | + | </code> |
+ | |||
+ | Note the use of the '' | ||
+ | |||
+ | Ambient references extend AmbientTalk/ | ||
+ | |||
+ | <code javascript> | ||
+ | def multifuture := peers< | ||
+ | whenEach: multifuture becomes: { |reply| | ||
+ | // process the reply | ||
} | } | ||
</ | </ | ||
- | == Example Usage == | + | The above block closure '' |
+ | |||
+ | == Disconnected Operation and Timeouts == | ||
+ | |||
+ | Ambient references have been designed for Mobile ad hoc networks in which transient network partitions are commonplace. Hence, ambient references support a form of message passing which is resilient to temporary network failures. | ||
+ | |||
+ | Any message sent to an ambient reference may be annotated with '' | ||
+ | |||
+ | When an ambient reference discovers a receiver for its buffered messages in the ad hoc network, the messages are forwarded to the receiver(s). At this point, the message' | ||
+ | |||
+ | <code javascript> | ||
+ | def reply := printers< | ||
+ | when: reply becomes: { |ack| | ||
+ | system.println(" | ||
+ | catch: TimeoutException using: { |e| | ||
+ | system.println(" | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | If there are no matching '' | ||
+ | |||
+ | == Conclusion == | ||
+ | |||
+ | What is important to recall is that an ambient reference is a remote object reference that allows programmers to // | ||
+ | |||
+ | === Further Reading === | ||
- | == Implementation == | + | * Ambient References: Object Designation in Mobile Ad Hoc Networks. Tom Van Cutsem. PhD Thesis, Vrije Universiteit Brussel, May 2008. [ [[http:// |
- | A detailed explanation of ambient references can be found in [[ftp://prog.vub.ac.be/tech_report/2006/ | + | * Object-oriented Coordination |
- | == Further Reading == | + | * Ambient References: Addressing Objects in Mobile Networks. Tom Van Cutsem, Jessie Dedecker, Stijn Mostinckx, Elisa Gonzalez Boix, Theo D' |
- | Ambient References: Addressing Objects in Mobile Networks. Tom Van Cutsem, Jessie Dedecker, Stijn Mostinckx, Elisa Gonzalez Boix, Theo D' | + | * Ambient References: Addressing Objects in Mobile Networks. Tom Van Cutsem, Jessie Dedecker, Stijn Mostinckx, Elisa Gonzalez Boix, Theo D' |
Also see the [[research: | Also see the [[research: |
research/ambientrefs.1152644297.txt.gz · Last modified: 2006/07/11 21:16 (external edit)