3 ms·
The parent wasn't talking just about scale, but distributed systems at scale. You could argue that making a call to a db is a distributed system but that is usu
by discreteevent 6y ago
The parent wasn't talking just about scale, but distributed systems at scale. You could argue that making a call to a db is a distributed system but that is usually not what is meant. FP without side effects is excellent for transforming immutable data. History is by definition immutable so it suits that. It doesn't fit quite as well with a distributed system that has changing state, where the current state of the system is the primary concern for users.
- alquemist 6y agoObviously. Yet the 'FP doesn't scale for distributed systems' is too broad. MapReduce / Flume / Spark / BigQuery are distributed systems. What he probably meant is one can't use pure FP for OLTP at scale. This is again a bit too broad, as most systems benefit from having a FP 'business logic' core with some mechanisms to integrate with the rest of the world. Often times distributed systems are build of purely functional layers talking RPC with the lower layers. Even Erlang, the canonical example of 'we really meant actors when talking about objects' is heavily functional in its design. For reference, I use FP as in 'eschew mutable state', and not 'let's use category theory to solve FizzBuzz using compile-time type metaprogramming'.