News for hackers. Stuff that matters.
Re:OTP 23 by nurettin on Wednesday May 13, 2020 @02:04PM (#23169749)
I have a prototype system where I am passing over 100k msg/sec between a dozen backend services written in python (asyncio+redis) and I keep on wondering when my bottleneck will become functional programming and safe message passing by making copies. When will the madness end?
Re:OTP 23 by bsaul on Wednesday May 13, 2020 @02:26PM (#23170009)
i don't think erlang is requiring FP + immutable + message passing for performance, but rather for correctness. Making copies is actually more expensive in terms of perf.
Re:OTP 23 by nurettin on Wednesday May 13, 2020 @04:48PM (#23171666)
me too, and I have no clue as to how changing language can increase correctness in my case. I can think of other use cases where in-process concurrency and mutating data structures could cause problems, but I avoid those scenarios entirely anyway.
Re:OTP 23 by pdimitar on Wednesday May 13, 2020 @04:03PM (#23171183)
Tradeoffs. In the setup you describe I'd pick correctness over performance any day.

If you hit a performance bottleneck you might as well just use RabbitMQ or Kafka to queue up stuff and process it as it comes along. Or apply back-pressure if your current code allows for it.

Re:OTP 23 by nurettin on Wednesday May 13, 2020 @04:45PM (#23171635)
I actually use redis hashsets to queue stuff when I need correctness. Much more performant than rmq's mnesia