HelloWorld in Scalar

I’m going to be speaking at TSSJS 2010 this Wednesday but here’s a bit of preview of Scalar – Scala-based DSL on top of GridGain 3.0 runtime. I’ll be blogging a lot more about in the coming months…

“HelloWorld” using Scalar (full source code):

import org.gridgain.scalar.{scalar, _}
import org.gridgain.scalar.ScalarConversions._

object ScalarHelloWorld {
    def main(args: Array[String]) {
       scalar !!! (() => println("Hello Scalar!"))
    }
}

Just one line of Scalar code does the following:
– Start the local default node
– Auto-detects the other nodes in the cloud and joins topology
– Auto-loads the function passed in onto all nodes
– Executes the function (i.e. println("Hello Scalar!")) on all nodes
– Stop the local node and exits topology

Stay tuned!

One response

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: