4 ms·
Please, can you share the rust library??
by imachine1980_ 4y ago
Please, can you share the rust library??
- linkdd 4y agoNot sure this is what GP is talking about but to implement the actor model in https://letlang.dev https://letlang.dev I use tokio.
- hosh 4y agoI don’t remember the name and I don’t remember if it is tokio or something else. However, I did find this: https://docs.rs/genserver/latest/genserver/ https://docs.rs/genserver/latest/genserver/ I will keep looking. Keep in mind, BEAM uses a preemptive actor rather than async, so it avoids the “storms” that can happen when an async reactor runs out of resources. EDIT: but I guess Tokio is capable of preemption through work-stealing too?
- hosh 4y agoThis looks interesting too, though no OTP out-of-the-box: https://docs.rs/axiom/latest/axiom/ https://docs.rs/axiom/latest/axiom/
- verdagon 4y agoCan you say more about these storms? Sounds pretty interesting. How does preempting solve it?
- hosh 4y agoI don't know Python or Rust well, but I think this is the problem: https://betterprogramming.pub/the-dangers-of-async-in-python-and-how-to-avoid-them-6e6f98f19f0e https://betterprogramming.pub/the-dangers-of-async-in-python... And this is how some people are solving it: https://async.rs/blog/stop-worrying-about-blocking-the-new-async-std-runtime/ https://async.rs/blog/stop-worrying-about-blocking-the-new-a... This is how it works in BEAM: https://github.com/happi/theBeamBook/blob/master/chapters/scheduling.asciidoc#preemptive-multitasking-in-erts-cooperating-in-c https://github.com/happi/theBeamBook/blob/master/chapters/sc... The commonality is to limit execution time and yield (preempt) so something else can run too.
- bkolobara 4y agoI'm the author of something related https://github.com/lunatic-solutions/lunatic https://github.com/lunatic-solutions/lunatic
- deleted 4y ago[deleted]