4 ms·
We are 5 days from the new year, so in 2023, a data engineer ought to take a serious look at Elixir. I manage Elixir systems for data engineering related work,
by Dowwie 4y ago
We are 5 days from the new year, so in 2023, a data engineer ought to take a serious look at Elixir.
I manage Elixir systems for data engineering related work, so I can attest to its use in this domain within a production environment. I also have used Rust for comparable data-engineering related systems.
Elixir is a phenomenal language for data engineering. I've written message processing pipelines in Rust and didn't get anywhere near the level of design considerations that Broadway / Genstage have. Some day, there may be robust open source offerings in Rust as there are in Elixir, but the ecosystem hasn't reached this state, yet. Rust asyncio is also in a minimum-viable-product condition, lacking the sweet structured concurrency that Erlang-OTP solved long ago and Elixir benefits by. Data pipeline processing in Elixir, utilizing all available cores exposed to the runtime, is straightforward and manageable. Telemetry patterns have been standardized across Elixir ecosystem. There are background worker processing libraries like Oban that help with audit trail/transparency. Smart, helpful developer communities.
Elixir is not going to beat Rust on performance. CPU-bound work is going to take orders of magnitude longer to complete with Elixir than Rust. You could extend Elixir with Rust in CPU-intensive situations using what is known as NIFs but you'll need to become familiar with the tradeoffs associated with using Rust NIFs.
Writing in Rust involves waiting for compilation. When a developer waits for compilation, they switch to something else and lose focus. You can use partial compilation for local development, and that speed things up. You also need to have a very modern workstation for development, preferably an M1 laptop or 16-core Ryzen, with at least 32GB ram and SSD. Elixir, however, has quick compile times as it doesn't do anywhere near the level of work that Rust compiler does. There is a tradeoff for that, though. Elixir is a dynamic language and consequently has all the problems that dynamic languages do that are automatically solved by a strongly-typed compiled language such as Rust. You also discover problems at runtime in Elixir that often would be caught by the Rust compiler.
One final mention is Elixir livebooks. Elixir has thrown down the gauntlet with livebooks. Coupling adhoc data scientist workflows in notebooks with robust data engineering backends makes a lot of sense. There are high-performance livebook dataframes backed by Rust. Elixir backed by Rust is beating Python backed by Rust from developer experience down.
- thewhitetulip 4y agoHave you seen anyone use Elixir? I'm hearing the language for the first time!
- Dowwie 4y agoYes. My current employer is using Elixir for data engineering related work.
- akgerber 4y agoThe Discord backend is built on Elixir: https://elixir-lang.org/blog/2020/10/08/real-time-communication-at-scale-with-elixir-at-discord/ https://elixir-lang.org/blog/2020/10/08/real-time-communicat...
- swyx 4y agoi feel like any discussion of Elixir, a perennial HN favorite, should also come with a disclaimer that it has less users than Haskell (per https://survey.stackoverflow.co/2022/#section-most-popular-technologies-programming-scripting-and-markup-languages https://survey.stackoverflow.co/2022/#section-most-popular-t...) i'll be the first to ack that popularity doesnt matter if you personally feel productive in it; but it does matter when talking about jobs and leveraging an ecosystem (which i dont know elixir's ecosystem so i cant comment on, i had not heard of Broadway / Genstage before this comment). but career-wise, i do observe that developers going after a theoretically better language routinely sacrifice a degree of industry relevance they never get back since they voluntarily enter an extremely niche subculture that for whatever reason never catches on. seen this time and time and time again and i think HN disregards this for the love of the new shiny without a balanced analysis of the career risk/reward
- Dowwie 4y agoYour warning about niche technology is fair, but a Stack Overflow survey is NOT representative of what's going on in the real world. Better, more objective approximations can be gained by reviewing download stats of centralized package managers. Elixir uses hex. Rust uses crates.io. Python uses pypi. Node uses npm. Review download stats and then decide how popular libraries/languages are. It takes time for technologies to catch on. Elixir and Rust both are relative drops in the bucket in respects to industry adoption, making it difficult for practitioners with the languages to continue using them beyond their current employment. Web development often acts as the foot-in-the-door, and Elixir's Phoenix is doing superbly well in this domain. However, Elixir's got an even more impressive position for data engineering related work.