Skip to content

ProjectZetta/RemoteFutures

Repository files navigation

Remote Futures

Programming of distributed asynchronous function execution: Simple, efficient and fast.

Build Status

About

The project "DistributedRemoteFutures" provides a programming model that seamlessly integrates additional cloud computing resources but without tampering with distributed models and code. It does so by extending Scala's Futures towards a remote execution for simply adding more computational power according to changing demand. Essentially, distributed remote futures allow you:

  • simple and efficient distributed execution
  • very fast to program
  • easy to maintain.

Mailing list

https://groups.google.com/forum/#!forum/remotefutures

Project website

http://remotefutures.org

Usage and syntax

A simple future that is executed remotely

val rf: Future[String] = Remote {
  Future {"asdf"}
}

A simple future that is executed remotely and then mapped locally

val rf : Future[Int] = Remote {
  Future {"asdf"}
}.map( x => x.length )

A simple future that is executed remotely and then mapped remotely

val rf : Future[Int] = Remote {
  Future {"asdf"}.map( x => x.length )
}

Two simple futures, both executed remotely, but joined locally

val rf1 = Remote { Future { "asdf" }}
val rf2 = Remote { Future { "ghjk" }}

val lf : Future[String] = for {
  v1 <- rf1
  v2 <- rf2
} yield v1 + v2

A collection that executes the map function remotely

// setup input list to compute Fibonacci numbers for
val xs: List[Long] = (1000000 to (1000000 + 1000)).toList

// type of fs is List[Future[BigInt]]
val fs = xs.map( Remote(x => Future{FibonacciComputations.fibBigInt(x)}) )

val r: Future[List[BigInt]] = Future sequence (fs)

More examples are in the repo

Background

Futures are the abstraction of asynchronous execution of code, whose result will be eventually available.

The main purpose of this project is to extend the execution context of futures to gain advantage from the computational power of remote nodes. Instead of using the local machine's capabilities only, the execution of futures is extended towards a distributed system while still fulfilling a concise, but not intrusive syntax and programming model.

Thus, extending this context of execution yields substantial gain in execution speed and performance by the extension to nodes of a distributed system, without introducing more complexity from the developer's perspective.

Requirements:

  1. JDK Download

  2. SBT [Download] (http://www.scala-sbt.org/release/docs/Getting-Started/Setup.html)

  3. Scala [Download] (http://scala-lang.org/download/)

Getting started

git clone https://github.com/DistributedRemoteFutures/DistributedRemoteFutures.git
sbt compile

Contribute

Team:

Licnse

This software is licensed under the Apache 2 license.