Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
snowboarder63
searching Neon…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
7 ms
·
1.
▲
by
snowboarder63
2y ago
Honest truth? I didn't Google it first lol. I just checked if there was a crate with the same name and carried on. I only found out about the Ruby ones after I posted on Reddit for the first time. By then it was too late since I had al
2.
▲
by
snowboarder63
2y ago
I actually have a side project doing this. I mapped an actor Id in ractor to a PID in erlang and used a rust create to implement the network protocol for erlang. I ran out of time on this side project kind of deal but it's like 90% the
3.
▲
by
snowboarder63
2y ago
Yeah 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
4.
▲
by
snowboarder63
2y ago
https://discord.com/channels/734893811884621927/127043967262...
5.
▲
by
snowboarder63
2y ago
Thanks! I'm happy to see actors getting some solid use in the industry to provide better thread-management safety and remove a lot of concurrency headaches. Question for you, I was poking around in the codebase and how do you handle yo
6.
▲
by
snowboarder63
2y ago
Also ractor is used in production at Meta. (Which I can finally say publicly lol) Here's the RustConf presentation for anyone interested https://slawlor.github.io/ractor/assets/rustconf2024_present...
7.
▲
by
snowboarder63
2y ago
While the state is indeed a separate struct in ractor there's actually a good reason for this. It's because the state is constructed by the actor and it's guaranteed that the construction is the state is managed by the startu
8.
▲
by
snowboarder63
3y ago
I did not use ChatGPT to write this - Me lol
9.
▲
by
snowboarder63
3y ago
So it does indeed even guarantee that the server is acting in a trustworthy manner due to the public auditing scenario. We will shortly be making our audit logs publicly available to show that the verified crypto proof the client performs d
10.
▲
by
snowboarder63
3y ago
WhatsApp announced that they’re adding key transparency to enhance end-to-end encryption verification within their suite of apps. There’s a blog post going into details on the engineering blog including announcing that the core logic for ma
11.
▲
Deploying key transparency at WhatsApp
(engineering.fb.com)
204 points
by
snowboarder63
3y ago
|
201 comments
12.
▲
by
snowboarder63
4y ago
Ah yeah we don't have hot-updates like Erlang does (we may never, it depends on how Rust would let us do it). That being said we aren't running on a runtime, so Rust code is native-compiled. You could take down and upgrade a node
13.
▲
by
snowboarder63
4y ago
Can you give an example of what you're referring to? I don't know of anything limiting memory / cpu / etc in Erlang at least of any individual gen_server. We have the Factory processes which can gracefully loadshed, but
14.
▲
by
snowboarder63
4y ago
Not sure what's public here, so let's just say "big", as in 100's+.
15.
▲
by
snowboarder63
4y ago
I mean lunatic runs within Wasm, which isn't the end of the world, but we compile down to native. Lunatic generally seems to want to be the end-all of concurrency but we fit more into an existing Tokio-based environment. As far as depl
16.
▲
by
snowboarder63
4y ago
That's essentially a process-abort level panic, which then your whole environment would die. Unfortunately there's not much we can do about that. This will catch all unwindable panics however, so that's quite a lot but yeah t
17.
▲
by
snowboarder63
4y ago
So to your two parts. 1. If you would want independent message handlers, normally we'd just add functions off the state which would be called strait from the message handler's match statement. I.e. something like self.handle_msg_1
18.
▲
by
snowboarder63
4y ago
If the actor fails, it could have failed mid-mutation so we can't trust the "state" object. This would be the same if we passed in an owned state (rather than a mutable reference) and the handler didn't reply with a new
19.
▲
by
snowboarder63
4y ago
Ah so presently we're using the Tokio scheduler, which does cooperative scheduling not preemptive. We've abstracted pretty much all of our core concurrency primitives to a single module however so the plan is to support future sch
20.
▲
by
snowboarder63
4y ago
Yeah hot upgrades is something we'd love to get to, but probably won't be able to swing in a compiled language. We had worked out something ugly back in the day in a .net style environment (different library at a different job), b
21.
▲
by
snowboarder63
4y ago
That's really up to you, Rust has great pattern matching imho, rivaling Erlang's for sure, but with some nice syntax upgrades. Additionally in Ractor, RPC's are strong-typed to the reply type, so a `call` in Erlang might resu
22.
▲
by
snowboarder63
4y ago
Panic's (which can be captured) are captured and will be propagated to the supervisors. That's one of the biggest goals of building this, panics in tasks which have been spawned is a nightmare to deal with
23.
▲
by
snowboarder63
4y ago
Actually I was not familiar with Orleans until now. I think there's probably similar primitives you could build but from my quick 2s read they're solving a higher order problem. Additionally having written an actor lib in the past
24.
▲
by
snowboarder63
4y ago
Actually no, I came up with the name independently and only later discovered their lib. I think it's safe to say we diverge a lot in practice though lol
25.
▲
Show HN: Ractor – a Rust-based actor framework with clusters and supervisors
(github.com)
168 points
by
snowboarder63
4y ago
|
74 comments