Bruteflow 1.0.0
See the version list below for details.
dotnet add package Bruteflow --version 1.0.0
NuGet\Install-Package Bruteflow -Version 1.0.0
<PackageReference Include="Bruteflow" Version="1.0.0" />
paket add Bruteflow --version 1.0.0
#r "nuget: Bruteflow, 1.0.0"
// Install Bruteflow as a Cake Addin #addin nuget:?package=Bruteflow&version=1.0.0 // Install Bruteflow as a Cake Tool #tool nuget:?package=Bruteflow&version=1.0.0
Bruteflow
Simple synchronous pipeline builder which supports well-known flowchart blocks (start, process, decision) and enhance them with additional blocks: distribute and batch. This is no way a replcement for Dataflow (Task Parallel Library). It uses another approach for building a pipeline.
Blocks
Any Bruteflow pipeline starts with HeadBlock block and ends with ActionBlock. Bruteflow with its extension methods help to build DAG pipeline.
The execution of the pipeline is synchroneous, but code inside blocks may be asynchroneous .
HeadBlock
Starting block of a pipeline. You can push data or specify a method which will produce series of data.
You need to specify a type which will be produced by the block.
ProcessBlock
The block receives and produces data. Type of incoming and outcoming data may be different.
DecisionBlock
The block which uses condition to route data to different branches. You need to specify the condition and use head or processing blocks to propogate data in the pipeline.
DistributeBlock
The block which broadcast incoming data to all following blocks which has been linked. Every following block will recevie same data.
BatchBlock
The block has internal state and stores data in bunches. In order to propogate data when batch is incomplete, you ned to flush the pipeline. Flushing will prpogate internal data further in the pipeline and clear internal states.
ActionBlock
The final block of the pipeline. It doesn't propogate and should be used as an ending block of the pipeline.
Examples
The construction of a pipeline with batch block, pushing values into the pipeline and reading results.
var result = new List<string>();
var head = new HeadBlock<string>();
head.Process((str, md) => str + "A")
.Batch(3)
.Process((str, md) => string.Join(',', str))
.Action((str, md) => result.Add(str));
head.Push("C", new PipelineMetadata());
head.Push("C", new PipelineMetadata());
head.Push("C", new PipelineMetadata());
// this one will be lost because of the batching
head.Push("C", new PipelineMetadata());
head.Flush();
result.Count.Should().Be(2);
result[0].Should().Be("CA,CA,CA");
result[1].Should().Be("CA");
More examples you can find in tests. Also you will find there similar tests written with Dataflow (Task Parallel Library)
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp3.1 is compatible. |
-
.NETCoreApp 3.1
- No dependencies.
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Bruteflow:
Package | Downloads |
---|---|
Bruteflow.Kafka
Package Description |
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated | |
---|---|---|---|
2.3.0 | 696 | 12/13/2020 | |
2.2.0 | 645 | 12/12/2020 | |
2.1.5 | 1,041 | 11/29/2020 | |
2.1.4 | 648 | 11/29/2020 | |
2.1.3 | 663 | 11/28/2020 | |
2.1.2 | 752 | 11/28/2020 | |
2.1.1 | 516 | 11/27/2020 | |
2.1.0 | 597 | 11/27/2020 | |
2.0.4 | 494 | 11/26/2020 | |
2.0.3 | 455 | 11/26/2020 | |
2.0.2 | 464 | 11/26/2020 | |
2.0.1 | 1,168 | 11/22/2020 | |
2.0.0 | 568 | 11/22/2020 | |
1.3.1 | 669 | 8/7/2020 | |
1.3.0 | 622 | 8/7/2020 | |
1.2.0 | 901 | 8/2/2020 | |
1.1.0 | 1,465 | 8/2/2020 |