Dagrs: An easy-to-use, high-performance asynchronous task programming framework written in Rust

By Xiaolong Fu

Elevator Pitch

Dagrs is an easy-to-use, high-performance asynchronous task programming framework written in Rust. Dagrs follows the concept of Flow based Programming, and aims to provide users with convenient programming interface.

Description

Dagrs: An easy-to-use, high-performance asynchronous task programming framework written in Rust

Introduction

Dagrs is an easy-to-use, high-performance asynchronous task programming framework written in Rust. Dagrs follows the concept of Flow based Programming, and aims to provide users with convenient programming interfaces.

When you orchestrate multitasking applications asynchronously, you can make them scale better by reducing the cost of performing multiple operations simultaneously. However, writing correct & efficient asynchronous code and managing communication between different tasks can be a bit daunting for newcomers. Dagrs aims at providing convenient task abstraction, asynchronous running & communication mechanisms to reduce development costs.

History of Flow-based Programming

Flow-based Programming was invented by J. Paul Morrison in the early 1970s. It was initially implemented in software for a Canadian bank. Over the years, it’s had various names but has always maintained its core principles of reducing development time and managing processes efficiently.

FBP treats applications as networks of ‘black box’ processes that communicate by sending and receiving data, referred to as Information Packets, over predefined connections. It’s a component-oriented approach that fits well with modular software architecture.

Features of dagrs

  • “Black box” Processes: Encapsulated processes and information packets.
  • Independent Network Construction: The external definition of connections.
  • Asynchronism : Asynchronous execution of processes and asynchronous communication.
  • Ownership and Lifetime: Information packets with unique ownership and lifetime.
  • Bounded and Finite Connction: Connections between processes are bounded, with a finite capacity.
  • Reverse Pressure: Congestion control when there are too many packets to send or receive.

Technology & Libraries

Dagrs leverages the following cutting-edge technologies to ensure functionality and performance:

  • tokio - An event-driven, non-blocking I/O platform for writing asynchronous I/O backed applications.
  • async_trait - Type erasure for async trait methods.

Notes

Dagrs is currently under development with new features planned for 2025. For now, dagrs already has the features listed in the description above. For more details and updates, please visit our website.