Crates.io | paladin-core |
lib.rs | paladin-core |
version | 0.4.3 |
source | src |
created_at | 2023-10-23 18:51:49.1672 |
updated_at | 2024-10-15 16:30:35.833828 |
description | A Rust distributed algorithm toolkit. Write distributed algorithms without the complexities of distributed systems programming. |
homepage | |
repository | https://github.com/0xPolygonZero/paladin |
max_upload_size | |
id | 1011637 |
size | 216,658 |
Bringing divine order to distributed computation.
Paladin is a Rust library that aims to simplify writing distributed programs. It provides a declarative API, allowing developers to articulate their distributed programs clearly and concisely, without thinking about the complexities of distributed systems programming.
Below is a (contrived) example of how a typical Paladin program looks.
#[tokio::main]
async fn main() {
let stream = IndexedStream::from([1, 2, 3, 4, 5, 6, 7, 8, 9, 10]);
// Compute the fibonacci number at each element in the stream.
let fibs = stream.map(&FibAt);
// Sum the fibonacci numbers.
let sum = fibs.fold(&Sum);
// Run the computation.
let result = sum.run(&runtime).await.unwrap();
assert_eq!(result, 143);
}
In this example program, we define an algorithm for computing the fibonacci number at each element in a stream, after which we sum the results. Behind the scenes, Paladin will distribute the computations across the cluster and return the result back to the main thread.
Licensed under either of
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.