Live data from Hacker News

Shipping forgettable microservices with Rust

precompile.com

11–20 of 31 posts

Re: Shipping forgettable microservices with Rust

#11

What web framework is this on?

Iron, apparently: https://github.com/dirk/metrics_distributor/blob/d29c897d156...

Which has very disappointing benchmarks at the moment - even slower than some Python and Ruby stacks:

https://www.techempower.com/benchmarks/#section=data-r12&hw=...

I'm not sure why this is - I've Googled to no avail - but it is rather worrying.

Re: Shipping forgettable microservices with Rust

#12
post #10

Why not Go? Checks the boxes of "performant" and "safe" while remaining developer friendly compared to Rust

Oh connection pooling is handled automatically by the standard library ...jk not really, it leaks sometimes ... and ...down ...goes ...my ...production database. 2 weeks ago.

Re: Shipping forgettable microservices with Rust

#14
post #2

I don't think I have enough context to understand this article. What exactly does "response time" measure, here? The diagram of the system makes it look like this program is essentially just a scan over a data stream, so each iteration should be minimally computationally intensive--certainly not in the tens of milliseconds. Is this counting time to query the left-hand-side? Or is it time from receiving a message from…

I got an eery vibe that this was the equivalent of an /r/SubredditSimulator post for Hacker News.

Re: Shipping forgettable microservices with Rust

#15

Earlier quoted context omitted.

Iron, apparently: https://github.com/dirk/metrics_distributor/blob/d29c897d156...

Which has very disappointing benchmarks at the moment - even slower than some Python and Ruby stacks: https://www.techempower.com/benchmarks/#section=data-r12&hw=... I'm not sure why this is - I've Googled to no avail - but it is rather worrying.

When you see Rust being "slower than Ruby" it's usually because you forgot to turn off debug mode.

Re: Shipping forgettable microservices with Rust

#16

Earlier quoted context omitted.

Which has very disappointing benchmarks at the moment - even slower than some Python and Ruby stacks: https://www.techempower.com/benchmarks/#section=data-r12&hw=... I'm not sure why this is - I've Googled to no avail - but it is rather worrying.

When you see Rust being "slower than Ruby" it's usually because you forgot to turn off debug mode.

Looks like they use build with release mode:

https://github.com/TechEmpower/FrameworkBenchmarks/blob/mast...

Re: Shipping forgettable microservices with Rust

#17

Earlier quoted context omitted.

Iron, apparently: https://github.com/dirk/metrics_distributor/blob/d29c897d156...

Which has very disappointing benchmarks at the moment - even slower than some Python and Ruby stacks: https://www.techempower.com/benchmarks/#section=data-r12&hw=... I'm not sure why this is - I've Googled to no avail - but it is rather worrying.

I've been doing some work on these benchmarks. They appear really slow to me as well; I found the environment really hard to set up, though, so I haven't quite figured out how to identify why they're this way.

Re: Shipping forgettable microservices with Rust

#18

Earlier quoted context omitted.

When you see Rust being "slower than Ruby" it's usually because you forgot to turn off debug mode.

Looks like they use build with release mode: https://github.com/TechEmpower/FrameworkBenchmarks/blob/mast...

So it's important to not compare master to when the benchmark was posted; remember, they do them at a certain time, then work happens. So like, I sent a PR to update Rust from 1.0 to 1.6 at one point, for example.

That said, I don't think that missing out on --release was the issue here, as far as I know, it has always been on.

Re: Shipping forgettable microservices with Rust

#19
post #13
post #10

Why not Go? Checks the boxes of "performant" and "safe" while remaining developer friendly compared to Rust

Lack of generics is extremely developer hostile.

Gender-shaming male developers is hostile, but Mozilla never cared about that, did they?

Or how about that time Eich donated thousands of dollars to try and prevent homosexual marriages?

Rust might be memory-safe, but it's culture-toxic.

Re: Shipping forgettable microservices with Rust

#20
post #10

Why not Go? Checks the boxes of "performant" and "safe" while remaining developer friendly compared to Rust

You can just as easily ask, why not any other language, for the exact same reason.

But since you asked about Go, here are the 3 reasons that I would not pick Go:

1) no generics means less code reuse, which mean more testing of more code (potential runtime issues)

2) allowance of Null, means potential NPE/seg-faults (runtime issue)

3) non-type safe, inconsistent error handling (another runtime issue)

Go is a fine language, like many others, but it's not the same as Rust, and doesn't offer the same features (like no runtime/GC), which means it's not as flexible in its usage. But, I will grant you that Go is "easier" to write code in.

Anyway, there will be and are many great programs written in Go, as there have been in C, C++, Java, Perl, Python, Ruby, Erlang, Haskell, Ocaml, Ruby, JS, etc. To each there own. Mine is Rust today, was Java before that, C++ before that, C before that, and Basic before that.

Post reply on HN