
Rewriting the heart of our sync engine - ublaze
https://dropbox.tech/infrastructure/rewriting-the-heart-of-our-sync-engine
======
zanellato19
I really liked this article because they spoke more of their decision making
process than tech. Rewrite It In Rust is a meme by this point, but the blog
actually goes through every point that could be discussed in such a strategy
and why it made sense for Dropbox at this moment.

Really good blog post, imo.

~~~
Recursing
The author (and some of his coworkers) gave a lot of interesting answers on
reddit as well:
[https://www.reddit.com/r/rust/comments/fjt4q3/rewriting_the_...](https://www.reddit.com/r/rust/comments/fjt4q3/rewriting_the_heart_of_our_sync_engine_in_rust/)

~~~
sujayakar
and on lobste.rs too :)

[https://lobste.rs/s/ob6a8z/rewriting_heart_our_sync_engine](https://lobste.rs/s/ob6a8z/rewriting_heart_our_sync_engine)

------
sujayakar
hey everyone, author here! happy to answer any questions about the post, our
system, or our usage of rust :)

~~~
asplake
Interesting to see Rust praised for its ergonomics, possibly not the first
word that springs to mind (to an interested observer, not yet a user). Could
you say a bit more about that?

~~~
_bxg1
Rust is funny because in one sense it's hard and clunky. However, it's only
ever _precisely as hard and clunky as it needs to be_. Everywhere something
can be made more concise, or readable, or convenient, without sacrificing any
control, it has been. Anytime something is hard or inconvenient, it's because
the underlying domain really is exactly that hard or inconvenient.

Contrast this with other languages, which are often clunky when they don't
need to be and/or "easy" when they shouldn't be.

~~~
ssokolow
You're the second person I've seen approach that "Anytime something is hard or
inconvenient, it's because the underlying domain really is exactly that hard
or inconvenient." point in the last little while.

Have you read [https://fasterthanli.me/blog/2020/i-want-off-mr-golangs-
wild...](https://fasterthanli.me/blog/2020/i-want-off-mr-golangs-wild-ride/)?

------
_bxg1
This is a wonderful examination of the "why" (which usually gets glossed over
in these kinds of posts). Looking forward to the subsequent posts on the
"how".

------
xiaodai
I wonder what's the incentive to write such a thing on company blog?

Any ideas? To help with recruitment?

~~~
ublaze
As someone who's written a Dropbox blog post - yes. A tech blog is often cited
by candidates as something they were intrigued by.

------
aw1621107
A bit light on details, but it seems more are incoming. Can't wait for those
blog posts!

------
saagarjha
Anyone know what the hero image is supposed to be?

~~~
okramcivokram
Looks like a construction crane arm to me. Filename is
`Infrastructure-3-1440x305px-light.png` so most likely a stock or free image,
just ran through ascii-art filter.

Hint, open the file directly, zoom out a bit, and squint.

------
j88439h84
Its unfortunate that everybody's rewriting stuff with futures only to realize
five years from now that structured concurrency is much safer and easier.

~~~
ayberk
Citation on that?

~~~
ofrzeta
Well, it's an opinion, however I'd like to know what exactly "structured
concurrency" is supposed to mean.

~~~
j88439h84
Good intro here

[https://vorpus.org/blog/notes-on-structured-concurrency-
or-g...](https://vorpus.org/blog/notes-on-structured-concurrency-or-go-
statement-considered-harmful/)

------
justicezyx
You rewrite because it has to be done, despite the fact that it is no doubt
the inferior solution both in terms of technical complexity and economic
benefits, as Joel articulated well many years ago (and many others even
earlier as well).

The code goes into this state because no one appreciates piece size
enhancement. And those enhancement has no "impact". Everyone is waiting for
the point that everyone's suffering from the bitrotten code is beyond most
people's tolerance. And everyone knows well that some really bad things happen
during the process, and they'll wisely refrain from doing anything meaningful.

That's basically one fact of how software engineering is done in practice.

Poor humans.

And this phenomenon is well known even in ancient time in other areas of
society. Like even in Qin dynasty cicra 300BC, a Chinese physician Bian Que
once claimed that his brothers are better than him [1], because they prevent
illness before they occur.

And of course, everyone only knows Bian Que.

