• Stars
    star
    333
  • Rank 126,599 (Top 3 %)
  • Language
    Scala
  • License
    MIT License
  • Created almost 8 years ago
  • Updated about 1 month ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Orchestrate microservice-based process flows
Baker Logo

Build Status Maven Central codecov.io

Baker

Baker is a library that provides a simple and intuitive way to orchestrate microservice-based process flows.

You declare your orchestration logic as a recipe using the Java, Kotlin, or Scala DSL. A recipe consists of interactions (system calls), ingredients (data), and events.

Bakers ability to visualize recipes provides a powerful communication tool that helps product owners, architects, and engineers to have a common understanding of the business process. This feature allows you to easily share your recipe with others, enabling collaboration and feedback.

Baker allows for the reuse of common interactions across different recipes, promoting consistency and reducing duplication. With Baker, you can quickly assemble complex process flows by reusing pre-existing building blocks that have been built by other teams within your company.

Use the list below to learn more about Baker:

A bird's-eye view of Baker

A recipe is the blueprint of your business process. To create this blueprint you use the Java, Kotlin, or Scala DSL. The examples below demonstrate a recipe for a simple web shop process.

Java DSL
final Recipe recipe=new Recipe("Web shop")
        .withSensoryEvents(
        CustomerInfoReceived.class,
        OrderPlaced.class,
        PaymentMade.class
    )
            .withInteractions(
            InteractionDescriptor.of(ValidateOrder.class),
        InteractionDescriptor.of(ReserveItems.class)
        .withRequiredEvent(PaymentMade.class),
        InteractionDescriptor.of(ShipGoods.class),
        InteractionDescriptor.of(SendInvoice.class)
        .withRequiredEvent(GoodsShipped.class)
        )
        .withDefaultFailureStrategy(
        new RetryWithIncrementalBackoffBuilder()
        .withInitialDelay(Duration.ofMillis(100))
        .withDeadline(Duration.ofHours(24))
        .withMaxTimeBetweenRetries(Duration.ofMinutes(10))
        .build());
Kotlin DSL
val recipe = recipe("Web shop") {
    sensoryEvents {
        event<CustomerInfoReceived>()
        event<OrderPlaced>()
        event<PaymentMade>()
    }
    interaction<ValidateOrder>()
    interaction<ReserveItems> {
        requiredEvents {
            event<PaymentMade>()
        }
    }
    interaction<ShipGoods>()
    interaction<SendInvoice> {
        requiredEvents {
            event<GoodsShipped>()
        }
    }
    defaultFailureStrategy = retryWithIncrementalBackoff {
        initialDelay = 100.milliseconds
        until = deadline(24.hours)
        maxTimeBetweenRetries = 10.minutes
    }
}
Scala DSL
val recipe: Recipe = Recipe("Web shop")
  .withSensoryEvents(
    Event[CustomerInfoReceived],
    Event[OrderPlaced],
    Event[PaymentMade]
  )
  .withInteractions(
    ValidateOrder,
    ReserveItems
      .withRequiredEvent(Event[PaymentMade])
      ShipGoods,
    SendInvoice
      .withRequiredEvent(goodsShipped)
  )
  .withDefaultFailureStrategy(
    RetryWithIncrementalBackoff
      .builder()
      .withInitialDelay(100 milliseconds)
      .withUntil(Some(UntilDeadline(24 hours)))
      .withMaxTimeBetweenRetries(Some(10 minutes))
      .build()
  )
Visualization

Events are gray, ingredients orange, and interactions lilac:

Getting Started

Baker is released to Maven Central. To use Baker you need three modules.

  1. recipe-dsl: DSL to describe recipes in a declarative manner
  2. compiler: Compiles recipes into models the runtime can execute
  3. runtime: The runtime to manage and execute recipes

Note If you want to use the Kotlin DSL add baker-recipe-dsl-kotlin_2.13 instead of baker-recipe-dsl_2.13.

Maven

<dependency>
    <groupId>com.ing.baker</groupId>
    <artifactId>baker-recipe-dsl_2.13</artifactId>
    <version>3.6.3</version>
</dependency>
<dependency>
    <groupId>com.ing.baker</groupId>
    <artifactId>baker-compiler_2.13</artifactId>
    <version>3.6.3</version>
</dependency>
<dependency>
    <groupId>com.ing.baker</groupId>
    <artifactId>baker-runtime_2.13</artifactId>
    <version>3.6.3</version>
</dependency>

Gradle

implementation 'com.ing.baker:baker-recipe-dsl_2.13:3.6.3'
implementation 'com.ing.baker:baker-compiler_2.13:3.6.3'
implementation 'com.ing.baker:baker-runtime_2.13:3.6.3'

Scala SBT

Baker gets cross compiled and released for both Scala 2.12 and 2.13.

libraryDependencies += "com.ing.baker" % "baker-recipe-dsl_2.13" % "3.6.3"
libraryDependencies += "com.ing.baker" % "baker-compiler_2.13" % "3.6.3"
libraryDependencies += "com.ing.baker" % "baker-runtime_2.13" % "3.6.3"

Contributing

We welcome your contributions! The simplest way to contribute to Baker is by creating a branch from a fork. You can then create a pull request on GitHub from your branch.

Compile and test

To compile and test all libraries:

sbt 
> compile
> test

To cross compile all libraries for Scala 2.12 and 2.13:

sbt
> +compile
> +test

Compile or test a single project

To build a single project (baker-akka-runtime, baker-anotations, etc...):

  1. Find the name of the project by running:
sbt 
> projects
  1. Open the desired project via sbt:
sbt
> project <PROJECT_NAME>
> compile
> test

More Repositories

1

lion

Fundamental white label web component features for your design system.
JavaScript
1,752
star
2

popmon

Monitor the stability of a Pandas or Spark dataframe ⚙︎
Python
497
star
3

sparse_dot_topn

Python package to accelerate the sparse matrix multiplication and top-n similarity selection
C++
396
star
4

threshold-signatures

Threshold Signature Scheme for ECDSA
Rust
199
star
5

flink-deployer

A tool that help automate deployment to an Apache Flink cluster
Go
151
star
6

probatus

Validation (like Recursive Feature Elimination for SHAP) of (multiclass) classifiers & regressors and data used to develop them.
Python
130
star
7

scruid

Scala + Druid: Scruid. A library that allows you to compose queries in Scala, and parse the result back into typesafe classes.
Scala
115
star
8

skorecard

scikit-learn compatible tools for building credit risk acceptance models
Python
84
star
9

cassandra-jdbc-wrapper

A JDBC wrapper of Java Driver for Apache Cassandra®, which offers a simple JDBC compliant API to work with CQL3.
Java
73
star
10

rokku

Rokku project. This project acts as a proxy on top of any S3 storage solution providing services like authentication, authorization, short-term tokens, and lineage.
Scala
66
star
11

INGenious

INGenious Playwright Studio
Java
66
star
12

EntityMatchingModel

Entity Matching Model solves the problem of matching company names between two possibly very large datasets.
Python
52
star
13

ing-open-banking-cli

Shell
45
star
14

ing-open-banking-sdk

Mustache
41
star
15

bdd-mobile-security-automation-framework

Mobile Security testing Framework
Ruby
40
star
16

doing-cli

CLI tool to simplify the development workflow on azure devops
Python
34
star
17

spark-matcher

Record matching and entity resolution at scale in Spark
Python
31
star
18

gohateoas

Plug-and-play HATEOAS for REST API's written in Go
Go
29
star
19

industry2vec

Jupyter Notebook
28
star
20

rokku-dev-apache-atlas

Apache Atlas development image for the Rokku project: https://github.com/ing-bank/rokku
Shell
20
star
21

apache-ranger-s3-plugin

Apache Ranger Plugin for S3
Java
19
star
22

vscode-psl

For distributing plugins to the community and foster further developments with the community going forward.
TypeScript
19
star
23

skafos

Kubenetes operator framework in Python
Python
13
star
24

quota-scaler

Kubernetes Autoscaling operator
Go
12
star
25

zkkrypto

Collection of ZKP-related cryptographic primitives
Kotlin
12
star
26

zkflow

The ZKFlow consensus protocol enables private transactions on Corda for arbitrary smart contracts using Zero Knowledge Proofs
Kotlin
11
star
27

rokku-sts

STS service for the Rokku project: https://github.com/ing-bank/rokku
Scala
9
star
28

prometheus-scenarios

This repo contains a collection of learning scenarios. Each scenario is meant to teach a topic through explanation and practical exercices.
Go
7
star
29

tsforecast

A pipeline to execute time series forecasts and visualize them in a dashboard. The employable forecast models fall into three categories: simple heuristics (mean of last 12 months, last 3 months etc), classical time series econometrics (ARIMA, Holt-Winters, Kalman filters etc.) and machine learning (Neural networks, Facebook’s Prophet etc.)
R
7
star
30

orchestration-pkg

orchestration-pkg
Go
5
star
31

mint

An automated exploratory testing tool for Android
Kotlin
5
star
32

rokku-dev-apache-ranger

Apache Ranger development image for the Rokku project: https://github.com/ing-bank/rokku
Shell
5
star
33

ing-ideal-connectors-java

Opensource tools and API to connect webshops and merchants to ING using iDeal
Java
4
star
34

ing-ideal-connectors-php

Opensource tools and API to connect webshops and merchants to ING using iDeal
PHP
4
star
35

ing-ideal-connectors-net

Opensource tools and API to connect webshops and merchants to ING using iDeal
C#
4
star
36

ginerr

Error registry for Gin, translate rough error messages to user-friendly objects and status codes
Go
4
star
37

gormtestutil

Utilities for writing unit-tests with Gorm
Go
4
star
38

psl-linter

TypeScript
3
star
39

tsclean

Takes a time series, possibly with multiple groupings, and starts up a dashboard to visualize potential anomalies. Anomalies are detected via several algorithms. If anomalies are erroneous, the user can correct them from within the dashboard
R
3
star
40

psl-parser

TypeScript
2
star
41

gintestutil

Utilities for writing unit-tests with Gin
Go
1
star
42

rokku-dev-keycloak

Keycloak development image for the Rokku project: https://github.com/ing-bank/rokku
Dockerfile
1
star
43

tstools

A set of helper functions, geared mostly towards data with a time dimension
R
1
star
44

rokku-dev-mariadb

MariaDB development image for the Rokku project: https://github.com/ing-bank/rokku
Dockerfile
1
star