7 ms·
Sorry for being so negative but why do people keep building these Actor frameworks for Rust? None of them get any usage.
by rapsey 2y ago
Sorry for being so negative but why do people keep building these Actor frameworks for Rust? None of them get any usage.
- bowsamic 2y agoIt’s kind of like Java. It’s a way to feel like you’re doing work without actually doing anything
- rochak 2y agoCouldn’t have said it any better myself
- vdvsvwvwvwvwv 2y agoExcept it makes no sense. Java is a language that, while idiomatically a bit boilerplatey, is generally a workhorse for getting shit done.
- bowsamic 2y agoNo I mean in Java it’s common to write extensive boilerplate and abstractions just bc it feels constructive. Java is extremely useful, but business use of it is not so nice
- ahoka 2y agoIt’s everything but that. It’s the instrument of over engineering. Maybe not the language itself (it was the Rust if its time, everyone wanted to use it for everything, even if it made no sense), but the whole ecosystem just prefers complexity and breaking changes. Maybe it’s a coping mechanism for devs stuck with it, or I don’t know.
- Ygg2 2y ago> it's the instrument of over engineering. True, but find me one language that someone, somewhere didn't over- something. Either over-engineer or over-simplify, or over-use. People get excited about technology and try to push the envelope on its usage. That's true of any widely used tech. Hitting the golden middle is notoriously hard, especially when it is not the same middle for everyone. > the whole ecosystem What precisely do you mean? Sure Spring is notorious for this, but not the wider ecosystem. Sure some libraries might not be using SemVer, but Maven itself predates it as well.
- pjmlp 2y agoWell my phone, TV and blue ray player do lots of useful stuff.
- ahoka 2y agoDisplaying ads?
- pjmlp 2y agoPowered by Java, in an a market share Desktop Linux will never achieve.
- talldayo 2y agoLinux has a license that protects it from the class of no-holds-barred codebase abuse Java suffers from, for one.
- pjmlp 2y agoApparently OEMs aren't aware of such marvel.
- talldayo 2y agoThey check in periodically, mostly for posterity: https://github.com/teslamotors/linux https://github.com/teslamotors/linux Nobody can blame them for choosing the right tool for the job, but many held them in contempt for license violation.
- seanhunter 2y agoFor reasonable reasons in my view. The actor model is imo a great way of doing concurrency in the absence of the data race guarantee that safe rust provides at compile time. If you know you have no data races, I don't think actors give you that much. That said, some people just really like actors as a mental model and/or they want to interoperate with actor-based systems written in other languages or provide an actor substrate written in rust that will be embedded into another language perhaps? It's definitely a niche usage.
- t-writescode 2y ago> That said, some people just really like actors as a mental model This is me, for sure. "little box does one thing, processes one thing at a time, maintains the state of one thing, talks to different pieces of the system through this predefined method", etc, that actors give me is very easy for me to reason about and work with, so I use it and love it.
- deleted 2y ago[deleted]
- biorach 2y ago> None of them get any usage. Github stats show some uptake so clearly someone finds them useful
- dietr1ch 2y agoI don't think it's a good metric, does it get stars because it's cool, or because people are building things with it while taking advantage of the Actor model?
- babo 2y agoThis seems to be used at Meta: "Ractor had a session at RustConf’24 about how it’s used for distributed overload protection in Rust Thrift servers at Meta."
- JW_00000 2y agoTheir presentation [1] contains a few slides with the motivation for this framework (they have existing Thrift services in C++ and Python, and want to start using Rust too) and why actors (answer: they scale better than a naive solution?). Also a slide "why a new framework" when so many already exist for Rust. (Answer: many are dead/unsupported, are too far from Erlang principles, not flexible enough, or use custom runtimes while ractor builds on Tokio.) [1] https://slawlor.github.io/ractor/assets/rustconf2024_presentation.pdf https://slawlor.github.io/ractor/assets/rustconf2024_present...
- mtndew4brkfst 2y agoTiny bit of context I'd also call out is that one of the primary authors comes from WhatsApp IIRC, with an extensive Erlang background.
- carlmr 2y agoIf you've ever used an ML descendant you'll miss sum types wherever you go. If you've ever used Erlang you'll miss the OTP actor implementation wherever you go.
- lordofgibbons 2y agoI have good news for you, Gleam, built on top of Erlang, supports sum types
- snowboarder63 2y agoYeah I do lol. It was the big motivation since we were writing more and more rust and missed the concurrency model. Please feel free to ping me for any further questions It's come a long way since it started and I'm thrilled I can talk about it publicly now and it's usage at Meta (some at least lol).
- stefanka 2y agoCan it be used for distributed computation for ML or data science tasks (eg., like what dask does for Python)?
- jerf 2y agoActors are better suited for highly heterogeneous task sets, where am actor or small set of them correspond to some task and you may have thousands or more. Homogenous tasks should use an approach that is aware of and takes advantage of the homogeneity, e.g., the sort of specific optimizations a framework might make to orchestrate data flows to keep everything busy with parallel tasks. You can use actors for orchestration, but you're really just using them because they're there, not because they bring any special advantages to the task. Any other solution that works is fine and there would never be a particular reason to switch to actors if you already had a working alternative.
- stefanka 2y agoAre you aware of any framework or could use for such tasks (ML and alike)?
- jerf 2y agoThe problem you face is not so much a lack of such things existing but such a staggering multiplicity that it is hard to poke through them all, and despite the sheer quantity, you may still find that your particular problem doesn't fit any of them terribly well. You can find anything from OpenMP, which amounts to "let's try to treat a whole bunch of resources a lot like one big computer" https://en.wikipedia.org/wiki/OpenMP https://en.wikipedia.org/wiki/OpenMP, through things like Kubernetes which can be used to deploy all kinds of "worker nodes" for all sorts of tasks even if it doesn't do the orchestration of the task itself, and so many combinations of anything in between, plus you have all sorts of clustering technologies, message bus technologies, on-demand VMs spinning up, so many primitives that even if they aren't designed for this can be relatively easily put together into whatever it is you actually need that it is all rather about bewildering abundance than shortage. There's also the entire category of "data lakes" and other nouns that have "data" applied as an adjective that includes various orchestration techniques because just being storage isn't enough, that is its own entire market segment.
- dietr1ch 2y agoI guess it's a bit hard to change the way of thinking and structuring programs/applications. We mostly do either blocking procedural things, or web servers. Maybe actors can help remove the network from web servers where they add unnecessary complexity/overhead. At the same time Web servers seem a bit better as I don't really want to be figuring out how many actors of each "class of actor" to spawn and to maybe babysit each of them, and for debugging the web stack has more tooling and is better understood than any particular actor system. The advantages seem mostly out of experience and a lot of time. Maybe some iteration of an Actor framework will render Web servers too quirky/unsafe/slow/complex.
- the8472 2y agoI've used something in the general shape of actors (though mostly handrolled) when implementing websocket APIs. If I had to wire up lots of or several layers of those then using a library for that would start to make sense.
- eviks 2y agoBecause usage isn't the only motivator? Because they hope they'll get usage (can yuo see the future that non will get any usage?)?
- riquito 2y ago> Sorry for being so negative but why do people keep building these Actor frameworks for Rust? None of them get any usage. There are good answers already on the actual "why", but I'd like to point out that "none of them get any usage" is a much better reason to build a new one than "there's already a library dominating the ecosystem". Clearly none of the existing libraries, for one reason or another, have been deemed interesting enough, let's see someone else try
- 0x457 2y agoI think it's an (so-far) endless cycle of: - One decides that they want to use actors - Look for frameworks - find those that either abandoned or don't vibe with one - start your own - passion runs out for project that needed actors