14 May 2009
Axum programming language
Microsoft’s Axum Programming Language is an experimental programming language for parallel programming that lets programmers arrange coordination between components in a way that is close to their natural conception of the solution.
Axum is based on the principles of isolation, actors, and message-passing to increase application safety, responsiveness, scalability, and developer productivity. Other advanced concepts that are explored in Axum are data flow networks, asynchronous methods, and type annotations for taming side-effects. The Axum Programmmers Guide is now available, along with the Axum Language Specficiation.
In the Axum Programming Language, there are two distinct approaches to orchestration: control-flow-based and data-flow-based orchestration. Unlike control-flow logic that is based on conditional statements, loops, and method calls, data-flow networks base their logic on forwarding, filtering, broadcasting, load-balancing, and joining messages that pass through the network. This comes close to the principles of interactive computation, which I tried to describe earlier: data-flow, sink, source, channel, wave, modulation, ..
A recent article argues that we have not, in general, designed our applications and programming languages to express parallelism. Are Erlang or Axum an answer? If I take a look at this Ping Pong example, the Erlang code looks shorter and better. I am curious which language will help make parallel programming safer, more scalable, and more productive..
Take a look at Parallel C# language. Here is how Ping Pong example looks like in this lang:
using System;
public class PingPong {
movable Ping( (string) => async ping, () => string pong ) {
for ( int i = 0; i async pong, () => string ping ) {
for ( int i = 0; i < 100; i++ ) {
Console.WriteLine( ping() );
pong("pong");
}
}
string Receive() & async Send(string a) { return a; }
public static void Main( string[] args ) {
PingPong pp = new PingPong();
pp.Ping( pp.Send, pp.Receive );
pp.Pong( pp.Send, pp.Receive );
Console.ReadLine();
}
}
It's taken from official distribs, should work in distributed mode as well, but I haven't tested it yet…
Dan
November 1st, 2009 at 5:01 pmpermalink