10

I read this story on slashdot today where they announce a new parallel programming language by Microsoft.

What is this new programming language about? It says Parallel Programming. But is it going to be an alternative/replacement for MPI, PVM, OpenMP and similar parallel libraries/frameworks?

Any thoughts?

4

4 回答 4

9

Axum is a language structured in such a way as to make safe and performant concurrent programming simpler. The concepts modelled by the language avoid the need to make thread synchronisation explicit via the use of lock (in C#), Monitor, ReaderWriterLockSlim, etc...

It could be argued that many of the ideas within Axum have been in the Erlang programming language since 1986 -- a language designed by researchers working in Sweden for Ericsson to run on telephone switches, and hence support for massive throughput under highly concurrent load was so essential it was designed into the language. Whilst many of the ideas in Axum aren't new, they are certainly new to .NET and the CLR (at least at the language level.)

Existing .NET libraries that contain some of these ideas are:

Like Erlang, message passing is a central concept in Axum. Like Erlang, Axum is largely indifferent as to whether the recipient of the message is located in-process or remotely. Axum currently provides integration with WCF.

Axum differs from the libraries mentioned above in that it includes support for these concepts at the language level, not just via use of libraries. The Axum compiler deals not only with the Axum language, but also with some experimental extensions to the C# language itself; namely the isolated and readonly keywords.

Adding new features to a language is not something to be taken lightly. Spec# is another C#-superset language developed at MSR (unrelated to concurrency). As seen with the support for Code Contracts in .NET 4.0, Microsoft has decided to favour adding a new API rather than new language extensions (this benefits users of all languages on the CLR.) However in the case of Axum, there is not enough richness in the C# 3.0 language to express the kinds of immutability constraints required of types and their members for truly safe concurrent programming.

Having dabbled in Erlang and liking what I saw, I'm very excited about where Axum might take us. Some of the extensions to the C# language proposed by the team are useful for regular C# projects too.

Finally I'd like to point out that there's more to Erlang than just a good concurrency model. Erlang is a strict functional programming language. It supports hot swappable code, meaning that a system can be upgraded without it ever being stopped (a desirable feature of a telephone switch or any other 24x7 system). I heard a report from a large British telecommunications organisation running a switch for a year and only failing to route four calls in that time. Erlang has other characteristics such as remote exception handling as well.

于 2009-09-11T07:05:33.143 回答
5

Looks to me like you hit the nail on the head in your question. Looks like the Microsoft.NET alternative to some of the languages/frameworks you mentioned. Take a look at the Programmer's Guide here:

Axum Programmer's Guide

Looks like it should play nicely with the rest of the .NET Framework. It might open up some interesting C#/F#/Axum interactions...

于 2009-05-12T02:38:31.847 回答
4

Axum is the new name for Microsoft's "Maestro" language, which originally was a research language for parallel programming but has been "promoted" to a first-class language just recently.

A bit more information on Channel 9 here:

Maestro: A Managed Domain Specific Language For Concurrent Programming

... and on the official Axum team blog.

于 2009-05-12T02:42:25.693 回答
1

Here's an update on the state of Axum. Apparrently some of the concurrency features will no longer be part of C#/VB.Net.

...the concepts around safe parallelism and agent-based programming were seen by many as too far outside the mainstream to be adopted now in languages like C# and VB. The idea of Axum was to not force these concepts on general-purpose languages, so those of us who have work on Axum are not surprised.

于 2013-04-01T18:38:33.367 回答