Packages
Cratis Choreography ships as five NuGet packages. Reference Cratis.Choreography and a storage provider for most
services, and add Cratis.Choreography.Chronicle only when you use Cratis Chronicle.
Packages at a glance
Section titled “Packages at a glance”| Package | Contains | Target frameworks |
|---|---|---|
Cratis.Choreography |
Jobs, workers, state machines, workflows, patching, tenancy, the availability engine, typed grain keys, serializers, live collaboration presence and silo hosting | net10.0, net11.0 |
Cratis.Choreography.Storage |
The jobs and patch storage APIs and the in-memory providers | net10.0, net11.0 |
Cratis.Choreography.Storage.MongoDB |
The MongoDB providers for jobs and patches | net10.0, net11.0 |
Cratis.Choreography.Storage.Sql |
The SQL providers for jobs and patches, on EF Core for SQL Server, PostgreSQL and SQLite | net10.0, net11.0 |
Cratis.Choreography.Chronicle |
Event-sourced state machines and workflows whose runs are kept as Chronicle events | net10.0, net11.0 |
Live collaboration presence and the availability engine ship inside Cratis.Choreography: they are not separate packages. It uses the ASP.NET Core shared framework
and the Orleans packages that Cratis.Choreography already references.
All five packages target net10.0 and net11.0. The SQL provider uses EF Core 10 on both frameworks to stay within
Npgsql’s supported EF Core range. Source builds, tools and specifications target net11.0 and require the .NET 11 GA SDK.
The npm package
Section titled “The npm package”The browser side ships separately as @cratis/choreography on npm. A backend needs none of it; add it to a frontend that shows
operation history with undo and redo, or live collaborators.
| Entry point | Contains | Read |
|---|---|---|
@cratis/choreography |
The operation history client and its types | Operations and undo/redo |
@cratis/choreography/react |
The hooks useOperationHistory, useUndo and useRedo |
Operations in React |
@cratis/choreography/collaboration |
The live collaboration client, shared store, types and geometry helpers, with no React dependency | Show live collaborators in React |
@cratis/choreography/collaboration/react |
The collaboration hooks and components | Show live collaborators in React |
@cratis/choreography/collaboration/collaboration.css |
The styles for the collaboration components | Show live collaborators in React |
Which packages you need
Section titled “Which packages you need”| You want | Reference |
|---|---|
| Jobs, workflows or state machines with no database, for development and tests | Cratis.Choreography |
| Durable state in MongoDB | Cratis.Choreography and Cratis.Choreography.Storage.MongoDB |
| Durable state in SQL Server, PostgreSQL or SQLite | Cratis.Choreography and Cratis.Choreography.Storage.Sql |
| Event-sourced state machines or a Chronicle-backed workflow journal | Cratis.Choreography, a storage provider if you run jobs, and Cratis.Choreography.Chronicle |
Cratis.Choreography references Cratis.Choreography.Storage, so you do not add it yourself. The storage provider
packages and the Chronicle package reference Cratis.Choreography.
Dependencies
Section titled “Dependencies”| Package | Notable dependencies |
|---|---|
Cratis.Choreography |
Microsoft Orleans 10 (Sdk, Server, Reminders, Serialization and Serialization.SystemTextJson), Orleans.Providers.MongoDB, Cratis.Fundamentals, OneOf, System.Reactive and the ASP.NET Core shared framework |
Cratis.Choreography.Storage |
Microsoft.Orleans.Core.Abstractions, Cratis.Fundamentals, OneOf, System.Reactive |
Cratis.Choreography.Storage.MongoDB |
MongoDB.Driver, Cratis.Arc.MongoDB, System.Reactive |
Cratis.Choreography.Storage.Sql |
Cratis.Arc.EntityFrameworkCore and the EF Core SQL Server, PostgreSQL and SQLite providers |
Cratis.Choreography.Chronicle |
Microsoft.Orleans.Sdk, Cratis.Chronicle |
Only Cratis.Choreography.Chronicle depends on Cratis Chronicle. The other four packages work without it.
One Orleans version
Section titled “One Orleans version”Orleans.Providers.MongoDB is built for Orleans 9 and asks for the 9.x reminders package, while the rest of the stack
runs on Orleans 10. A 9.x Microsoft.Orleans.Reminders against a 10.x runtime fails with a MissingMethodException the
moment a silo builds its grain services. Cratis.Choreography therefore carries a build target that reads the
resolved package graph and fails your Release build when Microsoft.Orleans.Reminders and Microsoft.Orleans.Server
resolve to different versions. The package’s own release build also restores a consumer for each framework and checks
that every Microsoft.Orleans.* package resolves to one version.
If that error appears in your build, pin Microsoft.Orleans.Reminders in Directory.Packages.props, keep its direct
PackageReference, and make it resolve to the same version as Microsoft.Orleans.Server.
See Hosting for how the co-hosted silo avoids the MongoDB reminder table.
Where to go next
Section titled “Where to go next”- Run your first durable job uses
Cratis.Choreographyand the MongoDB provider. - Storage compares the providers.
- Options lists every option the packages read.