Skip to content

Frequently Asked Questions

Answers about the current Orleans.FSharp functional API.

Orleans.FSharp is a functional-first F# authoring layer over Microsoft Orleans. A grain exposes a plain F# API record, a grainContract defines its identity and policies, and grainFor or journaledGrainFor supplies behavior.

No. The functional runtime uses precompiled Orleans proxies from Orleans.FSharp.Abstractions. Your application writes the actor brand, API record, contract, and definition in F#.

open System.Threading.Tasks
open Orleans.FSharp
type CounterActor = private CounterActor of unit
[<NoEquality; NoComparison>]
type CounterApi = { increment: unit -> Task<int> }
let counterContract =
grainContract<CounterActor, string, CounterApi> {
grainType "counter"
version 1
stringKey
}
let increment (grainFactory: Orleans.IGrainFactory) =
task {
let api = FunctionalGrain.ref counterContract grainFactory "counter-1"
return! api.increment ()
}

The returned value has the exact API-record type.

The current package range starts at Orleans 10.1.0 and is tested against both 10.1.0 and 10.2.2. A NuGet lower bound means older 10.0.x versions are not selected.

Yes. journaledGrainFor supports Orleans log-consistency providers and typed custom storage. Snapshot policy can be configured globally and overridden per grain definition; the definition-level policy wins.

Do streams, broadcasts, timers, and reminders work on journaled grains?

Section titled “Do streams, broadcasts, timers, and reminders work on journaled grains?”

Yes. Journaled definitions support onStream, onBroadcast, onTimer, and onReminder with the same functional hooks as ordinary definitions. Event state changes still go through raised and confirmed events.

Yes. Declare a C# facade interface and bind it with FunctionalGrainInterop.For<TFacade>(contract, factory, key). C# receives normal task-returning methods and can consume streaming replies with await foreach.

How do F# actors appear in Orleans Dashboard?

Section titled “How do F# actors appear in Orleans Dashboard?”

The Dashboard activation table displays the functional manifest type, for example FunctionalGrainMarker<MyApp+CounterActor>. The actor brand is visible; API-record fields are transported through the shared functional dispatch operation. See Dashboard for a runnable example and the exact current display.

Terminal window
dotnet new install Orleans.FSharp.Templates
dotnet new orleans-fsharp -n MyApp

Then follow Getting Started.

Where is documentation for existing applications on the original API?

Section titled “Where is documentation for existing applications on the original API?”

It is retained under Legacy API, separate from current guides.

The library includes unit and live Orleans integration suites, dual-version CI coverage, wire-contract validation, persistence, transactions, event sourcing, streaming, reminders, timers, and production hosting helpers. As with any distributed runtime, validate storage providers, deployment topology, observability, and upgrade behavior against your own workload.

github.com/Neftedollar/orleans-fsharp