MulticoreInfo.com header image 2

Swarm: A true distributed programming language

April 15th, 2010 · 1 Comment




by Ian Clarke
Fundamentals

The fundamental concept behind Swarm is that we should “move the computation, not the data”. The Swarm prototype is a simple stack-based language, akin to a primitive version of the Java bytecode interpreter. This article provides the proof of concept to be quick to implement, while demonstrating that the concept could work for a popular runtime like the JVM or Microsoft’s CLR.

The Prototype

The prototype is implemented in Scala, and snippets of Scala code are used below, but a knowledge of Scala won’t be required to understand the rest of this article. Scala is chosen because because its rich semantics tends to make coding easier and faster than Java.

As with the JVM, there are three places to store data in the Swarm VM: the stack, a local variable array, and the store. The stack is used for intermediate values in computations, data here tends to be very short-lived. In the prototype it is implemented as a List[Any]. The local variable array is for data that is used within a block of code (its implemented as a Map[Int, Any]).

Full Story

  • Share/Save/Bookmark

Tags: MulticoreInfo

Like what you're reading? Come back every day for multicore news, or subscribe to RSS updates.



Stumble It!     


1 response so far ↓

You must log in to post a comment.