##CONTINUE##
Axum is an imperative language with a C#-like syntax. While it is aware of objects, classes cannot be defined, because the language is domain and actor-oriented instead of being object-oriented. Axum is not a general purpose language being targeted at solving concurrency tasks and is built upon Concurrency and Coordination Runtime (CCR) from Microsoft Robotics. The idea is to make calls to Axum code from other .NET languages when parallelism is necessary.
Shared state is considered the main roadblock for safe parallelism. To use shared state in Axum, one needs to declare he is using it and the runtime controls the serialization process of accessing data stored in it. Concurrency is built right in the language.
The main concept in Axum is the domain. A domain is a repository of resources, a collection of data, agents and functions. Domains are isolated from each other and offer protection of their respective data or shared state. The state can be shared by agents of the same domain. The functions of a domain are pure functions which do not keep state between calls. Inside of a domain, agents exchange messages with each other through channels. A schema is introduced to facilitate the communication between agents that have no relationships to each other, so they need some sort of metadata to be able to properly communicate.
An agent is basically a thread that can communicate with other agents and their access to the shared state is controlled by adding reader/writer declarations:
domain A {
int i;
int func(int k){}
writer agent X: Channel1 {}
reader agent Y: Channel2{}
}
domain B {
int j;
agent Z: Channel1 {}
}
Graphically, the communication between domain agents looks like this:

-----------------------------
BY Abel Avram
Source:InfoQ
InfoQ.com and all content copyright © 2006-2008 C4Media Inc.
0 comments:
Post a Comment