TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Using Rust to scale Elixir for 11M concurrent users (2019)

30 点作者 i0exception将近 3 年前

4 条评论

drunkenmagician将近 3 年前
from 2019 also<p><a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=19944747" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=19944747</a><p><a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=25053553" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=25053553</a><p><a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=32477012" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=32477012</a><p><a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=19940865" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=19940865</a>
nicoburns将近 3 年前
Rust really shines for FFI use cases. You get all the same performance benefits you would get with C, but:<p>- It’s a safe language so you don’t have to worry about crashing your program or introducing UB.<p>- You don’t have to deal with the pain of C compiler toolchains. Need you’re code to work on multiple platforms? It will likely just work out of the box.<p>- It has a lot better abstraction capabilities than C, so you get a higher level interface to the host objects.<p>- It has a great package ecosystem which you can take advantage of. Sometimes your native module could be as simple as exposing a few methods from a prewritten library.<p>Once you go down this road, it can be very tempting to write the whole thing in Rust (which can work well too), but if you’ve got an existing code base, or some higher level code you want to keep in a more flexible language, then I think the Rust + scripting language of choice combo is hard to beat.
RcouF1uZ4gsC将近 3 年前
&gt; and using the guarantees of Rust is guaranteed not to crash the VM or leak memory.<p>Very interesting article.<p>However, I do no think that Rust guarantees not to leak memory. It guarantees to double frees or dangling pointers, but it does not guarantee no leaks. One example would be making a cycle using Rc.
评论 #32478617 未加载
anko将近 3 年前
i&#x27;d love to know the operations they were doing and what they used the sorted sets for. I find for this type of thing, if the ids of the users are integers you can often use a bitset and optimise the crap out of it via SIMD. If memory is a huge concern, or if the data is super sparse you can use a roaring bitset.