![]() |
VOOZH | about |
dotnet add package Mostlylucid.Ephemeral.Atoms.WaveOrchestrator --version 2.6.3
NuGet\Install-Package Mostlylucid.Ephemeral.Atoms.WaveOrchestrator -Version 2.6.3
<PackageReference Include="Mostlylucid.Ephemeral.Atoms.WaveOrchestrator" Version="2.6.3" />
<PackageVersion Include="Mostlylucid.Ephemeral.Atoms.WaveOrchestrator" Version="2.6.3" />Directory.Packages.props
<PackageReference Include="Mostlylucid.Ephemeral.Atoms.WaveOrchestrator" />Project file
paket add Mostlylucid.Ephemeral.Atoms.WaveOrchestrator --version 2.6.3
#r "nuget: Mostlylucid.Ephemeral.Atoms.WaveOrchestrator, 2.6.3"
#:package Mostlylucid.Ephemeral.Atoms.WaveOrchestrator@2.6.3
#addin nuget:?package=Mostlylucid.Ephemeral.Atoms.WaveOrchestrator&version=2.6.3Install as a Cake Addin
#tool nuget:?package=Mostlylucid.Ephemeral.Atoms.WaveOrchestrator&version=2.6.3Install as a Cake Tool
๐จ๐จ WARNING ๐จ๐จ - Though in the 2.x range of version THINGS WILL STILL BREAK. This is the lab for developing this concept when stabilized it'll become the first styloflow release ๐จ๐จ๐จ
Wave-based parallel orchestrator with circuit breaker, early exit, and per-wave parallelism control.
dotnet add package mostlylucid.ephemeral.atoms.waveorchestrator
using Mostlylucid.Ephemeral.Atoms.WaveOrchestrator;
var sink = new SignalSink();
// Define workers in waves
var workers = new[]
{
// Wave 0 - Fast operations (run in parallel)
new WaveWorker<string, string>("FastCheck1", wave: 0, priority: 10,
async (input, ct) => await FastValidation(input, ct)),
new WaveWorker<string, string>("FastCheck2", wave: 0, priority: 20,
async (input, ct) => await QuickLookup(input, ct)),
// Wave 1 - Slower operations (only if Wave 0 doesn't early-exit)
new WaveWorker<string, string>("SlowCheck", wave: 1, priority: 10,
async (input, ct) => await DetailedAnalysis(input, ct)),
// Wave 2 - Expensive AI/ML (only if really needed)
new WaveWorker<string, string>("AI", wave: 2, priority: 10,
async (input, ct) => await ExpensiveAI(input, ct))
};
await using var orchestrator = new WaveOrchestratorAtom<string, string>(
workers,
new WaveOrchestratorOptions
{
MaxParallelPerWave = 4,
ParallelismPerWave = { [0] = 8, [1] = 4, [2] = 1 }, // Adaptive parallelism
EarlyExitCondition = result => result.Contains("DEFINITIVE_ANSWER"),
CircuitBreakerThreshold = 3
},
sink
);
var result = await orchestrator.ExecuteAsync("my-input");
Console.WriteLine($"Completed: {result.CompletedWorkers.Count} workers");
Console.WriteLine($"Failed: {result.FailedWorkers.Count} workers");
Console.WriteLine($"Duration: {result.TotalDurationMs}ms");
Execute workers in ordered waves. Within each wave, workers run in parallel. Between waves, execution is sequential.
Configure different parallelism levels per wave:
Stop processing when a condition is met. Save resources by skipping remaining waves when answer is found early.
Automatically disable failing workers after threshold. Half-open retry after cooldown period.
All execution emitted as signals:
wave.orchestrator.startedwave.started:wave={N}:workers={count}worker.started:{name}worker.completed:{name}:duration={ms}worker.failed:{name}:error={message}circuit.opened:{name}:failures={count}wave.early_exit:wave={N}new WaveOrchestratorOptions
{
// Total timeout for entire orchestration
// Default: 5 seconds
TotalTimeout = TimeSpan.FromSeconds(5),
// Timeout per individual worker
// Default: 2 seconds
WorkerTimeout = TimeSpan.FromSeconds(2),
// Delay between waves
// Default: 50ms
WaveInterval = TimeSpan.FromMilliseconds(50),
// Maximum parallel workers per wave (global default)
// Default: 4
MaxParallelPerWave = 4,
// Per-wave parallelism overrides
// Key = wave number, Value = max parallel for that wave
// Default: empty (uses MaxParallelPerWave for all waves)
ParallelismPerWave = new Dictionary<int, int>
{
[0] = 8, // Wave 0: 8 parallel
[1] = 4, // Wave 1: 4 parallel
[2] = 1 // Wave 2: 1 parallel (AI/LLM)
},
// Consecutive failures before circuit breaker opens
// Default: 3
CircuitBreakerThreshold = 3,
// Time before retrying a circuit-broken worker
// Default: 30 seconds
CircuitBreakerResetTime = TimeSpan.FromSeconds(30),
// Early exit condition - stop processing if true
// Default: null (no early exit)
EarlyExitCondition = result => result.Confidence > 0.9
}
Inspired by BotDetection's blackboard orchestrator - optimize for the 99% case while handling edge cases.
var workers = new[]
{
// Wave 0: Pattern matching (<1ms each)
new WaveWorker<Request, BotResult>("UserAgent", 0, 10, CheckUserAgent),
new WaveWorker<Request, BotResult>("Headers", 0, 20, CheckHeaders),
// Wave 1: Lookups (1-10ms each)
new WaveWorker<Request, BotResult>("IPReputation", 1, 10, CheckIP),
new WaveWorker<Request, BotResult>("Behavioral", 1, 20, CheckBehavior),
// Wave 2: Analysis (10-50ms)
new WaveWorker<Request, BotResult>("Inconsistency", 2, 10, CrossCheck),
// Wave 3: AI (100-500ms) - only for uncertain cases
new WaveWorker<Request, BotResult>("LLM", 3, 10, AskAI)
};
var options = new WaveOrchestratorOptions
{
ParallelismPerWave = { [0] = 8, [1] = 4, [2] = 2, [3] = 1 },
EarlyExitCondition = r => r.Confidence > 0.95 || r.Confidence < 0.05,
TotalTimeout = TimeSpan.FromMilliseconds(150)
};
// Most requests exit at Wave 0 (definitive bot or definitive human)
// Uncertain requests proceed to later waves for deeper analysis
var workers = new[]
{
// Wave 0: Load and validate
new WaveWorker<string, ProcessedData>("Load", 0, 10, LoadData),
new WaveWorker<string, ProcessedData>("Validate", 0, 20, ValidateSchema),
// Wave 1: Transform (parallel for different transformations)
new WaveWorker<string, ProcessedData>("Transform1", 1, 10, Transform1),
new WaveWorker<string, ProcessedData>("Transform2", 1, 10, Transform2),
new WaveWorker<string, ProcessedData>("Transform3", 1, 10, Transform3),
// Wave 2: Aggregate results
new WaveWorker<string, ProcessedData>("Aggregate", 2, 10, AggregateResults),
// Wave 3: Save
new WaveWorker<string, ProcessedData>("Save", 3, 10, SaveToDatabase)
};
Fast-path validation โ slow-path deep analysis โ expensive AI classification
Data loading โ parallel feature extraction โ model inference โ aggregation
Quick checks (card BIN, IP) โ behavioral analysis โ ML model scoring
Fast keyword scan โ image analysis โ LLM-based nuanced review
Try primary cloud โ failover to secondary โ tertiary fallback with circuit breakers
Wave Execution Overhead: ~50-100ยตs per wave transition Circuit Breaker Check: <1ยตs per worker Signal Emission: ~1.2ยตs per signal (790K+ signals/sec)
Typical Bot Detection Pipeline:
Result: 99% of requests complete in <1ms, 1% that need deep analysis take 25-200ms
| Package | Description |
|---|---|
| mostlylucid.ephemeral | Core library |
| mostlylucid.ephemeral.atoms.priorityprocessor | Priority-based failover |
| mostlylucid.ephemeral.atoms.retry | Retry with backoff |
| mostlylucid.ephemeral.patterns.circuitbreaker | Circuit breaker |
| mostlylucid.ephemeral.complete | All in one DLL |
Unlicense (public domain)
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 net8.0 is compatible. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 is compatible. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 is compatible. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
Showing the top 1 NuGet packages that depend on Mostlylucid.Ephemeral.Atoms.WaveOrchestrator:
| Package | Downloads |
|---|---|
|
mostlylucid.ephemeral.complete
Meta-package that references all Mostlylucid.Ephemeral packages - bounded async execution with signals, atoms, and patterns. Install this single package to get everything. |
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 2.6.3 | 95 | 5/22/2026 |
| 2.6.2 | 103 | 5/22/2026 |
| 2.6.0 | 104 | 5/22/2026 |
| 2.5.1 | 96 | 5/22/2026 |
| 2.5.0 | 97 | 5/3/2026 |
| 2.4.0 | 108 | 4/17/2026 |
| 2.3.2 | 126 | 1/9/2026 |
| 2.3.1 | 131 | 1/9/2026 |
| 2.3.1-alpha0 | 118 | 1/9/2026 |
| 2.3.0 | 1,205 | 1/8/2026 |
| 2.3.0-alpha1 | 115 | 1/8/2026 |
| 2.1.0 | 126 | 1/8/2026 |
| 2.1.0-preview | 122 | 1/8/2026 |
| 2.0.1 | 126 | 1/8/2026 |
| 2.0.0 | 170 | 1/8/2026 |
| 2.0.0-alpha1 | 119 | 1/8/2026 |
| 1.7.1 | 451 | 12/11/2025 |