actix-telepathy

Cluster extension for actix

https://github.com/wenig/actix-telepathy

Science Score: 57.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 6 DOI reference(s) in README
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (8.2%) to scientific vocabulary

Keywords

actor-model rust
Last synced: 6 months ago · JSON representation ·

Repository

Cluster extension for actix

Basic Info
  • Host: GitHub
  • Owner: wenig
  • License: apache-2.0
  • Language: Rust
  • Default Branch: main
  • Homepage:
  • Size: 188 KB
Statistics
  • Stars: 75
  • Watchers: 3
  • Forks: 6
  • Open Issues: 3
  • Releases: 15
Topics
actor-model rust
Created over 5 years ago · Last pushed over 1 year ago
Metadata Files
Readme License Citation

README.md

crates.io Tests on main License Dependency Status Downloads

Actix-Telepathy

Inspired by actix-remote and Akka Cluster, Actix-Telepathy is an extension to the Rust actor framework Actix. It empowers Rust users to build distributed applications within the actor framework.

Version Matches

| actix | -telepathy | -telepathy-derive | |-------|------------|-------------------| | 0.10 | 0.1 | 0.1 | | 0.11 | 0.2 | 0.1 | | 0.12 | 0.3 | 0.2 | | 0.12 | 0.4 | 0.3 | | 0.13 | 0.5 | 0.3 | | 0.13.1 | 0.6.0 | 0.3.4 | | 0.13.5 | 0.6.1 | 0.3.4 |

Tests

Run ignored tests sequentially, because these tests run multiple threads themselves.

cargo test -- --ignored --test-threads=1

Usage

Connection Variants

We support the following two connection variants. They define how a node joins a cluster. Each comes with advantages and downsides. Choose carefully!

SingleSeed expects all nodes to have the same seed node (except the seed node itself, it has no seed node). If another node is added, it will be added to the cluster by the seed node. If a node has a different seed node, errors can occur. This variant is recommended for a fast connection setup, but it is not recommended if the seed node is not always available. (This variant is the default.)

Gossip can connect the nodes to each other. Each node can have a different seed node. When joining the cluster, the node will connect to its seed node and receives the number of nodes that are about to join. The seed node of that node will then send the joining node's information to the other nodes via the Gossip protocol. Thereby, the seed node randomly chooses 3 nodes and sends the information to them. These 3 nodes will connect to the joining node. Then the 3 nodes will send the information to 3 other nodes and so on. This variant is recommended if the seed node is not always available. This variant is not recommended if the cluster is very large, because the gossip protocol takes more time the larger the cluster is.

rust Cluster::new_with_connection_protocol("127.0.0.1:1992".parse().unwrap(), vec![/*...*/], ConnectionProtocol::Gossip)

Sending RemoteMessages

Actix supports do_send, try_send, and send for sending messages to an Addr<impl Actor>.

For RemoteMessages, this crate supports only do_send so far. Additionally, we introduce the wait_send method that returns a message response when the NetworkInterface has sent the RemoteMessage. This does not mean that the RemoteMessage arrived, only that it has been sent.

Ideas and discussion on how to implement a remote response and using the send method on RemoteAddr, please refer to the discussion page.

Cargo.toml

toml [dependencies] actix = "0.13.1" actix-telepathy = "0.6.1"

main.rs

```rust use actixrt; use actixtelepathy::prelude::; use actix::prelude::; use tokio; use std::net::{ToSocketAddrs, SocketAddr};

[actix_rt::main]

async fn main() { let bindaddr = "127.0.0.1:1992".parse().unwrap(); let seednodes = vec![]; let cluster = Cluster::new(bindaddr, seed_nodes);

tokio::signal::ctrl_c().await.unwrap();
println!("Ctrl-C received, shutting down");
System::current().stop();

} ```

Paper

We have written a paper about this project and conducted experiments to show its competitiveness with Akka and Orleans.

Please consider citing this work when you are using it!

bibtex @inproceedings{10.1145/3623506.3623575, author = {Wenig, Phillip and Papenbrock, Thorsten}, title = {Actix-Telepathy}, year = {2023}, isbn = {9798400704000}, publisher = {Association for Computing Machinery}, address = {New York, NY, USA}, url = {https://doi.org/10.1145/3623506.3623575}, doi = {10.1145/3623506.3623575}, abstract = {The actor programming model supports the development of concurrent applications by encapsulating state and behavior into independent actors. Each actor is a computational entity with strictly private state and behavior. Actors communicate via asynchronous messaging and, in this way, require neither shared memory nor locking. This makes the actor model suitable not only for parallel programming but also for distributed applications engineering. The Rust programming language is a statically-typed language that gained a lot of attention in the past years due to its efficient, economical and safe memory management. To ease the development of parallel applications, several actor model frameworks have been built for Rust. However, no actively maintained Rust actor framework provides the necessary features to write distributed applications. For this reason, we propose an extension for Rust’s Actix library, called Actix-Telepathy, that enables remote messaging and offers clustering support. It allows developers to setup remote actors that can communicate across a computer network with the help of a straight forward and easy to understand interface. Our evaluation demonstrates that Actix-Telepathy competes well in remote messaging performance and memory consumption with other actor libraries, such as Scala’s popular Akka library.}, booktitle = {Proceedings of the 10th ACM SIGPLAN International Workshop on Reactive and Event-Based Languages and Systems}, pages = {14–24}, numpages = {11}, keywords = {Distributed Computing, Rust, Actor Model}, location = {Cascais, Portugal}, series = {REBLS 2023} }

Owner

  • Name: Phillip Wenig
  • Login: wenig
  • Kind: user

Citation (CITATION.cff)

cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
  - family-names: Wenig
    given-names: Phillip
    orcid: https://orcid.org/0000-0002-8942-4322
  - family-names: Papenbrock
    given-names: Thorsten
    orcid: https://orcid.org/0000-0002-4019-8221
title: Actix-Telepathy
doi: 10.1145/3623506.3623575
booktitle: Proceedings of the 10th ACM SIGPLAN International Workshop on Reactive and Event-Based Languages and Systems
year: 2023
url: https://github.com/wenig/actix-telepathy

GitHub Events

Total
  • Watch event: 7
  • Fork event: 1
Last Year
  • Watch event: 7
  • Fork event: 1

Committers

Last synced: almost 3 years ago

All Time
  • Total Commits: 42
  • Total Committers: 3
  • Avg Commits per committer: 14.0
  • Development Distribution Score (DDS): 0.381
Past Year
  • Commits: 7
  • Committers: 2
  • Avg Commits per committer: 3.5
  • Development Distribution Score (DDS): 0.143
Top Committers
Name Email Commits
Phillip Wenig w****g@u****m 26
wenig i****o@p****e 15
wenig p****g@h****e 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 27
  • Total pull requests: 63
  • Average time to close issues: 7 months
  • Average time to close pull requests: 17 days
  • Total issue authors: 5
  • Total pull request authors: 2
  • Average comments per issue: 1.89
  • Average comments per pull request: 0.17
  • Merged pull requests: 62
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 1
  • Average time to close issues: N/A
  • Average time to close pull requests: 9 minutes
  • Issue authors: 0
  • Pull request authors: 1
  • Average comments per issue: 0
  • Average comments per pull request: 0.0
  • Merged pull requests: 1
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • wenig (17)
  • lucasmsoares96 (6)
  • Studiedlist (2)
  • idanarye (1)
  • uwesimm (1)
Pull Request Authors
  • wenig (62)
  • Studiedlist (1)
Top Labels
Issue Labels
enhancement (11) bug (4) 0.6.0 (4) prio_low (3) prio_high (2) 0.7.0 (2) wontfix (1)
Pull Request Labels
enhancement (9) 0.6.0 (3) bug (2) prio_low (1)

Packages

  • Total packages: 2
  • Total downloads:
    • cargo 36,526 total
  • Total dependent packages: 2
    (may contain duplicates)
  • Total dependent repositories: 6
    (may contain duplicates)
  • Total versions: 24
  • Total maintainers: 1
crates.io: actix_telepathy_derive

Macros for cluster extension for the actix actor framework

  • Versions: 8
  • Dependent Packages: 1
  • Dependent Repositories: 3
  • Downloads: 13,969 Total
Rankings
Dependent repos count: 11.6%
Stargazers count: 16.4%
Average: 17.9%
Dependent packages count: 18.2%
Forks count: 19.8%
Downloads: 23.4%
Maintainers (1)
Last synced: 6 months ago
crates.io: actix-telepathy

Cluster extension for the actix actor framework

  • Versions: 16
  • Dependent Packages: 1
  • Dependent Repositories: 3
  • Downloads: 22,557 Total
Rankings
Dependent repos count: 11.6%
Stargazers count: 16.4%
Average: 17.9%
Dependent packages count: 18.2%
Forks count: 19.8%
Downloads: 23.5%
Maintainers (1)
Last synced: 6 months ago

Dependencies

Cargo.toml cargo
  • actix =0.13.0
  • actix-broker 0.4.3
  • actix_telepathy_derive 0.3.0
  • byteorder 1.3
  • bytes 1
  • derive_more 0.99
  • env_logger 0.9
  • flexbuffers 2.0.0
  • futures 0.3
  • log 0.4
  • ndarray 0.15.4
  • once_cell 1.5.2
  • parking_lot 0.12
  • rand 0.8
  • serde 1.0
  • serde_derive 1.0
  • tokio 1.18
  • tokio-stream 0.1
  • tokio-util 0.7
  • trust-dns-proto 0.21.2
  • trust-dns-resolver 0.21.2
  • uuid 1.0
actix-telepathy-derive/Cargo.toml cargo
  • log 0.4
  • quote 1.0
  • serde 1.0
  • serde_derive 1.0
  • serde_yaml 0.8
  • syn 1.0.60
.github/workflows/audit.yml actions
  • actions-rs/audit-check v1 composite
  • actions/cache v3 composite
  • actions/checkout v3 composite
.github/workflows/rust.yml actions
  • actions-rs/cargo v1 composite
  • actions/cache v3 composite
  • actions/checkout v3 composite