async-wormhole
bastion
Our great sponsors
async-wormhole | bastion | |
---|---|---|
3 | 15 | |
108 | 2,759 | |
1.9% | 1.1% | |
0.0 | 0.0 | |
5 months ago | about 1 year ago | |
Rust | Rust | |
- | Apache License 2.0 |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
async-wormhole
-
A mini-Erlang/Elixir -- tell me if/why my idea sucks
Taking onto such a big project can be scary and overwhelming, so I like to "cheat" a bit. Instead of developing a M:N scheduler I picked an already mature and proven one from the Rust ecosystem: tokio. Then I just needed to develop a virtual stacks solution that works well with the scheduler. Instead of inventing my own byte-code I just picked WebAssembly, it's just a small abstraction above machine code and has mature JIT compiler libraries that generate code close to native speed. Then again, I just needed to figure out how to do reduction counting and insert preemption points into WebAssembly code during loading.
-
lunatic v0.5 released
Previously, we used our own implementation of virtual stacks and stack switching. Both (Wasmer & Wasmtime) Wasm runtimes we used internally required a tight integration with it, but neither library exposed the primitives to integrate well with it. So we needed to maintain forks of both runtimes with some patches to expose internal data structures. Just keeping up to date with new releases was taking way too much of my time. Stack switching is also a delicate task with a lot of hand written assembly involved and we would run into segfaults from time to time. Luckily Wasmtime shipped "native" async support that works similar to our implementation so we could switch to it. Re-writing was a pain, but I'm happy how everything has turned out and think that it was worth it.
-
Lunatic - An Erlang inspired runtime for all programming languages
Under the hood, Lunatic wraps "processes" inside of Rust async tasks with https://github.com/bkolobara/async-wormhole and can use any async executor to run them. We are currently using Smol's multithreaded executor, so it scales quite nicely across cores.
bastion
- Write Elixir NIFs in Rust
- Bastion – Highly-Available Distributed Fault-Tolerant Runtime for Rust
-
lunatic v0.9 released - Bringing Erlang's supervisors to Rust
How is this better / different than https://github.com/bastion-rs/bastion ?
-
Introspection in Erlang/BEAM-inspired Async-Rust-Executors?
There are attempts to implement an Erlang/BEAM-inspired reactor/runtime/executor/ecosystem for Rust's Async, in particular Bastion. (There are also Lumen, Lunatic and Async-Backplane/Async-Supervisor.)
- What is the current state of actor systems in Rust?
-
Announcing "Zestors": A simple, fast and flexible actor-framework
I would be interested in an example showing how to build a robust runtime like bastion with fault tolerance.
-
Async feedback from 2 years of usage
But the issue you're referring to, building a fault-tolerant web server where you can have granular control over killing background jobs regardless if they're blocked on a syscall, totally requires using this kind of software architecture. See Bastion.
-
Can one code different kind of multithreading paradigms in Rust (BEAM, Node, Go)?
Bastion, a Rust async runtime inspired by the beam distribution and supervision model
-
Linus Torvalds on Rust support in kernel
I don't really know much about erlang, but I think this may be along the lines of what you are thinking of: https://github.com/bastion-rs/bastion
(I also don't really think the linux kernel people would be interested...)
-
Lunatic - An Erlang inspired runtime for all programming languages
This reminds me of bastion. Looks like it attempts to fulfill the same needs, though I guess Lunatic has native WASM support whereas bastion might require some tweaking to have it work? Haven't worked with bastion, so that part of harder time with WASM is just a wild speculation. On the other hand bastion looks much more mature. Probably /u/vertexclique could give a more informed opinion about the difference between the two ;) I really like what these projects are putting forward.
What are some alternatives?
lunatic - Lunatic is an Erlang-inspired runtime for WebAssembly
actix - Actor framework for Rust.
flume - A safe and fast multi-producer, multi-consumer channel.
smol - A small and fast async runtime for Rust
cant - A programming argot
beam_languages - Languages, and about languages, on the BEAM
tiny-tokio-actor - A simple tiny actor library on top of Tokio
rustig - A tool to detect code paths leading to Rust's panic handler
riker - Easily build efficient, highly concurrent and resilient applications. An Actor Framework for Rust.
async-backplane - Simple, Erlang-inspired fault-tolerance framework for Rust Futures.
lumen - An alternative BEAM implementation, designed for WebAssembly