Saga pattern implementation in Kotlin build in top of Kotlin's Coroutines.

Overview

Module Saga

Maven Central Latest snapshot Website can be found here

Add in build.gradle.kts

repositories {
    mavenCentral()
}

dependencies {
    implementation("io.github.nomisrev:saga:0.1.3")
}

The saga design pattern is a way to manage data consistency across microservices in distributed transaction scenarios.

A [Saga] is useful when you need to manage data in a consistent manner across services in distributed transaction scenarios. Or when you need to compose multiple [action]s with a [compensation] that needs to run in a transaction like style. For example, let's say that we have following domain types Order, Payment.

data class Order(val id: UUID, val amount: Long)
data class Payment(val id: UUID, val orderId: UUID)

The creation of an Order can only remain when a payment has been made.

In SQL you might run this inside a transaction, which can automatically rollback the creation of the Order when the creation of the Payment fails. When you need to do this across distributed services, or a multiple atomic references, etc you need to manually facilitate the rolling back of the performed actions, or compensating actions.

The [Saga] type, and [saga] DSL remove all the boilerplate of manually having to facilitate this with a convenient suspending DSL.

data class Order(val id: UUID, val amount: Long)

suspend fun createOrder(): Order = Order(UUID.randomUUID(), 100L)
suspend fun deleteOrder(order: Order): Unit = println("Deleting $order")

data class Payment(val id: UUID, val orderId: UUID)

suspend fun createPayment(order: Order): Payment = Payment(UUID.randomUUID(), order.id)
suspend fun deletePayment(payment: Payment): Unit = println("Deleting $payment")

suspend fun Payment.awaitSuccess(): Unit = throw RuntimeException("Payment Failed")

suspend fun main() {
  saga {
    val order = saga { createOrder() }.compensate(::deleteOrder).bind()
    val payment = saga { createPayment(order) }.compensate(::deletePayment).bind()
    payment.awaitSuccess()
  }.transact()
}

// Deleting Payment(id=5753e9bb-248a-4385-8c9c-4a524e80c0f9, orderId=3a55ffab-a3f5-40a9-a2b3-681dc17b174e)
// Deleting Order(id=3a55ffab-a3f5-40a9-a2b3-681dc17b174e, amount=100)
// Exception in thread "main" java.lang.RuntimeException: Payment Failed
//   at io.github.nomisrev.TestKt.awaitSuccess(test.kt:11)
Comments
  • Bump kotest-assertions-core from 5.0.0.M2 to 5.0.0.M3

    Bump kotest-assertions-core from 5.0.0.M2 to 5.0.0.M3

    Bumps kotest-assertions-core from 5.0.0.M2 to 5.0.0.M3.

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 1
  • Bump kotest-framework-engine from 5.0.0.M2 to 5.0.0.M3

    Bump kotest-framework-engine from 5.0.0.M2 to 5.0.0.M3

    Bumps kotest-framework-engine from 5.0.0.M2 to 5.0.0.M3.

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 1
  • Bump kotest-property from 5.0.0.M2 to 5.0.0.M3

    Bump kotest-property from 5.0.0.M2 to 5.0.0.M3

    Bumps kotest-property from 5.0.0.M2 to 5.0.0.M3.

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 1
  • Bump kotest-assertions-core from 5.0.0.M3 to 5.0.0.688-SNAPSHOT

    Bump kotest-assertions-core from 5.0.0.M3 to 5.0.0.688-SNAPSHOT

    Bumps kotest-assertions-core from 5.0.0.M3 to 5.0.0.688-SNAPSHOT.

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 1
  • Bump kotest-framework-engine from 5.0.0.M3 to 5.0.0.688-SNAPSHOT

    Bump kotest-framework-engine from 5.0.0.M3 to 5.0.0.688-SNAPSHOT

    Bumps kotest-framework-engine from 5.0.0.M3 to 5.0.0.688-SNAPSHOT.

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 1
  • Bump kotest-property from 5.0.0.M3 to 5.0.0.688-SNAPSHOT

    Bump kotest-property from 5.0.0.M3 to 5.0.0.688-SNAPSHOT

    Bumps kotest-property from 5.0.0.M3 to 5.0.0.688-SNAPSHOT.

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 1
  • Bump kotest-property from 5.0.0.M3 to 5.0.0.687-SNAPSHOT

    Bump kotest-property from 5.0.0.M3 to 5.0.0.687-SNAPSHOT

    Bumps kotest-property from 5.0.0.M3 to 5.0.0.687-SNAPSHOT.

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 1
  • Bump kotest-framework-engine from 5.0.0.M3 to 5.0.0.687-SNAPSHOT

    Bump kotest-framework-engine from 5.0.0.M3 to 5.0.0.687-SNAPSHOT

    Bumps kotest-framework-engine from 5.0.0.M3 to 5.0.0.687-SNAPSHOT.

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 1
  • Bump kotest-assertions-core from 5.0.0.M3 to 5.0.0.687-SNAPSHOT

    Bump kotest-assertions-core from 5.0.0.M3 to 5.0.0.687-SNAPSHOT

    Bumps kotest-assertions-core from 5.0.0.M3 to 5.0.0.687-SNAPSHOT.

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 1
  • Bump kotest-framework-engine from 5.0.0.M3 to 5.0.0.640-SNAPSHOT

    Bump kotest-framework-engine from 5.0.0.M3 to 5.0.0.640-SNAPSHOT

    Bumps kotest-framework-engine from 5.0.0.M3 to 5.0.0.640-SNAPSHOT.

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 1
  • Bump kotest-assertions-core from 5.0.0.M3 to 5.0.0.640-SNAPSHOT

    Bump kotest-assertions-core from 5.0.0.M3 to 5.0.0.640-SNAPSHOT

    Bumps kotest-assertions-core from 5.0.0.M3 to 5.0.0.640-SNAPSHOT.

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 1
  • Update all dependencies

    Update all dependencies

    Mend Renovate

    This PR contains the following updates:

    | Package | Type | Update | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---|---|---| | actions/checkout | action | minor | v3.2.0 -> v3.3.0 | age | adoption | passing | confidence | | actions/upload-artifact | action | patch | v3.1.1 -> v3.1.2 | age | adoption | passing | confidence | | com.gradle.enterprise | plugin | patch | 3.12 -> 3.12.2 | age | adoption | passing | confidence | | org.jetbrains.kotlin.multiplatform | plugin | minor | 1.7.22 -> 1.8.0 | age | adoption | passing | confidence |


    ⚠ Dependency Lookup Warnings ⚠

    Warnings were logged while processing this repo. Please check the Dependency Dashboard for more information.


    Release Notes

    actions/checkout

    v3.3.0

    Compare Source

    What's Changed
    New Contributors

    Full Changelog: https://github.com/actions/checkout/compare/v3.2.0...v3.3.0

    actions/upload-artifact

    v3.1.2

    Compare Source

    • Update all @actions/* NPM packages to their latest versions- #​374
    • Update all dev dependencies to their most recent versions - #​375

    Configuration

    📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

    🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

    Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

    👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.


    • [ ] If you want to rebase/retry this PR, check this box

    This PR has been generated by Mend Renovate. View repository job log here.

    opened by renovate[bot] 0
  • Dependency Dashboard

    Dependency Dashboard

    This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.


    ⚠ Dependency Lookup Warnings ⚠

    • Renovate failed to look up the following dependencies: io.github.gradle-nexus:publish-plugin.

    Files affected: libs.versions.toml


    Open

    These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

    • [ ] Update all dependencies (actions/checkout, actions/upload-artifact, com.gradle.enterprise, org.jetbrains.kotlin.multiplatform)

    Detected dependencies

    github-actions
    .github/workflows/generate-alpha-tag.yml
    • actions/checkout v3
    • actions/setup-java v3.9.0
    • actions/checkout v3
    • actions/setup-java v3.9.0
    .github/workflows/generate-tag.yml
    • actions/checkout v3
    • actions/setup-java v3.9.0
    • actions/checkout v3
    • actions/setup-java v3.9.0
    .github/workflows/pr.yml
    • actions/checkout v3.2.0
    • maxim-lobanov/setup-xcode v1
    • actions/setup-java v3.9.0
    • gradle/gradle-build-action v2.3.3
    • actions/upload-artifact v3.1.1
    .github/workflows/publish.yml
    • actions/checkout v3.2.0
    • actions/setup-java v3.9.0
    • maxim-lobanov/setup-xcode v1
    • gradle/gradle-build-action v2.3.3
    • actions/upload-artifact v3.1.1
    • actions/checkout v3
    • actions/setup-java v3.9.0
    .github/workflows/update-docs.yml
    • actions/checkout v3
    • actions/setup-java v3.9.0
    • gradle/gradle-build-action v2.3.3
    gradle
    gradle.properties
    libs.versions.toml
    • io.arrow-kt:arrow-core 1.1.3
    • io.arrow-kt:arrow-optics 1.1.3
    • io.arrow-kt:arrow-fx-coroutines 1.1.3
    • org.jetbrains.kotlinx:kotlinx-coroutines-core 1.6.4
    • org.jetbrains.kotlinx:kotlinx-coroutines-test 1.6.4
    • org.jetbrains.dokka:dokka-core 1.7.20
    • io.kotest:kotest-assertions-core 5.5.4
    • io.kotest:kotest-framework-engine 5.5.4
    • io.kotest:kotest-property 5.5.4
    • io.kotest:kotest-runner-junit5 5.5.4
    • io.github.gradle-nexus:publish-plugin 1.1.0
    • io.arrow-kt.arrow-gradle-config-formatter 0.11.0
    • io.arrow-kt.arrow-gradle-config-kotlin 0.11.0
    • io.arrow-kt.arrow-gradle-config-nexus 0.11.0
    • io.arrow-kt.arrow-gradle-config-publish 0.11.0
    • io.arrow-kt.arrow-gradle-config-versioning 0.11.0
    • org.jetbrains.dokka 1.7.20
    • org.jetbrains.kotlinx.kover 0.6.1
    • io.kotest.multiplatform 5.5.4
    • org.jetbrains.kotlin.multiplatform 1.7.22
    • org.jetbrains.kotlinx.binary-compatibility-validator 0.12.1
    • io.gitlab.arturbosch.detekt 1.22.0
    settings.gradle.kts
    • com.gradle.enterprise 3.12
    build.gradle.kts
    gradle-wrapper
    gradle/wrapper/gradle-wrapper.properties
    • gradle 7.6

    • [ ] Check this box to trigger a request for Renovate to run again on this repository
    opened by renovate[bot] 0
Releases(1.0.1)
  • 1.0.1(Oct 4, 2022)

    Patch release with Kotlin version increase to 1.7.20

    What's Changed

    • Update actions/setup-java action to v3.5.0 by @renovate in https://github.com/nomisRev/Saga/pull/147
    • Update all dependencies to v1.1.3 by @renovate in https://github.com/nomisRev/Saga/pull/148
    • Update gradle/gradle-build-action action to v2.3.1 by @renovate in https://github.com/nomisRev/Saga/pull/149
    • Update actions/setup-java action to v3.5.1 by @renovate in https://github.com/nomisRev/Saga/pull/150
    • Update all dependencies by @renovate in https://github.com/nomisRev/Saga/pull/151
    • Update all dependencies by @renovate in https://github.com/nomisRev/Saga/pull/152

    Full Changelog: https://github.com/nomisRev/Saga/compare/1.0.0...1.0.1

    Source code(tar.gz)
    Source code(zip)
  • 1.0.0(Sep 5, 2022)

    What's Changed

    • Refactor Saga<A> to typealias Saga<A> = suspend SagaEffect.() -> A
    • Remove traverse and friends. Use collection inline operators (map, forEach, ...) + bind.
    • Refactor constructors to smart-constructors only saga with 3 different signatures.
      • fun <A> saga(block: suspend SagaEffect.() -> A): Saga<A>
      • fun <A> saga(action: suspend () -> A, compensate (A) -> Unit): Saga<A>
      • suspend fun <A> SagaEffect.saga(action: suspend SagaActionStep.() -> A, compensate (A) -> Unit): A

    Note: binary compatibility will be maintained starting this version.

    Full Changelog: https://github.com/nomisRev/Saga/compare/0.1.0...1.0.0

    Source code(tar.gz)
    Source code(zip)
  • 0.1.0(Aug 30, 2021)

    First release of Saga.

    Kotlin implementation of the Saga pattern for distributed transaction build on top Kotlin's suspension system. Offer a convenient saga { } DSL, and parallel compositional combinators such as parZip and parTraverse.

    Source code(tar.gz)
    Source code(zip)
  • 0.1.3(Dec 28, 2021)

Owner
Simon Vergauwen
Functional Programmer enthusiast. http://www.arrow-kt.io maintainer. Senior Software Engineer @47deg
Simon Vergauwen
An implementation of MediatR on JVM for Spring using Kotlin coroutines

Kpring MediatR In this project, an attempt has been made to implement the mediator pattern on the JVM with simplicity using Kotlin with native corouti

Mahdi Bohloul 4 Aug 6, 2022
Kotlin microservices with REST, and gRPC using BFF pattern. This repository contains backend services. Everything is dockerized and ready to "Go" actually "Kotlin" :-)

Microservices Kotlin gRPC Deployed in EC2, Check it out! This repo contains microservices written in Kotlin with BFF pattern for performing CRUD opera

Oguzhan 18 Apr 21, 2022
A reliable android app that shows upcoming fixtures, updated league tables, and top goal scorers in a league

SwiftScore A football stats and livescore app built with Kotlin,MVVM architecture,Retrofit, Coroutines and Navigation Components Demo Screenshots API

Breens Mbaka 12 Jul 7, 2022
The app is composed of 2 screens, first is the profile screen, it has the user_name and address pinned at the top and then it lists all of this user’s albums.

The app is composed of 2 screens, first is the profile screen, it has the user_name and address pinned at the top and then it lists all of this user’s albums. When you press on any album it navigates to the second screen which is an album details screen that contains list of the images in an recyclerview grid. Also you have search bar that you can filter within the photos album by the image title.

Mahmoud Ibrahim 4 Jul 10, 2022
An Android app built with Kotlin, consuming StarWars API to display characters of the popular StarWars Movie. It is built with the MVVM pattern and the latest Jetpack components.

StarWars An Android app built with Kotlin, consuming StarWars API to display characters of the popular StarWars Movie. It is built with the MVVM patte

Joel Kanyi 42 Nov 20, 2022
FirestoreCleanArchitectureApp is an app built with Kotlin and Firestore that displays data in real-time using the MVVM Architecture Pattern. For the UI it uses Jetpack Compose, Android's modern toolkit for building native UI.

FirestoreCleanArchitectureApp FirestoreCleanArchitectureApp is an app built with Kotlin and Cloud Firestore that displays data in real-time using Andr

Alex 66 Dec 15, 2022
AbstractFactoryDesignPatternWithKotlin - Abstract Factory Design Pattern With Kotlin

AbstractFactoryDesignPatternWithKotlin Abstract Factory Design Pattern With Kotl

Harun Kör 2 Jun 16, 2022
AbstractFactoryDesignPatternWithKotlin - Abstract Factory Design Pattern With Kotlin

AbstractFactoryDesignPatternWithKotlin Abstract Factory Design Pattern With Kotl

Harun Kör 1 Jan 2, 2022
Kotlin extension function provides a facility to "add" methods to class without inheriting a class or using any type of design pattern

What is Kotlin Extension Function ? Kotlin extension function provides a facility to "add" methods to class without inheriting a class or using any ty

mohsen 21 Dec 3, 2022
A program written entirely in Kotlin using the principles of Clean Architecture according to the MVVM pattern

A program written entirely in Kotlin using the principles of Clean Architecture according to the MVVM pattern. An application that shows a list of ani

Yusuf Ruziev 2 Apr 26, 2022
Demonstration of Object Pool Design Pattern using Kotlin language and Coroutine

Object Pool Design Pattern with Kotlin Demonstration of Thread Safe Object Pool Design Pattern using Kotlin language and Coroutine. Abstract The objec

Enes Kayıklık 7 Apr 12, 2022
An Android app consuming Pixabay API to search and display list of images, built with MVVM pattern

Images An Android app consuming Pixabay API to search and display list of images, built with MVVM pattern as well as Architecture Components. Min Api

Ronnie Otieno 8 Sep 21, 2022
A movie & TV show exploration app that implements MVVM design pattern by following the clean architecture principles, using TMDB API.

?? Movie App ?? A movie & TV show exploration app that implements MVVM design pattern by following the clean architecture principles, using TMDB API.

Bora Bor 11 Dec 22, 2022
An Android template you can use to build your project with gradle kotlin dsl

Android Gradle KTS An Android template you can use to build your project with gradle kotlin dsl Build.gradle.kts You can use your project's build.grad

Deep 17 Sep 12, 2022
Olx-workshop-gdsc - Build Classified Ads Application With Kotlin

Build Classified Ads Application Architecture Database : [Firebase Realtime Data

Raka Adi Nugroho 3 Jan 9, 2022
A starter project to build command-line tools in Kotlin Multiplatform

A starter project to build command-line tools in Kotlin Multiplatform Contains a re-implementation of a real world CLI tool: git-standup Installation

null 0 May 2, 2022
🟣 Opinionated Kotlin libs, DSLs and frameworks to build better web apps

Tegral Tegral is an opinionated collection of Kotlin frameworks, libraries, helpers and DSLs that help you make awesome apps, from web back-ends and b

Zoroark 21 Dec 22, 2022
KVision allows you to build modern web applications with the Kotlin language

KVision allows you to build modern web applications with the Kotlin language, without any use of HTML, CSS or JavaScript. It gives you a rich hierarchy of ready to use GUI components, which can be used as builder blocks for the application UI.

Robert Jaros 985 Jan 1, 2023
This is a Ktor project to build your own Url shortener

Ktor URL Shortner This project is a implementation for creating Short URL using Ktor + Kotlin + MongoDB Usage It contains two routes if you want to im

Himanshu Singh 25 Dec 15, 2022