Orleans.FSharp
5.0.1
dotnet add package Orleans.FSharp --version 5.0.1
NuGet\Install-Package Orleans.FSharp -Version 5.0.1
<PackageReference Include="Orleans.FSharp" Version="5.0.1" />
<PackageVersion Include="Orleans.FSharp" Version="5.0.1" />
<PackageReference Include="Orleans.FSharp" />
paket add Orleans.FSharp --version 5.0.1
#r "nuget: Orleans.FSharp, 5.0.1"
#:package Orleans.FSharp@5.0.1
#addin nuget:?package=Orleans.FSharp&version=5.0.1
#tool nuget:?package=Orleans.FSharp&version=5.0.1
Orleans.FSharp
Idiomatic, functional F# actors on Microsoft Orleans.
The current authoring model uses typed API records, grainContract, grainFor, and
FunctionalGrain.ref; it needs no application-owned C# grain interface or proxy project.
Quick example
open System.Threading.Tasks
open Orleans.FSharp
type CounterActor = private CounterActor of unit
[<NoEquality; NoComparison>]
type CounterApi =
{ increment: unit -> Task<int>
value: unit -> Task<int> }
[<RequireQualifiedAccess>]
module CounterApi =
let contract =
grainContract<CounterActor, string, CounterApi> {
grainType "counter"
version 1
stringKey
readOnly (_.value)
}
let ref = FunctionalGrain.ref contract
let counterDefinition =
grainFor CounterApi.contract {
defaultState (fun () -> 0)
handle (_.increment) (fun _ count () ->
task {
let next = count + 1
return next, next
})
handleQuery (_.value) (fun _ count () -> task { return count })
}
let callCounter (grainFactory: Orleans.IGrainFactory) =
task {
let counter = CounterApi.ref grainFactory "visits"
let! next = counter.increment ()
let! current = counter.value ()
return next, current
}
Register counterDefinition with ISiloBuilder.AddFunctionalGrain; callers use
callCounter's typed API-record binding.
Current functional surface
grainContract<'Actor,'Key,'Api> { }declares stable identity, key encoding, versioning, and delivery policy.grainFor contract { }binds immutable state transitions, persistence, lifecycle hooks, timers, reminders, streams, placement, and transactions.journaledGrainFor contract { }binds a pure event fold and supports Orleans log-consistency providers, typed custom storage, and snapshot policies.FunctionalGrain.refreturns the typed API record;FunctionalGrain.rawRefadditionally exposes cancellable and server-streaming calls.FunctionalObserverprovides codegen-free typed push callbacks.
See the functional runtime guide, event-sourcing guide, and API reference.
Related packages
| Package | Purpose |
|---|---|
Orleans.FSharp.Runtime |
Silo/client configuration and functional-definition hosting |
Orleans.FSharp.Abstractions |
Pre-generated transport proxies, pulled in transitively |
Orleans.FSharp.Testing |
TestingHost, web-host, FsCheck, and log-capture helpers |
Orleans.FSharp.Analyzers |
F# analyzer that reports async { } where task { } is expected |
Legacy archive
The original authoring model is unsupported and is not part of the 5.x release line. Its source-only compatibility projects, examples, and migration mapping remain in the repository's Legacy archive to help existing applications migrate.
License
MIT
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- FSharp.Control.TaskSeq (>= 1.1.1)
- FSharp.Core (>= 10.1.201)
- FSharp.SystemTextJson (>= 1.4.36)
- FsToolkit.ErrorHandling (>= 5.2.0)
- IcedTasks (>= 0.11.9)
- Microsoft.Extensions.DependencyInjection (>= 10.0.9)
- Microsoft.Extensions.Hosting (>= 10.0.9)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.9)
- Microsoft.Orleans.BroadcastChannel (>= 10.1.0)
- Microsoft.Orleans.Core.Abstractions (>= 10.1.0)
- Microsoft.Orleans.EventSourcing (>= 10.1.0)
- Microsoft.Orleans.Persistence.Memory (>= 10.1.0)
- Microsoft.Orleans.Reminders (>= 10.1.0)
- Microsoft.Orleans.Runtime (>= 10.1.0)
- Microsoft.Orleans.Sdk (>= 10.1.0)
- Microsoft.Orleans.Server (>= 10.1.0)
- Microsoft.Orleans.Streaming (>= 10.1.0)
- Microsoft.Orleans.Transactions (>= 10.1.0)
- Orleans.FSharp.Abstractions (>= 5.0.1)
- Polly (>= 8.7.0)
- TypeShape (>= 10.0.0)
NuGet packages (3)
Showing the top 3 NuGet packages that depend on Orleans.FSharp:
| Package | Downloads |
|---|---|
|
Orleans.FSharp.Runtime
Silo and client hosting for functional Orleans.FSharp actors — registration, serialization, health checks, Dashboard, TLS, and production configuration. |
|
|
Orleans.FSharp.Testing
Test utilities for Orleans.FSharp grains — TestHarness, GrainMock, GrainArbitrary (TypeShape-based FsCheck), FsCheckHelpers, and LogCapture. |
|
|
Orleans.FSharp.EventSourcing
Declarative event sourcing for Orleans grains in F# — eventSourcedGrain {} CE with apply/handle and a JournaledGrain bridge. |
GitHub repositories
This package is not used by any popular GitHub repositories.