3 ms·
There is a strong case to be made that BEAM/OTP is a more natural fit for handling thousands or millions of web server requests. Django and Rails are definitely
by bicx 3y ago
There is a strong case to be made that BEAM/OTP is a more natural fit for handling thousands or millions of web server requests. Django and Rails are definitely powerful frameworks, but there have been repeated and justified criticisms of their performance. These frameworks are built upon scripting languages designed for convenience rather than performance.
OTP application failure handling and recovery out of the box is also fantastic.
Beyond performance though, I think functional languages really fit well into the common unidirectional data patterns used when building out a web app. Typically you're running a request through a pipeline of functions like parsers and other middleware, shaping a response to send back to the user before destroying all used computing resources as quickly as possible. Modern languages like Elixir and Gleam provide some great capabilities (pipes, pattern matching, comprehensive stream-based map/reduce capabilities, etc...) for building these pipeline-style workflows in a very natural way, because it's really a quite functional approach already. There is also no real need for building true OOP-style objects when you're just going to throw everything away in a few milliseconds.