4 ms·
We were experimenting with Go as a "fast" backend language to implement stuff like data services and high throughput systems in. Go has proven itself disappoin
by jhgg 6y ago
We were experimenting with Go as a "fast" backend language to implement stuff like data services and high throughput systems in.
Go has proven itself disappointing in many ways. Rust however has only continued to evolve and get better as the community matures. 2021 is definitely the year of "rust" for us - and we will be using it in many more places. Both on the backend but also on the client - where we embed native modules written in rust.
- anticensor 6y agoHave you considered also switching the client to Rust?
- politician 6y agoAre there any apps that you know of that use Servo as a rendering engine? I'm curious and would like to look at some examples; I thought Servo was intrinsically tied to Firefox.
- anticensor 6y agoNo, not yet. But Servo can be used headless: https://github.com/paulrouget/servo-embedding-example https://github.com/paulrouget/servo-embedding-example
- jhgg 6y agoNo. React/TypeScript is too productive for our project engineers. But we do write our perf critical stuff in the client in C++/Rust! For example, our entire video capture pipeline is in C++/Rust (the meaty bits in rust, some glue in C++ to interact with WebRTC.)
- throwawaysea 6y agoDoes Discord use the cloud for infrastructure or are they big enough that they are going their own way?
- jhgg 6y agoWe are hybrid. We use bare metal for our RTC workload (voice video streaming) and GCP for the rest.
- throwawaysea 6y agoI'm curious if you have any thoughts on power savings/sustainability from using Rust, or from using Rust with ARM-based processors on bare metal, for example. Is it meaningfully different at your scale?
- ngrilly 6y agoHow Go disappointed you beyond the case in the linked article? Is there a few cons in using Rust compared to Go? In particular, what about language complexity/learning curve and compilation times?
- jhgg 6y agoThe only major cons to rust imo are the slow compile times, the steep learning curve and the immature ecosystem. You can solve the first hurdle with better hardware (for the same price as our usual specced macbook pro, I opted to custom build a beefy workstation with a 3790X). The second, you just solve with time. I remember when I first started with rust I hated it. I was working on a native project, and felt like it would have been easier to do in C++. But internally now we have more mindshare and knowledgeable folk who understand Rust - this has helped tremendously in onboarding engineers to the language. Also, having a working editor (via rust-analyzer) and the quality of compiler error messages have improved significantly in the past few years. In terms of immature ecosystem, I think the rate at which the ecosystem is advancing is incredibly promising. Tokio hit 1.0 in Dec 22 of last year, which will finally put an end to the dependency upgrade thrash we've had to deal with. Going from tokio 0.1 -> 0.2 -> 0.3 -> 1.0 has been a journey. But with 1.0, finally, libraries will have a stable API to target, so we won't have to worry about this much for a while. Additionally, in the following months we intend to start funding critical open source rust projects that we use to ensure their success.
- ngrilly 6y agoAmazing feedback. Very much appreciated.