FAkka.Quotation.Actor
0.3.0-alpha2
dotnet add package FAkka.Quotation.Actor --version 0.3.0-alpha2
NuGet\Install-Package FAkka.Quotation.Actor -Version 0.3.0-alpha2
<PackageReference Include="FAkka.Quotation.Actor" Version="0.3.0-alpha2" />
<PackageVersion Include="FAkka.Quotation.Actor" Version="0.3.0-alpha2" />
<PackageReference Include="FAkka.Quotation.Actor" />
paket add FAkka.Quotation.Actor --version 0.3.0-alpha2
#r "nuget: FAkka.Quotation.Actor, 0.3.0-alpha2"
#:package FAkka.Quotation.Actor@0.3.0-alpha2
#addin nuget:?package=FAkka.Quotation.Actor&version=0.3.0-alpha2&prerelease
#tool nuget:?package=FAkka.Quotation.Actor&version=0.3.0-alpha2&prerelease
FAkka.Quotation.Actor
供可信開發環境使用的小型 F# Quotation hot-load package。client 透過 Akka.Delivery 依序要求 host:
- 使用 public key 封裝 managed DLL,host 以本機 encrypted private-key file 解密並載入。
- 以 key 註冊或原子取代
ActorSystem -> 'ResultQuotation。 - 依 key 執行並取得 typed result。
Runtime 固定使用 Akka/Akka.Remote 1.5.71,serializer identifier 為 198。此工具不提供 sandbox;只適用於 caller、host 與載入程式碼皆可信的開發環境。
最小流程:
let envelope =
match AssemblyEnvelope.create (AssemblyEnvelope.defaults publicKeyPath) dllBytes with
| Ok value -> value
| Error failure -> failwith failure.Message
let client = QuotationClient.start actorSystem (QuotationClientOptions.create "fsstl-live")
QuotationClient.submit client.Client (QuotationRequest.loadAssembly "load-1" replyPath envelope)
QuotationClient.submit client.Client (QuotationRequest.register "register-1" replyPath "strategy" <@ fun system -> createStrategy system @>)
QuotationClient.submit client.Client (QuotationRequest.execute "execute-1" replyPath "strategy")
每個 request 都會得到一個 terminal QuotationReply;worker 只接受 ConsumerController.Delivery<QuotationRequest>,不支援 direct Tell 繞過可靠傳遞。
Collectible unary generations(0.2.0-alpha2)
需要在同一 process side-by-side 載入同 simple-name implementation 時,application 可使用獨立的 local API;generic package 不知道 consumer 的 message、行情或交易型別:
let options =
CollectibleAssemblyLoadOptions.create
"generation-20260816-a"
absoluteDllPath
[| "FSharp.Core"; "Akka"; "Host.Contracts" |]
let generation =
CollectibleAssemblyLoading.loadFromFile options
|> Result.defaultWith (fun failure -> failwith failure.Message)
let quotation =
QuotationPayload.deserializeInContext generation.LoadContext pickledQuotation
|> Result.defaultWith (fun failure -> failwith failure.Message)
let registration =
UnaryQuotationRegistry.registerInContext
generation.LoadContext
generation.GenerationId
"node-a"
quotation
UnaryQuotationRegistry.empty
|> Result.defaultWith (fun failure -> failwith failure.Message)
UnaryQuotationRegistry.execute "node-a" input registration.Registry
|> Result.defaultWith (fun failure -> failwith failure.Message)
let retired =
UnaryQuotationRegistry.removeGeneration generation.GenerationId registration.Registry
CollectibleAssemblyLoading.requestUnload generation
主 DLL 先以 bytes 驗證、SHA-256 後由 memory stream 載入,因此 loader 不會持續鎖住來源 DLL;plugin-private dependencies 仍由 AssemblyDependencyResolver 從來源目錄解析。shared assembly 必須由 caller 明列,且只能解析成 default-context 已載入的同 simple-name assembly,避免 host contract 出現兩份 CLR type identity。
requestUnload 只是提出 collectible unload;application 必須先停止該 generation 建立的 ActorSystem、actor、timer,排空 in-flight call,並釋放 Expr/delegate/Type/Assembly references。是否完成可讀 LoadContextWeakReference,不得把 Unload() return 當成同步完成。
Compiled unary quotation(0.3.0-alpha2)
UnaryQuotationRegistry exact依賴FAkka.FSharp.Quotations.Evaluator 2.2.0-alpha2。註冊時會在指定contextual-reflection scope內evaluate quotation,並把exact input cast+F# function call一次compile成Action<obj>;執行時只做key lookup、CLR input type gate與compiled delegate invoke。
Release package automation
Release build會先產生exact FAkka.Quotation.Actor.<PackageVersion>.nupkg,再由本專案的PostBuildEvent.ps1將該exact package推送至NuGet.org並複製到repo既有lib-packs.txt指定位置。API key只從NUGET_API_KEY_FILE或既有本機key檔讀取,不會輸出。
需要只build/pack、不發布時使用:
dotnet build .\FAkka.Quotation.Actor.fsproj -c Release -p:PublishQuotationActorPackage=false
Debug build不發布;push、key或configured library-packs失敗都會令Release build明確失敗。
unsupported quotation會拒絕registration且保留既有binding;不會fallback到LeafExpressionConverter。這個更新不改v1 ActorSystem -> 'Result registry,compiled boundary只適用collectible unary API。
| 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
- Akka (= 1.5.71)
- Akka.Remote (= 1.5.71)
- FAkka.FSharp.Quotations.Evaluator (= 2.2.0-alpha2)
- FAkka.FsPickler (= 10.1.400)
- FSharp.Core (= 10.1.400)
- PulseTrade.Comm.Security (= 0.1.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.3.0-alpha2 | 74 | 9/4/2026 |
| 0.3.0-alpha1 | 92 | 8/16/2026 |