Ruby On Rails, Design, Simplicity, Web 2.0, Ajax, Mac and Tons of Pizza.

Jun 05

Adam Pisoni: Skynet - A Ruby Map/Reduce Framework

Posted by Annalisa Afeltra in Ruby on Rails - no comments digg this add to delicious

Pisoni illustrates Skynet, a Ruby framework to develop applications with regards to the Map/Reduce model.

Map/Reduce is a programming model aimed at the developing of distributed applications that automatically manage the major parts of the problems of distributing computing; map/reduce enables you to create parallel applications.

Skynet is a framework for the distributed computing on Ruby (like MapReduce) with some differences: Map/Reduce uses two types of processes, masters and workers. Skynet only has workers (the role of of the master is that to assign activities divided into tasks.

But without masters how can we divide the work into tasks? Each worker becomes a master for a particular job, and takes on the responsibility to divide the work into tasks and assign them.

Each worker observes the others in a way to understand if a task fails. When a task is taken up, it is automatically “copied” in the future, if the worker finishes the task it also cancels the future copied task otherwise it is left for someone else to pick it up.

How does Skynet follow your code?


mapreduce (users) do |u|
      codice
end

To use Skynet you need to use the following command:


skynet_start

(note: you need to restart skynet each time you change the code)

Skynet & Rails

Skynet can be used in conjunction with Rails for the following tasks:

  • send an e-mail
  • to execute a migration

Annalisa

Post a comment

Categories:

Tags:

Powered by Mephisto, Valid XHTML 1.1, Valid CSS - Supported by Wave Factory