All Projects → deveel → dflow

deveel / dflow

Licence: MIT license
A lightweight library for designing and executing workflows in .NET Core

Programming Languages

C#
18002 projects
Batchfile
5799 projects

Projects that are alternatives of or similar to dflow

Lightgbm
A fast, distributed, high performance gradient boosting (GBT, GBDT, GBRT, GBM or MART) framework based on decision tree algorithms, used for ranking, classification and many other machine learning tasks.
Stars: ✭ 13,293 (+57695.65%)
Mutual labels:  parallel, decision-trees
useful-scripts
common useful script
Stars: ✭ 30 (+30.43%)
Mutual labels:  parallel
noroutine
Goroutine analogue for Node.js, spreads I/O-bound routine calls to utilize thread pool (worker_threads) using balancer with event loop utilization. 🌱
Stars: ✭ 86 (+273.91%)
Mutual labels:  parallel
sst-core
SST Structural Simulation Toolkit Parallel Discrete Event Core and Services
Stars: ✭ 82 (+256.52%)
Mutual labels:  parallel
stackgbm
🌳 Stacked Gradient Boosting Machines
Stars: ✭ 24 (+4.35%)
Mutual labels:  decision-trees
Voice4Rural
A complete one stop solution for all the problems of Rural area people. 👩🏻‍🌾
Stars: ✭ 12 (-47.83%)
Mutual labels:  decision-trees
java.math.expression.parser
java math expression parser is faster than JEP
Stars: ✭ 25 (+8.7%)
Mutual labels:  decision-trees
thread-pool
BS::thread_pool: a fast, lightweight, and easy-to-use C++17 thread pool library
Stars: ✭ 1,043 (+4434.78%)
Mutual labels:  parallel
SIMDArray
SIMD enhanced Array operations
Stars: ✭ 123 (+434.78%)
Mutual labels:  parallel
My Android Garage
A quick reference guide for Android development.
Stars: ✭ 66 (+186.96%)
Mutual labels:  activity
pyfuncol
Functional collections extension functions for Python
Stars: ✭ 32 (+39.13%)
Mutual labels:  parallel
raptor
General, high performance algebraic multigrid solver
Stars: ✭ 50 (+117.39%)
Mutual labels:  parallel
pwm
Parallel Wavelet Tree and Wavelet Matrix Construction
Stars: ✭ 17 (-26.09%)
Mutual labels:  parallel
video features
Extract video features from raw videos using multiple GPUs. We support RAFT and PWC flow frames as well as S3D, I3D, R(2+1)D, VGGish, CLIP, ResNet features.
Stars: ✭ 225 (+878.26%)
Mutual labels:  parallel
business-rules-motor-insurance
Hyperon - Motor Insurance Demo App. This is a sample application to demonstrate capabilities of Hyperon.io library (Java Business Rules Engine (BRE)/Java Pricing Engine). The application demonstrates responsive quotations for Car/Motor Insurance based on decision tables and Rhino functions (for math calculations). It shows different possible bus…
Stars: ✭ 16 (-30.43%)
Mutual labels:  decision-trees
Galaxy
Galaxy is an asynchronous parallel visualization ray tracer for performant rendering in distributed computing environments. Galaxy builds upon Intel OSPRay and Intel Embree, including ray queueing and sending logic inspired by TACC GraviT.
Stars: ✭ 18 (-21.74%)
Mutual labels:  parallel
Linux-Kernel-Driver-Programming
Implementation of PCI drivers, kprobe, sysfs, devfs, sensor driver, miscdevices, synchronization
Stars: ✭ 43 (+86.96%)
Mutual labels:  parallel
machine-learning-data-pipeline
Pipeline module for parallel real-time data processing for machine learning models development and production purposes.
Stars: ✭ 22 (-4.35%)
Mutual labels:  parallel
malib
A parallel framework for population-based multi-agent reinforcement learning.
Stars: ✭ 341 (+1382.61%)
Mutual labels:  parallel
navigator
Annotation processor that eliminates navigation and Bundle boilerplate
Stars: ✭ 13 (-43.48%)
Mutual labels:  activity

Build status MyGet NuGet

DFlow

This is a lightweight library, with no aim to be an enterprise-level solution, to easily design in-code workflows to operate from an initial state to a final state.

Install

Workflows

The workflow model offered by DFlow is simple and is read-only: once defined the workflow model is immutable.

Worflow
+- Activity1
+- Activity2
+- Branch1
+--- Branch-Activity1
+--- Branch-Activity2

A workflow is designed as a container of activities and follows a sequential order of execution (that means, the result of an activity is the input of the next activity) Branches to the workflow can be defined with other strategies of execution (the provided ones are parallel and sequential)

Activities

Activities are structured in a decision-tree model

  • Is the activity executable given the current state?
  • Execute the activity and return a new state next to the current

There are four kind of pre-defined activities in DFlow

  1. Execution Activity: is the foundation activity for decision making and executing of a step of the workflow. In fact, all other activities derive from this
  2. Branch Activity: creates a branch of activities to execute within a workflow or othr branches
  3. Merge Activity: an activitiy that merges the resulting state of a parallel executed branch, using a strategy defined by the user, to come out with a single result
  4. Repeat Activity: given a decisor (a logic to evaluate the current state), this activity repeat the current branch until the condition of the decisor is met (much like a do-while logic)

It is possible to implement new activities using the library: in fact all the activities derive from the Execution Activity

Example Code

It is possible to implement flows with two strategy of coding:

  1. Direct Moderling: define instances of the workflow and its steps
  2. Dynamic Building Modeling: define the workflows and steps in a virtual building process (useful for later activation of components)
/// Simple workflow builder
var builder = Workflow.Build(workflow => workflow               // 1.
    .Activity<Emit>()                                           // 2.
    .Activity(activity => activity                              // 3.
        .Named("do")                                            // 4.
        .If(state => state.Value is bool && (bool)c.Value)      // 5.
        .Execute(state => {                                     // 6.
            Console.WriteLine("Hello!"); 
         })
     .Branch(branch => branch                                   // 7.
        .Named("branch1")                                       // 8.
        .InParallel()                                           // 9.
        .Activity<PActivity1>()                                 // 10.
        .Activity<PActivity2>())
     .Merge(BranchMergeStrategy.Instance));                     // 11.
        
var workflow = builder.Build();                                 // 12.

Th code above gives a general idea of a building model, and the possibilities are many more than those presented above, but in the specific:

  1. The factory of a workflow builder
  2. Defines a reference to a user-defined activity Emit, derived by Activity or implementing IActivity
  3. Defines dynamically an activity using a builder
  4. Gives the name ("do") to the dynamically defined activity: an activity should always be named and activity builders require the definition of the name
  5. Specifies a condition to met for the activity to be executed: it takes a State object ar input
  6. The code to be executed if the condition is met: this overload takes a State parameter and is executed synchronously; other overloads allow to execute asynchronous operations and provide a CancellationToken parameter
  7. Creates a branch within the workflow
  8. Gives a name to the branch: being components of a workflow, branches should be named (the builder model requires the specification of a name for branches)
  9. Defines the strategy of execution of the branch: by default, the strategy applies is Sequential, so it is possible to change it to other strategies
  10. Attaches a user-defined activity PActivity1 to the branch that will be executed in parallel with the other activities
  11. Because the branch execution strategy defined is Parallel, the resulting State will be a container of the states resulted from the parallel execution of the activities in the branch; this activity merges the states into a single state, using a user-defined strategy (BranchMergeStrategy.Instance) for merging the values of the states
  12. The builder builds a Workflow object using a default IBuildContext (that constructs Activity references with a simple constructor): to build workflows with more advanced service resolving, a new implemenation of IBuildContext is required.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].