Building Parallel Applications using Axum
Earlier today, we made available on MSDN DevLabs a .NET language for building parallel applications – Axum.
Axum enables developers to easily build scalable and reliable applications for multi-core and many-core scenarios using the power and convenience of the .NET Framework. Axum makes use of several concepts to enable safe parallel programming:
· Domains isolate state, which helps you avoid implicit dependencies in your code that can result in difficult-to-find concurrency bugs. Domains make you more productive by allowing you to worry less about concurrency and focus more on your algorithms and code.
· Agents are threads of control that process messages asynchronously to stay scalable and responsive. Axum employs a cooperative blocking model that utilizes latencies to do meaningful work; agents that wish to receive a message will block, allowing another agent to execute in its place.
· Message-passing isn’t always feasible – in certain situations it just implies too much overhead. With Axum, you have the option to declaratively state how an agent intends to use domain state. The compiler will enforce that agents uphold their stated intentions and the runtime will schedule your agents accordingly to maintain safety.
· In Axum, concurrency is the default. All agents execute concurrently unless you explicitly restrict them. This means you spend less time on boiler plate code for multi-threading and more time on your code.
· Agents can be hosted in a single process, in a separate process, or on a separate machine. This unified programming model means you don’t need to rewrite your code when you want to run it in a distributed scenario.