r/coding • • Oct 21 '22

Will Rust Take over Data Engineering?

https://airbyte.com/blog/rust-for-data-engineering

[removed] — view removed post

15 Upvotes

7 comments sorted by

View all comments

7

u/miyakohouou Oct 21 '22

I've used several languages for data engineering, including Rust, Go, Python, and Haskell. I think the article makes some good arguments in favor of Rust- especially around the static type checking and performance benefits of Rust, but my experience is that Haskell ends up being an even better choice. You get the benefit of types and good performance, plus a couple of really useful ways of embedding SQL directly into your code (opaleye and esqueleto), and very strong support for streaming processing (conduit, pipes, etc).

The big issue with Rust for data engineering in my experience is that the lack of garbage collection ends up not being worth the pain it causes for a lot of the problems you run into in practice with typical data engineering workloads. Nearly all of the DE work I've done was in environments where it was fairly trivial to add more memory to my process if I needed it. As long as I didn't leak memory, I didn't need to be terribly careful about how much I used. At the same time, having new ad-hoc transformations come down from new business requirements was common, and the extra time Rust takes to develop was a real hindrance at first.

Although Haskell would remain my first choice these days, I suspect Go will end up being the winner here in the long term. Python's lack of good static typing (even with mypy it's a bit of a mess) ended up being a massive time sink due to spending a lot of time troubleshooting, and it made it hard to re-use modules when putting together new jobs. Rust and Haskell are both great languages, but they have a higher learning curve than Go, and Go's support for struct tags ends up also being a surprisingly useful feature (you can do the same thing in Haskell, but it's often considered the kind of "fancy haskell" that a lot of people avoid).