ambienttalk


An Object-oriented Event-driven Programming Language for Mobile Ad Hoc Networks

AmbientTalk is an experimental object-oriented distributed programming language developed at the Software Languages Lab at the Vrije Universiteit Brussel, Belgium. The language is primarily targeted at writing programs deployed in mobile ad hoc networks.

when: ChatService discovered: { |chatService| when: chatService<-login(roomID, username) becomes: { |chatRoom| chatRoom<-chat("hello world"); // async message send whenever: chatRoom disconnected: { system.println("you're offline"); }; whenever: chatRoom reconnected: { system.println("you're online again"); }; }; };

AmbientTalk is a research platform to experiment with new language features or programming abstractions to facilitate the construction of software that has to run in highly volatile networks exhibiting intermittent connectivity and little infrastructure.

The language's concurrency features are founded on the actor model and have been largely influenced by the E programming language. The language's object-oriented features find their influence in languages like Smalltalk (i.e. block closures, keyworded messages) and Self (prototype-based programming, delegation). Finally, the language has a functional core, inspired by Scheme and Pico.

AmbientTalk's main differences with mainstream languages are that: * It employs a purely event-driven concurrency framework, founded on actors. * It abandons the RPC abstraction in favor of asynchronous, non-blocking message passing. Because the system automatically buffers such messages while the receiver of the message is disconnected, the programmer can abstract from temporary network failures by default. * It uses futures (aka promises) to ease the construction of event-driven, asynchronous workflows. * It has built-in programming language constructs for objects to discover one another in the local ad hoc network. Peer-to-peer service discovery is built into the language. * It features a dynamic OO kernel language built upon the principles of prototype-based programming. The kernel language supports reflection using mirrors, which provide access to an extensive metaobject protocol, making the language extensible from within itself. * The language syntax derives primarily from the 'curly brace' family of languages, but it mixes in the keyworded messaging syntax from Smalltalk as well. This, together with AmbientTalk's lightweight block syntax, enables you to easily build your own control structures. * The current implementation of AmbientTalk embraces the JVM as a platform. It's easy for AmbientTalk programs to use Java libraries, and it's easy for Java objects to use AmbientTalk as an embedded scripting language. This interaction is safe: even when AmbientTalk objects are "exposed" to the JVM, JVM threads cannot violate the concurrency constraints of AmbientTalk's actor model.

Getting Started with AmbientTalk

http://ambienttalk.googlecode.com/svn/wiki/plugin/eclipseLogo.png' /> We recommend using our Eclipse plugin (IdeAT) which already contains the AmbientTalk interpreter. You can also http://code.google.com/p/ambienttalk/downloads/list'>download the AmbientTalk interpreter and use the http://soft.vub.ac.be/amop/downloads/at2textmate.zip'>TextMate bundle or http://soft.vub.ac.be/pipermail/ambienttalk/2010-July/000043.html'>Emacs mode.

http://ambienttalk.googlecode.com/svn/wiki/android/androidLogo.png' /> AmbientTalk runs on J2SE, J2ME under the connected device configuration (CDC), and Android 2.1 Platform. Our Android application for AmbientTalk is available on the Android Market, but you can also download it in http://code.google.com/p/ambienttalk/downloads/list'>the downloads section.

http://ambienttalk.googlecode.com/svn/wiki/helpIcon.jpg' />To get an overview of the features of the language, read about the EssenceOfAmbientTalk. A hands-on introduction to programming in AmbientTalk is provided in our http://soft.vub.ac.be/amop/at/tutorial/tutorial'>tutorial. An overview of the available primitives and libraries is available in the http://soft.vub.ac.be/amop/at/reference/reference'>language reference. Questions? Post them on the https://soft.vub.ac.be/mailman/listinfo/ambienttalk'>ambienttalk mailing list.

http://ambienttalk.googlecode.com/svn/wiki/researchIcon.png' />AmbientTalk is actively used as a research tool: it is extended with new language features, either dedicated to further facilitate the development of software for ad hoc networks, or to explore the suitability of the language in new domains. Examples of such features include:

  • Ambient references supporting different anycast and multicast messaging strategies
  • Reactive programming
  • Tuple space-based abstractions
  • Leasing to clean up resources
  • Interacting with RFID tags as plain software objects
  • virtual network layers and inter-network communication
  • ...

AmbientTalk screencast

In this screencast on the AmbientTalk programming language, we show how to implement a simple echo service for mobile ad hoc networks. We introduce AmbientTalk's support for peer-to-peer service discovery, asynchronous messages, futures and how remote object references are resilient to network failures by default.

http://www.youtube.com/watch?feature=player_embedded&v=4uCb218Cw64' target='_blank'>http://img.youtube.com/vi/4uCb218Cw64/0.jpg' width='425' height=344 />