https://github.com/bigbuildbench/orleanscontrib_orleans.sagas

https://github.com/bigbuildbench/orleanscontrib_orleans.sagas

Science Score: 13.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (10.3%) to scientific vocabulary
Last synced: 10 months ago · JSON representation

Repository

Basic Info
  • Host: GitHub
  • Owner: BigBuildBench
  • License: mit
  • Language: C#
  • Default Branch: master
  • Size: 178 KB
Statistics
  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Created over 1 year ago · Last pushed over 1 year ago
Metadata Files
Readme License

README.md

Orleans.Sagas

A distributed saga implementation for Orleans

.NET Core NuGet Gitter

Overview

Orleans.Sagas sits on top of the Orleans framework, enabling sagas to scale up across a cluster of machines. However the Orleans.Sagas library does not require any detailed knowledge of Orleans. It is primarily designed to make it effortless to write robust and horizontally scalable sagas (compensatable workflows) for .NET with very minimal knowledge of distributed systems.

If you are familiar with Orleans you can use Orleans.Sagas to orchestrate long running workflows which involve Orleans grains, or a combination of grains and external services.

Status

The library is currently in user acceptance testing with its first major consumer and is therefore not recommended for production use yet and will likely require subsequent API changes prior to a supported release.

The NuGet package is available as a preview, and in the absence of detailed documentation, the gitter chat is a good place to start.

References

Usage

Installing

Install the NuGet package with a package manager.

Configuring Orleans for sagas

  1. Configure a default storage provider
  2. Configure a reminder storage provider
  3. Add the following statements to your Orleans silo builder: csharp .UseOrleans(siloBuilder => { siloBuilder .UseSagas() .ConfigureApplicationParts(parts => { parts.AddSagaParts(); }) ... }

Designing activities

```csharp public class BookHireCarActivity : IActivity { public async Task Execute(IActivityContext context) { // idempotently request a hire car from a hire car service. await HireCarService.Book(context.SagaId, context.SagaProperties.Get("HireCarModel")); }

public async Task Compensate(IActivityContext context)
{
    // idempotently cancel a hire car request from a hire car service.
    await HireCarService.Cancel(context.SagaId);
}

} ```

Native dependency injection

csharp public class BookHireCarActivity : IActivity { public BookHireCarActivity(IWasAddedAsAServiceOnStartUp myDependency) { } }

Executing a saga

```csharp // create a saga builder. var sagaBuilder = GrainFactory.CreateSaga();

// add activities to your saga, and optional associated configuration. sagaBuilder .AddActivity() .AddActivity() .AddActivity()

// execute the saga (idempotent). var saga = await sagaBuilder.ExecuteSagaAsync(x => x.Add("HireCarModel", 1));

// abort the saga (idempotent). await saga.RequestAbort(); ```

Owner

  • Name: BigBuildBench
  • Login: BigBuildBench
  • Kind: organization

abbr. B3, benchmarking the repo-level understanding capability of your LLMs by reconstructing project build-file.

GitHub Events

Total
  • Create event: 8
Last Year
  • Create event: 8

Dependencies

.github/workflows/dotnet-core.yml actions
  • actions/checkout v2 composite
  • actions/setup-dotnet v1 composite
  • brandedoutcast/publish-nuget v2.5.2 composite
Orleans.Sagas/Orleans.Sagas.csproj nuget
Orleans.Sagas.Samples/Orleans.Sagas.Samples.csproj nuget
Orleans.Sagas.Samples.Activities/Orleans.Sagas.Samples.Activities.csproj nuget
Orleans.Sagas.Tests/Orleans.Sagas.Tests.csproj nuget