10 ms·
Actix Web 3.0
- slezyr 6y agoWas it actix-web whose Git repo was removed during the brawl with the developer? How it was resolved?
- pas 6y agoA lot of people posted in a thank you thread, and eventually the author put the repo back, and if I remember correctly a few people got owner-like rights. Since then I have no idea whether the original author works on it or not.
- atemerev 6y agoBullying open-source developers is not exactly the best course of action if one aims for the better adoption of a particular project. It is good that the situation was somewhat resolved, but I still feel sorry for the original developer, and I am not sure if I would want to use Actix after "the community" (at least some awful parts of it) did such outrageous things to the developer.
- turbinerneiter 6y agoThe "Community" that harassed the developer is probably not the same community that now works on the code. These mofos from Reddit who storm a GitLab ticket after it was posted there usually do not actually contribute to Open Source projects. They are pseudos who run their mouth but don't do the work. They are the ones who set up the wiki, but never write a single line of code.
- gnur 6y agoHonestly, the ones that set up a wiki but not the code are at least as valuable as the ones writing the code.
- throwaway744678 6y agoAt most as valuable. A Wiki without any code doesn't bring much value.
- hobofan 6y agoWas it in your opinion the "actix community" that piled onto the developer? Because from my perception it was more of the "unsafe Rust code is the devil community", which wasn't really using actix much beforehand. With that as a background you would be "punishing" the project for actions outside their core community (and control).
- rat9988 6y ago"actix community" and "unsafe Rust code is the devil community" are not mutually exclusive.
- renewiltord 6y agoThe overlap is tiny. Usually the latter group are just groupies. Few of them contribute.
- hocuspocus 6y agoThis is a pretty one-sided recollection of events. The main issue was caused by actix-web's adoption outgrowing the original author's goals. It should have been a good thing and there were better ways to deal with the situation, like encouraging the community to fork the project. (And what happened in the end is the opposite, he forked his own projects and clearly labeled them as being personal). You cannot have it both ways, if you create an org on GitHub, a website, speak as a team "we"... seeing adoption will bring some expectations from your users and contributors, that are typically not just to beat other frameworks at TechEmpower benchmarks. I don't think many people want to use a performance experiment. To be clear, I'm sure he also received a lot of unwarranted criticism, but that happens everywhere. It doesn't justify being hostile to legit contributions.
- Gwypaas 6y agoAccording to the /r/rust thread it seems to be working out. https://www.reddit.com/r/rust/comments/iqq8k9/announcing_actixweb_v30/g4tlva6/ https://www.reddit.com/r/rust/comments/iqq8k9/announcing_act...
- sk2020 6y agoYou might note that Rust was conceived by Graydon Hoare and now "the community" owns the project, and the creator is no longer involved. Much like Nikolay Kim (who also was a developer of aiohttp for python, a very impressive FOSS record!)
- touilleMan 6y agoCongratulation this seems really cool ;-) Actix was already a great project but the community-driven switch mentioned here is a great step toward better support and broader adoption. BTW is the fact the anouncement made on Dropbox paper has something to do with Dropbox as a company ? (I heard they are investing heavily into Rust)
- epage 6y agoIts just what the devs used to collabbrate and then they published it in place rather than moving it, as reported in /r/rust.
- Zealotux 6y agoWeb developer currently learning Rust and curious about Actix Web here: how does it compare to let's say Node.Js in regard to performance and security? Any feedback on real-world projects to give?
- jnsaff2 6y agohttps://www.techempower.com/benchmarks/ https://www.techempower.com/benchmarks/ gives you some idea about the performance.
- smcleod 6y agoThat’s more than a little impressive.
- skocznymroczny 6y agoPerhaps, however, according to [0]: "The Actix benchmarks which are winning are written at an extremely low level, with manual parsing, hardcoding header values as 'static string literals, ignoring HTTP methods, and basically being fast by skipping all of the work a real-world HTTP server would need to do to be effective" The quote is 9 months old, but I doubt it changed since. [0] https://www.reddit.com/r/rust/comments/e7xwma/rust_actix_is_the_only_web_framework_to_finish_in/fa83p0t/?utm_source=reddit&utm_medium=web2x&context=3 https://www.reddit.com/r/rust/comments/e7xwma/rust_actix_is_... [1] https://github.com/TechEmpower/FrameworkBenchmarks/blob/master/frameworks/Rust/actix/src/main_raw.rs#L26 https://github.com/TechEmpower/FrameworkBenchmarks/blob/mast...
- hobofan 6y agoThere is a very recent, closer-to-real-workloads benchmark: https://matej.laitl.cz/bench-rust-kotlin-microservices/ https://matej.laitl.cz/bench-rust-kotlin-microservices/
- ncrmro 6y agoOne problem that was kinda show stopper for me is sentry support is kinda not working with recent actix versions.
- nik_s 6y agoCongrats on the release! Actix is super exciting, and it's great to see how the community stepped up to maintain this amazing project. Is there any effort to bring a Rails/Django like framework to Rust? AWWY [1] seems to indicate that there isn't anything like it in the Rust ecosystem, but I'd be curious to know if there's anyone working on something in that direction. All of the frameworks I've seen seem pretty "bare-bones" by the standards of Django/Rails (then again - it's hard to beat these frameworks in terms of feature-completeness). [1] https://www.arewewebyet.org/ https://www.arewewebyet.org/
- trumpeta 6y agoPersonally,I strongly prefer light libraries over comprehensive frameworks. Yes, you have to build up your app, but at least you understand what you're doing. And when something goes wrong you know how to fix it. You can follow the code. This is super hard with a framework like Django.
- nik_s 6y agoI totally understand the sentiment, and generally, when I do solo projects or projects with small teams, I also prefer light frameworks. In my experience, frameworks like Django and Rails shine when you have to collaborate with large teams on solutions though - the fact that there's comprehensive documentation, best practices, and clear standards make it so much easier to work together on a project. I do think Rust brings a lot of assets through its type systems when collaborating, but rolling your own auth/admin dashboard/orm is a hefty investment for most mid-size companies.
- square_usual 6y agoYes - plus, something like Rails is great for getting people on board. If the first experience of a new language is being able to get shit done at record pace, it really motivates you to learn more about it as well.
- pmontra 6y agoI agree. Admin can be complicated but the breadth of authentication is surprising when you start enumerating the features. "I forgot my password" and "remember me" are the easiest ones and yet they're not a hour's job. Authentication is not where a company should invest its money. Use a well proven library and keep solving problems that bring home money.
- deleted 6y ago[deleted]
- arusahni 6y agoUnfortunately, there are readability issues in dark mode (Firefox, MacOS) - inline code blocks are unreadable. To fix the issue, run the following in the browser console: $$("html")[0].classList.remove("paper-noir")
- svnpenn 6y agoAnyone else getting this annoying jerking fixed menu at the top when scrolling? Why do people insist on doing fixed menu bars? Does anyone like them? I don't think I have ever used a website where it improved the experience. Phones have had reactive scrolling for years, so a quick flick and you're at the top. So I don't even know what problem they're trying to solve.
- dgb23 6y agoI feel you. Fixed position elements are really an anti-pattern in many cases. This includes fixed "back to top" buttons and the like. They just clutter up space and distract from content.
- svnpenn 6y agoI mean, even a small “back to top” in the bottom right corner, would be better than a fixed menu at the top. At least with that, its not taking up screen height. Phone screens are small, stop putting stuff in the way that’s not needed.
- mochijo2219 6y ago>> Extensive usage of the projects helped us resolve memory leaks. Hu? I thought Rust was memory safe? At least that's how it's promoted. What's the point of Rust when one of the flagship project (Actix) had memory leaks for years?
- deleted 6y ago[deleted]
- lmkg 6y agoUnder Rust's definition of memory safety, a memory leak is not unsafe. Data will not be corrupted or accessed improperly. Also Actix has had a strained relationship with the Rust community for a number of years, because of Actix's cavalier attitude towards `unsafe`. The result of which is that the project is under new leadership, and safety is given a stronger emphasis. I also never really considered Actix a "flagship" project of Rust. It was popular and promoted itself, but it sort of set itself apart from the mainstream Rust community.
- oconnor663 6y agoAs lmkg pointed out, leaking memory is considered safe in Rust. There are a number of factors here: - Leaking memory doesn't cause Undefined Behavior. It might eventually cause your program (or your whole machine) to lock up or crash, but there are many types of bugs that can do that. - Categorically preventing memory leaks is difficult without a garbage collector. The biggest problem is that you can use reference counted smart pointers like Arc<T> to create reference cycles. Preventing you from doing that at the language level would be too constraining for a lot of real world programs. (In practice, those programs need to break cycles manually using "weak" references.) - The difference between "reachable" and "unreachable" leaks isn't so big in practice. For example, if I'm caching some data in a global HashMap, I might forget to clear that map, or I might not clear it frequently enough. If the map ends up consuming all of my memory, the effect on my program is the same as if I'd just leaked all that memory. Either way, I need to debug what's going on and make a code fix. (In fact, at least some of the leaks that the Actix post is referring to are this sort of reachable leak.) For all these reasons put together, Rust allows safe code to leak memory. In fact, there's even a safe standard library function for doing it (https://doc.rust-lang.org/std/mem/fn.forget.html https://doc.rust-lang.org/std/mem/fn.forget.html). But it's quite rare to run into unreachable memory leaks in practice, because destructors almost always free memory for you automatically.
- renewiltord 6y agoI actually really like Actix. Switched to using Rocket because of some controversy in the Actix stuff that I didn't care too much to keep tabs on. Has anyone used Actix recently? Can you use it ergonomically on stable or do you need nightly? Would love to hear opinions from users here.
- adamch 6y agoAt my job we use Actix Web for a server deployed in prod. We never use Nightly, I don't think Actix Web depends on any nightly features. All stable :)
- renewiltord 6y agoExcellent, thanks. I far prefer using stable, to be honest.
- vbrandl 6y agoAFAIK Actix always worked on stable Rust. I have a hobby project[0] running on Actix. A few days ago I updated from 2.* to 3.* and apart from one minor bug in a middleware (which seems to be fixed by now), everything worked without problems. As for the ergonomics: I used Rocket about 2 years ago and it felt more ergonomic at the time but Actix has come a long way. I think it still hasn't reached the level of Rocket, but it's getting there. [0]: https://hitsofcode.com https://hitsofcode.com
- renewiltord 6y agoAh, it's been so long I've forgotten. Thank you!
- capableweb 6y ago> Switched to using Rocket because of some controversy in the Actix stuff That's the first time I've heard someone making a technical choice solely by something that is not technical. Did you change from Actix because you're afraid that the controversy would eventually hit your own written software? Or just felt bad supporting something that others didn't want people to support? Would love to hear the reasoning behind the change.
- newsbinator 6y ago> A powerful, pragmatic, and extremely fast web framework for Rust In case anybody, like me, didn't know.
- giancarlostoro 6y agoI want to love Rust but my biggest pain point was trying to produce a simple enough REST web service, initially with Actix, though I think I was trying to use it at a time where the docs were not in sync with what was released at the time. Not sure if this has changed, but I'd be willing to give Actix another try again if that's the case.
- adamch 6y agoI think the docs are much better than they used to be. Just my personal experience, but I found Actix Web very easy to get started with for my job. There's also a Gitter chat room where people are pretty responsive.
- giancarlostoro 6y agoI will have to give it another try then if that's the case, good to hear the experience has improved. I think what my issue was when I tried it was the docs was out of sync with the version mentioned in the readme and so it became more confusing trying to match things up to a functioning application.
- kamikaz1k 6y agoYou should give rocket a try! The developer ergonomics are a lot better. Assuming this is you learning about rust. Because performance-wise rocket is slower. But they're working on adding async support, after which they should be showing a lot better numbers.
- giancarlostoro 6y agoIs it compiling under the stable compiler though? I tried switching compilers to try out Rocket and it just didn't work out very well for me, compiler errors everywhere that I couldn't seem to find a reasonable answer for. I'm not a fan of switching to anything that isn't considered stable unless I absolutely have to.
- 6y ago
- ibraheemdev 6y agoIs it true that actix-web doesn't actually use the actix actor framework anymore? I see it listed as a dependency in "actix_web_actors", but it doesn't seem to be used internally...
- nazka 6y agoYes, the new core is now faster than ever. I think they said that actors are awesome but that at this level, for this use case, it was better to start a new design. They kept the name actif-web with actix in it because it was already quite established and they didn’t wanted to start from zero. You can still use actix in your projet. It’s still actively maintained.
- kevincox 6y agoI unreasonably avoid frameworks that have O(n) routing. For some reason I just feel like the standard should be O(1) with the number of routes. There is a crate https://github.com/http-rs/route-recognizer https://github.com/http-rs/route-recognizer which does this but most frameworks roll their own which just loops over the registered routes and takes the first one. It can be slightly less flexible, however in most cases if you are using this sort of flexibility your URL structure is too confusing anyways. Since you can group together an number of regular expressions and match them in O(n) with the length of the URL you clearly have a lot of flexibility available. Of course I should probably check the real benchmarks because the NFA based approach almost certainly has more overhead.
- mwkaufma 6y agoIs the route count unbounded? O(n) = O(1) for constant-bounded n.
- kevincox 6y agoYes, this is why my discomfort is "unreasonable". However I feel bad knowing that every route I add is slowing down my app. And I have the impulse to sort my routes by popularity to improve performance. I wish I could just trust the framework to match "as fast as possible".
- staticassertion 6y agoIf it makes you feel better, it's honestly probably faster for a certain number of routes or fewer.
- skohan 6y agoHow many routes do you have? I feel like you would have to run a huge amount of endpoints for this to be an issue
- dochtman 6y agoOne of these days I'll write documentation for the toolkit I've been working on, which has a nice solution that satisfies this criterion.
- didip 6y agoDoes it mean that Dropbox uses Rust?
- staticassertion 6y agoThis post is hosted on Dropbox's Paper product, which allows for publishing by 3rd parties (anyone with a free Paper account). This post does not have to do with Dropbox engineering, which I do not believe uses Actix. But Dropbox does use Rust quite a lot - their storage layer and sync engine, among other things, are implemented in Rust.
- estebank 6y agoFor one example of how Dropbox does use Rust: https://dropbox.tech/infrastructure/-testing-our-new-sync-engine https://dropbox.tech/infrastructure/-testing-our-new-sync-en...