This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
research:ambientrefs [2008/09/08 10:26] tvcutsem * |
research:ambientrefs [2010/09/13 15:13] tvcutsem fixed |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ===== Ambient References ===== | ||
- | [[http:// | ||
- | {{ ambientrefs.jpg }} | ||
- | |||
- | Ambient references are a novel type of remote object references. | ||
- | Remote object references are " | ||
- | |||
- | === 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: | ||
- | |||
- | - **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 transient network partitions are more commonplace in these types of networks. | ||
- | - **Roaming**: | ||
- | - **Broadcasting**: | ||
- | |||
- | === Design === | ||
- | |||
- | Ambient references have undergone several design iterations. We summarize here the latest design in AmbientTalk/ | ||
- | |||
- | Ambient references unify two concepts: they are both a peer-to-peer discovery channel //and// an asynchronous communication channel to a remote object. In AmbientTalk/ | ||
- | |||
- | 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 services whose type matches its type tag. For example: | ||
- | |||
- | <code javascript> | ||
- | def printers := ambient: Printer; | ||
- | </ | ||
- | |||
- | 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> | ||
- | def printers := ambient: Printer where: { |p| p.dpi > 400 }; | ||
- | </ | ||
- | |||
- | == Message Passing Styles == | ||
- | |||
- | An ambient reference can be used in two modes: as a point-to-point communication channel to //any// object in its designated set, or as a one-to-many communication channel to //all// objects in its designated set. | ||
- | |||
- | === Point-to-point === | ||
- | Here is how to send a point-to-point message to any matching printer: | ||
- | <code javascript> | ||
- | printers< | ||
- | </ | ||
- | |||
- | The ''< | ||
- | |||
- | AmbientTalk/ | ||
- | |||
- | <code javascript> | ||
- | def answer := printers< | ||
- | when: answer becomes: { |ack| | ||
- | system.println(" | ||
- | } | ||
- | </ | ||
- | |||
- | Ambient references seamlessly support roaming via point-to-point messaging: multiple messages sent to the same ambient reference may be delivered to // | ||
- | |||
- | We will discuss later what happens if there are //no// matching '' | ||
- | |||
- | === One-to-many === | ||
- | |||
- | The following piece of code illustrates how to broadcast a '' | ||
- | |||
- | <code javascript> | ||
- | def peers := ambient: ChatPeer; | ||
- | ... | ||
- | peers< | ||
- | </ | ||
- | |||
- | Note the use of the '' | ||
- | |||
- | Ambient references extend AmbientTalk/ | ||
- | |||
- | <code javascript> | ||
- | def multifuture := peers< | ||
- | whenEach: multifuture becomes: { |reply| | ||
- | // process the reply | ||
- | } | ||
- | </ | ||
- | |||
- | 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 === | ||
- | |||
- | * Ambient References: Object Designation in Mobile Ad Hoc Networks. Tom Van Cutsem. PhD Thesis, Vrije Universiteit Brussel, May 2008. [ [[http:// | ||
- | * Object-oriented Coordination in Mobile Ad Hoc Networks. Tom Van Cutsem, Jessie Dedecker, Wolfgang De Meuter. In // | ||
- | |||
- | * 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: |