portals-project / portals

Portals is a framework for stateful serverless apps, unifying dataflow streaming with actors
https://www.portals-project.org/
Apache License 2.0
19 stars 2 forks source link
actors-framework data dataflow distributed fault-tolerance serverless-framework stateful streams worklflows

Portals

Build Status License API Docs GitHub issues Support

Project Information

Portals is a framework written in Scala under the Apache 2.0 License for stateful serverless applications.

The Portals framework aims to unify the distributed dataflow streaming model with the actor model, providing flexibility, data-parallel processing capabilities and strong guarantees. The framework is designed to be used in a serverless environment, where the user can focus on the business logic of the application, while the framework takes care of the infrastructure and failure management.

Key features:

Find out more about Portals at https://portals-project.org.

[!NOTE] Disclaimer: Portals is a research project under development and not yet ready for production use. This repository contains a single-node runtime for testing and development purposes. A distributed runtime is currently under development.

Project Status and Roadmap

The Portals project is currently in the early stages of development. We are working towards a first release with ongoing work on a distributed decentralized runtime. Some of this preliminary work is done in parallel on other (private) repositories. We have planned a release for this fall 2023. Besides these ongoing developments, the release will include a Scala API, JS API, Interpreter, Compiler, Benchmarks, and Examples.

[!NOTE] Features that are currently in development are marked as experimental and are likely to change.

Project Setup

To use Portals in your project, add the following dependecy to your build.sbt file:

libraryDependencies += "org.portals-project" %% "portals" % "0.1.0-RC1"

A full project setup with instructions for executing a hello world example is available at https://github.com/portals-project/Hello-World.

[!NOTE] Portals has not yet been published to Maven Central. It can be published locally using the sbt publishLocal command. To use Portals in your project, import the local snapshot instead: libraryDependencies += "org.portals-project" %% "portals-core" % "0.1.0-SNAPSHOT".

Getting Started Guide

We recommend the following steps to get started.

You can find further reading material on the website.

Examples

The Portals library comes with an API for defining multi-dataflow applications, and a serverless runtime for executing these applications. The most basic example would involve defining a workflow and a generator within the context of a PortalsApp, and executing this on the test runtime interpreter.

import portals.api.dsl.DSL.*
import portals.system.Systems
object HelloWorld extends App:
  val app = PortalsApp("HelloWorld"):
    val generator = Generators.fromList(List("Hello World!"))
    val workflow = Workflows[String, String]()
      .source(generator.stream)
      .map(_.toUpperCase())
      .logger()
      .sink()
      .freeze()
  val system = Systems.test()
  system.launch(app)
  system.stepUntilComplete()
  system.shutdown()

Check out an extensive Tutorial and the Examples Directory for more examples.

Support and Contact

For help or questions, contact the Portals developers and community on the Portals Google Groups mailing list.

If you find a bug in Portals, then open an issue.

Contributing

If you are interested in contributing to the project, please check out our contributing guidelines.

Cite Our Work

If you want to cite our work, please consider citing the following publication: