Skip to content

Scala DSL library for scientific computations (workflows) based on Akka actors.

License

Notifications You must be signed in to change notification settings

kklimexk/akkaflow

Repository files navigation

Akkaflow

Build Status License

Akkaflow - workflow DSL library for scientific computations based on Akka actors.

This project was created as a part of the master thesis.

Akkaflow is written entirely in Scala and using Akka technology.

Goal

The aim of this project is to provide a simple library to program workflows. For this purpose was created a dedicated API - internal DSL to create workflows as simple as possible.

Running examples:

$ sbt run

or

$ ./activator run

Getting started

Creating simple workflow:

val sqr = { (in: Int, outs: Outs) =>
  outs().foreach(out => in * in =>> out)
}

val splitProc = Process[Int, Int] (
  name = "splitProc",
  numOfOuts = 3,
  action = sqr
)

val w = Workflow (
  "Example split workflow",
  numOfIns = 1,
  numOfOuts = 3,
  (ins: Seq[In[Int]], outs: Seq[Out[Int]]) => {
    ins(0) ~>> splitProc
    splitProc.outs(0) ~>> outs(0)
    splitProc.outs(1) ~>> outs(1)
    splitProc.outs(2) ~>> outs(2)
  }
)

Source(1 to 10) ~> w.ins(0)
val res = w.run
println(res)
println(w)

All the examples are available in:

/src/main/scala/pl/edu/agh/examples/

About

Scala DSL library for scientific computations (workflows) based on Akka actors.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages