Skip to content
logo

Krews, short for “Kotlin Reactive Workflows” is a framework for creating scalable and reproducible scientific data pipelines using Docker Containers piped together with Project Reactor, a mature functional reactive programming library.

Workflows are written using a Kotlin DSL in plain old Kotlin projects, meaning you get all the benefits of a modern, type-safe, functional language with fantastic tooling.

Quick Example

fun main(args: Array<String>) = run(sampleWorkflow, args)

val sampleWorkflow = workflow("sample-workflow") {

    // Reactive "Flux" list object for the numbers 1 to 5
    val range = (1..5).toFlux()

    task<Int, File>("base64", range) {
        dockerImage = "alpine:3.9"
        output = OutputFile("base64/$input.b64")
        command =
            """
            mkdir -p /data/base64
            echo "Hello World $input!" | base64 > /data/base64/$input.b64
            """
    }
}

Configuration

working-dir = /data/sample-workflow

Run command

java -jar my-app.jar --on local --config path/to/my-config.conf

Supported Platforms