All Projects → microsoft → Forge

microsoft / Forge

Licence: mit
A Generic Low-Code Framework Built on a Config-Driven Tree Walker

Programming Languages

csharp
926 projects

Projects that are alternatives of or similar to Forge

simple json
Simple way to dynamically convert from and to JSON using build-time generators given a type.
Stars: ✭ 15 (-78.57%)
Mutual labels:  dynamic, generic
Require Vuejs
RequireJS plugin to async and dynamic load and parse .vue components
Stars: ✭ 143 (+104.29%)
Mutual labels:  async, dynamic
Natasha
基于 Roslyn 的 C# 动态程序集构建库,该库允许开发者在运行时使用 C# 代码构建域 / 程序集 / 类 / 结构体 / 枚举 / 接口 / 方法等,使得程序在运行的时候可以增加新的模块及功能。Natasha 集成了域管理/插件管理,可以实现域隔离,域卸载,热拔插等功能。 该库遵循完整的编译流程,提供完整的错误提示, 可自动添加引用,完善的数据结构构建模板让开发者只专注于程序集脚本的编写,兼容 stanadard2.0 / netcoreapp3.0+, 跨平台,统一、简便的链式 API。 且我们会尽快修复您的问题及回复您的 issue.
Stars: ✭ 705 (+907.14%)
Mutual labels:  roslyn, dynamic
Peachpie
PeachPie - the PHP compiler and runtime for .NET and .NET Core
Stars: ✭ 1,945 (+2678.57%)
Mutual labels:  microsoft, roslyn
anchor
Create Dynamic CLI's as your GitOps Marketplace
Stars: ✭ 38 (-45.71%)
Mutual labels:  dynamic, generic
Meh
Python configuration files in Python. ¯\_(ツ)_/¯
Stars: ✭ 20 (-71.43%)
Mutual labels:  config, dynamic
Forge Server Utils
Tools for accessing Autodesk Forge APIs from modern Node.js apps.
Stars: ✭ 23 (-67.14%)
Mutual labels:  async, forge
Tis 3d
TIS-100 inspired low-tech computing in Minecraft.
Stars: ✭ 64 (-8.57%)
Mutual labels:  forge
Frost Dev
Fast Robot Optimization and Simulation Toolkit (FROST)
Stars: ✭ 67 (-4.29%)
Mutual labels:  dynamic
Frame Scheduling
Asynchronous non-blocking running many tasks in JavaScript. Demo https://codesandbox.io/s/admiring-ride-jdoq0
Stars: ✭ 64 (-8.57%)
Mutual labels:  async
Lily
LÖVE Async Asset Loader
Stars: ✭ 64 (-8.57%)
Mutual labels:  async
Flowa
🔥Service level control flow for Node.js
Stars: ✭ 66 (-5.71%)
Mutual labels:  async
Brawlstats
(A)sync python wrapper for the Brawl Stars API
Stars: ✭ 68 (-2.86%)
Mutual labels:  async
Promised Pipe
A ramda.pipe-like utility that handles promises internally with zero dependencies
Stars: ✭ 64 (-8.57%)
Mutual labels:  async
Loonflow
基于django的工作流引擎,工单(a workflow engine base on django python)
Stars: ✭ 1,153 (+1547.14%)
Mutual labels:  workflow-engine
Tslint Xo
TSLint shareable config for XO
Stars: ✭ 64 (-8.57%)
Mutual labels:  config
Enhanced Syntax Highlighting
[Marketplace] Lightweight "editor classifier extension" for Visual Studio based on the async Roslyn APIs to enhanced highlighting custom tags in C# code.
Stars: ✭ 69 (-1.43%)
Mutual labels:  roslyn
To.ml
OCaml library for TOML
Stars: ✭ 68 (-2.86%)
Mutual labels:  config
Flyte
Flyte binds together the tools you use into easily defined, automated workflows
Stars: ✭ 67 (-4.29%)
Mutual labels:  workflow-engine
Console Based Projects C
All projects are console based💻 and developed using C📚.All projects are dynamic and developed with the concept of Advance data structure 📁(Dynamic memory allocation,Linkedlist,Stack,Queue,Tree)✏️
Stars: ✭ 67 (-4.29%)
Mutual labels:  dynamic

Build Status

Microsoft.Forge.TreeWalker NuGet link

Please use the Issues tab for questions, feature requests, bug reports, etc.. Thank you!

What is Forge?

Forge is a generic low-code framework built on a config-driven tree walker. Forge is a great library for developers wanting to build and run their own low-code workflow engine from inside their application.

Similarities to other low-code solutions:

  • Walks a decision-tree-like structure that is defined in a JSON config file given by your application.
  • Executes actions and can use the results to decide which child node to visit next.
  • Edit config files through a UI experience.

Key Differentiators:

  • Runs directly in your application! No need to rely on outside services to run your workflows. Forge is a light-weight library that is easy to import and integrate into your application.

  • Define your own Actions. Forge makes it easy to write simple C# classes that can be executed as Actions from the tree.

  • Instantiate sessions with different state from your application depending on the trigger.

  • Give Forge scoped access into your application. Expose data models, internal classes, service clients, etc. to Forge and then access them directly from the tree.

  • Roslyn integration allows you to replace hardcoded JSON property values in the tree with C# code-snippets. Forge dynamically executes these at runtime to fetch realtime data. For example, fetch data from your application to give as input to an Action.

  • Calls back to your application with objects from the tree. Forge dynamically creates objects defined on the tree and passes them to callbacks and Actions. Callbacks before and after visiting each node provide more places to plug in code.

  • Built-in persistence interface allows tree walker sessions to rehydrate without missing a beat.

  • Facilitates ecosystem building with clearly differentiated contributors: application owner, tree authors, and action authors. Application owners can use Forge to build their own workflow framework for their service. Different teams can then use their framework to author actions and trees.

Forge components at a high-level

Forge has 3 major components: ForgeTree, TreeWalker, and ForgeEditor.

  • ForgeTree is the JSON data contract that defines the tree structure. It contains normal tree-concept objects such as TreeNodes and ChildSelectors, as well as TreeActions and other properties.

    In this example, the Container_TreeNode is an Action type node. It executes a CollectDiagnosticsAction with an Input object containing a Command property. The value of Command is set through a Roslyn expression that calls into the application to get the UserContext.GetCommand() result. In the child selector we see another Roslyn expression that gets the persisted action response, and visits the Tardigrade_TreeNode if the Status is successful.

"Container_TreeNode": {
    "Type": "Action",
    "Actions": {
        "Container_TreeAction": {
            "Action": "CollectDiagnosticsAction",
            "Input": {
                "Command": "C#|UserContext.GetCommand()"
            }
        }
    },
    "ChildSelector": [
        {
            "ShouldSelect": "C#|Session.GetLastActionResponse().Status == \"Success\"",
            "Child": "Tardigrade_TreeNode"
        }
    ]
}
  • TreeWalker takes in the ForgeTree and other parameters, and walks the tree to completion. It calls application-defined callbacks and actions, passing in dynamically evaluated properties from the ForgeTree. The TreeWalker makes decisions at runtime about the path it walks by utilizing Roslyn to evaluate C# code-snippets from the ForgeTree.

  • ForgeEditor is coming to GitHub soon (currently only available internally to Microsoft). ForgeEditor is an Electron application that allows you to visualize and edit the ForgeTree in a clean UI experience. It contains features such as: tree visualization, buttons to create/delete TreeNodes, auto-complete when editing JSON file, text highlighting when hovering over TreeNode, evaluates ForgeSchemaValidationRules while editing, Diagnose mode, etc..

Advantages of using Forge

  • Clarity: Allows users to intuitively walk a visualized tree and understand the workflow logic.
  • Versatility: Once you understand the tree, you can easily add or update nodes, actions, child selectors, paths, etc..
  • Extensibility: The dynamic objects and properties allow for new functionality to be seamlessly piped into the tree model. For example, adding rate limits to the BeforeVisitNode callback.
  • Velocity: Updating and deploying ForgeTree schema files is much quicker/easier than deploying code. Allows for hot-pushing updates while your application is running. New behaviors that would take weeks to add to legacy codebases turns into minutes/hours with Forge.
  • Debuggability: Add logging to the built-in callbacks before and after visiting each node and inside Actions. This allows users to view statistics on their historical data. Statistics can also be viewed in ForgeEditor as a heatmap to highlight "hot" nodes/paths.
  • Model Verification: It can be easy to typo an Action name or other property in the ForgeTree since they are JSON strings. To help with that, Forge includes the ForgeSchemaValidationRules.json file containing JSON schema rules for ForgeTrees. These rules can be augmented to contain application-specific properties/values, such as enforcing a set of known ForgeActions and ActionInputs. These rules are used in ForgeEditor to help auto-complete properties and highlight typos.
  • ***Stateful (optional)***: The IForgeDictionary is used to cache state while Forge walks the tree. This can be implemented by the application to be stateful if desired, but a Dictionary implementation is built-in. This allows applications to pick up where they left off after a failover.

User Story: Azure-Compute Repair Manager

Microsoft Azure-Compute's repair manager service is backed by Forge. Fault information is passed to the TreeWalker and a ForgeTree schema is walked. Depending on the type of fault and a handful of other checks, TreeWalker may attempt in-place recovery actions. If these actions were unsuccessful in mitigating the issue, diagnostics are collected and Tardigrade may be performed. You can read more about Azure’s recovery workflow in this blogpost: https://azure.microsoft.com/en-us/blog/improving-azure-virtual-machines-resiliency-with-project-tardigrade/

"The biggest (and unexpected) benefit of using Forge has been the democratization of contributors and the velocity of pushing updates. It used to take weeks to implement new features on the old service, and very few engineers had the expertise to make such changes. Since moving our repair workflows to Forge, new features/behaviors/paths are often added by teams that request them. This is possible because of the clarity that visualizing the tree brings. After initial ramp-up time, new contributors are then able to send code reviews out for changes within a day. They also basically become experts themselves and help onboard their teammates. It's magical! A cross-team ecosystem has been organically created and folks are eager to contribute."

Further Reading

Check out the Wiki pages for a deeper dive into Forge, as well as How-To guides!

For more high-level overview details, check out the ForgeOverview page.

Ready to get hands-on experience with Forge? Check out the Forge QuickStart Guide page.

Ready to dig a bit deeper? Check out the "How To:" guides for in-depth details for each group of contributors:

Contributing

Interested in contributing to Forge? Check out the Contributing page for details.

License

Copyright (c) Microsoft Corporation. All rights reserved.

Licensed under the MIT license.

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].