3939
4040---
4141
42- # ** Echo** 📣 A Resilient, High-Performance Task Scheduler for Rust
42+ # ** Echo** 📣
43+
44+ A Resilient, High-Performance Task Scheduler for Rust
4345
4446[ ![ License: CC0-1.0] ( https://img.shields.io/badge/License-CC0_1.0-lightgrey.svg )] ( https://github.com/CodeEditorLand/Echo/tree/Current/LICENSE )
4547[ ![ Crates.io] ( https://img.shields.io/crates/v/Echo.svg )] ( https://crates.io/crates/Echo )
@@ -52,37 +54,34 @@ scheduler**. It is designed to be the core execution engine for application
5254backends like ` Mountain ` , integrating seamlessly with declarative systems like
5355the ` ActionEffect ` pattern. ** Echo** moves beyond simple task spawning
5456(` tokio::spawn ` ) to provide a robust framework for managing, prioritizing, and
55- executing complex asynchronous workflows with resilience and efficiency .
57+ executing complex asynchronous workflows.
5658
5759** Echo** is engineered to:
5860
59- 1 . ** Provide High-Performance Concurrency:** Utilizes a lock-free,
60- work-stealing queue (` crossbeam-deque ` ) to ensure all worker threads remain
61- busy, maximizing CPU utilization and application throughput.
62- 2 . ** Enable Structured Task Management:** Offers a clean API for submitting
63- tasks with different priorities, allowing critical, UI-blocking operations
64- to pre-empt background work.
65- 3 . ** Integrate Natively with Effect Systems:** Designed from the ground up to
66- be the execution backend for systems like the ` ActionEffect ` pattern,
67- providing a bridge between declarative task definitions and their concrete
68- execution.
61+ 1 . ** Provide High-Performance Concurrency:** Utilizes a lock-free, work-stealing
62+ queue (` crossbeam-deque ` ) to ensure all worker threads remain busy,
63+ maximizing CPU utilization and application throughput.
64+ 2 . ** Enable Structured Task Management:** Offers a clean API for submitting
65+ tasks with different priorities, allowing critical, UI-blocking operations to
66+ pre-empt background work.
67+ 3 . ** Integrate Natively with Effect Systems:** Designed from the ground up to be
68+ the execution backend for systems like the ` ActionEffect ` pattern, providing
69+ a bridge between declarative task definitions and their concrete execution.
6970
7071---
7172
72- ## Key Features 🔐
73+ ## Key Features 🔐
7374
74- - ** Work-Stealing Scheduler:** Implements a modern, priority-aware work-stealing
75- algorithm to efficiently distribute tasks across a pool of worker threads.
75+ - ** Work-Stealing Scheduler:** A modern, priority-aware work-stealing algorithm
76+ that efficiently distributes tasks across a pool of worker threads.
7677- ** Task Prioritization:** Supports submitting tasks with ` High ` , ` Normal ` , or
77- ` Low ` priority, ensuring that latency-sensitive operations are handled
78- immediately.
79- - ** Fluent Builder API:** A clean ` SchedulerBuilder ` allows for easy
80- configuration of the worker pool size.
81- - ** Graceful Shutdown:** Provides a ` Stop() ` method to ensure all worker threads
82- complete their current tasks and exit cleanly, preventing orphaned threads.
78+ ` Low ` priority, ensuring latency-sensitive operations are handled immediately.
79+ - ** Fluent Builder API:** A clean ` SchedulerBuilder ` allows easy configuration
80+ of the worker pool size.
81+ - ** Graceful Shutdown:** A ` Stop() ` method ensures all worker threads complete
82+ their current tasks and exit cleanly, preventing orphaned threads.
8383- ** Decoupled Architecture:** A generic ` Queue ` module provides the core
84- work-stealing logic, which is consumed by the application-specific
85- ` Scheduler ` .
84+ work-stealing logic, consumed by the application-specific ` Scheduler ` .
8685
8786---
8887
@@ -98,17 +97,18 @@ executing complex asynchronous workflows with resilience and efficiency.
9897
9998---
10099
101- ## Deep Dive & Component Breakdown 🔬
100+ ## Deep Dive & Component Breakdown 🔬
102101
103- To understand how ` Echo ` 's internal components interact to provide these
104- services, please refer to the detailed technical breakdown in
102+ To understand how ` Echo ` 's internal components interact, please refer to the
103+ detailed technical breakdown in
105104[ ` Documentation/GitHub/DeepDive.md ` ] ( https://github.com/CodeEditorLand/Echo/tree/Current/Documentation/GitHub/DeepDive.md ) .
105+
106106This document explains the roles of the ` Task ` , ` StealingQueue ` , ` Worker ` , and
107107` Scheduler ` in detail.
108108
109109---
110110
111- ## ` Echo ` in the Land Ecosystem 📣 + 🏞️
111+ ## ` Echo ` in the Land Ecosystem 📣 + 🏞️
112112
113113This diagram illustrates ` Echo ` 's role as the core execution engine within the
114114` Mountain ` backend.
@@ -148,7 +148,7 @@ graph LR
148148
149149---
150150
151- ## Project Structure Overview 🗺️
151+ ## Project Structure Overview 🗺️
152152
153153The ` Echo ` repository is organized into a few core modules with a clear
154154separation of concerns:
@@ -164,9 +164,9 @@ Echo/
164164
165165---
166166
167- ## Getting Started 🚀
167+ ## Getting Started 🚀
168168
169- ### Installation 📥
169+ ### Installation 📥
170170
171171To add ` Echo ` to your project, add the following to your ` Cargo.toml ` :
172172
@@ -183,14 +183,14 @@ Echo = { git = "https://github.com/CodeEditorLand/Echo.git", branch = "Current"
183183- ` log = "*" `
184184- ` num_cpus = "*" `
185185
186- ### Usage 🚀
186+ ### Usage 🚀
187187
188188` Echo ` is designed to be integrated into an application's main entry point and
189189used throughout the application, often via a shared context or runtime.
190190
191- 1 . ** Initialize the Scheduler:** Create and start the scheduler when your
192- application starts. It is typically wrapped in an ` Arc ` to be shared safely
193- across your application.
191+ 1 . ** Initialize the Scheduler:** Create and start the scheduler when your
192+ application starts. It is typically wrapped in an ` Arc ` to be shared safely
193+ across your application.
194194
195195``` rust
196196// In your application's main function
@@ -204,8 +204,8 @@ use Echo::Task::Priority;
204204let Scheduler = Arc :: new (SchedulerBuilder :: Create (). WithWorkerCount (8 ). Build ());
205205```
206206
207- 2 . ** Submit Tasks:** Use the ` Scheduler ` instance to submit asynchronous work
208- from anywhere in your application.
207+ 2 . ** Submit Tasks:** Use the ` Scheduler ` instance to submit asynchronous work
208+ from anywhere in your application.
209209
210210``` rust
211211// An example async block to be run by the scheduler
@@ -226,8 +226,8 @@ Scheduler.Submit(MyTask, Priority::Normal);
226226Scheduler . Submit (async { /* critical work */ }, Priority :: High );
227227```
228228
229- 3 . ** Graceful Shutdown:** Before your application exits, ensure a clean
230- shutdown of all worker threads.
229+ 3 . ** Graceful Shutdown:** Before your application exits, ensure a clean shutdown
230+ of all worker threads.
231231
232232``` rust
233233// In your application's shutdown sequence
@@ -241,9 +241,9 @@ if let Ok(mut Scheduler) = Arc::try_unwrap(Scheduler) {
241241
242242---
243243
244- ## Help Us Boost Performance: A Call for Contributions! 🫱🏻🫲🏿
244+ ## Help Us Boost Performance: A Call for Contributions! 🫱🏻🫲🏿
245245
246- ` Echo ` is built on a high-performance foundation, but there's always room to
246+ ` Echo ` is built on a high-performance foundation, but there is always room to
247247push the boundaries of speed and efficiency. We maintain a detailed roadmap of
248248features and performance optimizations, with tasks suitable for all skill
249249levels.
@@ -255,7 +255,7 @@ levels.
255255| ** Expert Tuning** | Build a ` criterion ` benchmark suite; implement CPU pinning. |
256256| ** Advanced Logic** | Introduce an anti-starvation mechanism for tasks. |
257257
258- ** Interested in tackling one of these challenges?** 👉🏻
258+ ** Interested in tackling one of these challenges?** 👉🏻
259259
260260- ** [ Check out our full TODO] ( https://github.com/CodeEditorLand/Echo/tree/Current/Documentation/GitHub/Todo.md ) **
261261 for challenges!
@@ -267,9 +267,11 @@ levels.
267267## License ⚖️
268268
269269This project is released into the public domain under the ** Creative Commons CC0
270- Universal** license. You are free to use, modify, distribute, and build upon
271- this work for any purpose, without any restrictions. For the full legal text,
272- see the [ ` LICENSE ` ] ( https://github.com/CodeEditorLand/Echo/tree/Current/ ) file.
270+ Universal** license.
271+
272+ You are free to use, modify, distribute, and build upon this work for any
273+ purpose, without any restrictions. For the full legal text, see the
274+ [ ` LICENSE ` ] ( https://github.com/CodeEditorLand/Echo/tree/Current/ ) file.
273275
274276---
275277
@@ -289,6 +291,11 @@ through [NGI0 Commons Fund](https://NLnet.NL/commonsfund), a fund established by
289291[ Next Generation Internet] ( https://ngi.eu ) program. Learn more at the
290292[ NLnet project page] ( https://NLnet.NL/project/Land ) .
291293
294+ The project is operated by PlayForm, based in Sofia, Bulgaria.
295+
296+ PlayForm acts as the open-source steward for Code Editor Land under the NGI0
297+ Commons Fund grant.
298+
292299<table >
293300 <thead>
294301 <tr>
0 commit comments