Live data from Hacker News

The Safety Boat: Kubernetes and Rust

msrc-blog.microsoft.com

41–50 of 102 posts

Re: The Safety Boat: Kubernetes and Rust

#41
post #40

> we caught a significant race condition It is a data race, not a race condition. > and which passed the race checker for Go No, it is not. https://github.com/helm/helm/pull/7820#issuecomment-60436062... There is a comment by issue author which is literally a go data race detector warning. Like "WARNING: DATA RACE".

Also, to be clear, by “we” they really mean “a contributor”

Re: The Safety Boat: Kubernetes and Rust

#43
post #3

I looked into WASM / WASI last week but couldn't find an answer to this anywhere: can I write a network service in Rust and compile it to WASM / WASI? I know that wasmtime can execute a WASM module and give it access to a file system. Can that filesystem contain a socket that the WASM module can interact with?

There’s a version of NGINX that’s compiled to WASM.

Conceivably you could compile all of the CPython runtime into WASM, just that you’d be left with a big binary that gets passed around all the time over the wire.

Re: The Safety Boat: Kubernetes and Rust

#44
post #4

Earlier quoted context omitted.

That is the case, but it's super awkward to use. Basically, you cannot await a tokio future on an async-std runtime, or an async-std future on a tokio runtime. You can, however, have both runtimes running at the same time, and use some form of message-passing to bridge them. It's definitely easier to only deal with one runtime. Ideally, we should have some kind of abstraction to allow crates to support both runtimes…

> AFAIK this is not currently done. That's correct; we're still working on these abstractions. It's the end goal that most folks have in mind, though.

Can you explain and/or link to the issues? I thought Futures were the abstraction that lets you choose a runtime?

Re: The Safety Boat: Kubernetes and Rust

#45
After reading this article, I'm excited about finding a reason to write a component in Rust and WASM. Can anyone recommended the best getting started guide for dipping your toes in the water? This article didn't have a link to anything that seemed appropriate for that goal.

Re: The Safety Boat: Kubernetes and Rust

#46
post #26

I don't believe for one second that it takes just a couple of weeks to an average SE to be proficient in Rust.

We became pretty comfy with it in less than a month in Aug 2017. (Let's say average guy had a few years of Python and this-and-that before that, and a ~5 year CS degree before that.) Sure, there was no async/await anywhere yet, but no crossbeam-channels either. And there were a lot less friendly tutorials and there were a bit more rough edges. (Especially that we did "IoT" so cross-compiling was ... an experience.)

Re: The Safety Boat: Kubernetes and Rust

#47
post #40

> we caught a significant race condition It is a data race, not a race condition. > and which passed the race checker for Go No, it is not. https://github.com/helm/helm/pull/7820#issuecomment-60436062... There is a comment by issue author which is literally a go data race detector warning. Like "WARNING: DATA RACE".

Data races are a kind of race condition, no?

Re: The Safety Boat: Kubernetes and Rust

#48

Earlier quoted context omitted.

> AFAIK this is not currently done. That's correct; we're still working on these abstractions. It's the end goal that most folks have in mind, though.

Can you explain and/or link to the issues? I thought Futures were the abstraction that lets you choose a runtime?

Futures are part of the answer, and more specifically the way that the Wakers passed to Future::poll use dynamic dispatch to re-schedule the task.

Other major abstractions that are missing so far include async versions of the Read and Write traits, a Stream trait for the async equivalent of the Iterator trait, and perhaps a way to spawn new tasks.

This series of interviews covers these in more depth: http://smallcultfollowing.com/babysteps/blog/2020/04/30/asyn...

Re: The Safety Boat: Kubernetes and Rust

#49
post #20

Earlier quoted context omitted.

Go has a shorter time, and that’s the measuring stick in this area.

Go appears to have a shorter time, because you don't realize how much higher-level stuff you're just expected to do The Right Way, with no support from the language or libraries. So you're free to think you've finished learning Go, but then the actual learning begins.

Agreed. Worked with a senior who "learned go in a week" then faffed around for months (to prod! because he had the implicit trust of management because he was "a genius") deploying broken software with tons of concurrency bugs because he didn't know how to manage shared state.

Re: The Safety Boat: Kubernetes and Rust

#50
post #40

> we caught a significant race condition It is a data race, not a race condition. > and which passed the race checker for Go No, it is not. https://github.com/helm/helm/pull/7820#issuecomment-60436062... There is a comment by issue author which is literally a go data race detector warning. Like "WARNING: DATA RACE".

IIUC, the point is that the code has been in prod for a year, but the race detector only just now found the bug? But I could be wrong.
Post reply on HN