Earlier quoted context omitted.
Is this a cpu-heavy workload? If it's mostly io-heavy, I could see a gevent + pypy approach getting 50x better.
[flagged]
Elixir saves Pinterest $2M a year in server costs
141–150 of 481 posts
Re: Elixir saves Pinterest $2M a year in server costs
#142If anyone is struggling with analysis paralysis, remember it is ok to do things wrong the first time because then you can farm that sweet internet karma bragging about how you fixed your crappy first iteration. If you always do things right the first time, you don't get to brag about putting out the fire your started.
Re: Elixir saves Pinterest $2M a year in server costs
#143Re: Elixir saves Pinterest $2M a year in server costs
#144Earlier quoted context omitted.
Elixir is slower than plain PHP according to the techempower benchmarks. I'm not even sure how that's possible but it is. By like a factor of 2 iirc. I'm not sure how elixir is that slow since it's compiled.
> Elixir is slower than plain PHP according to the techempower benchmarks. I'm not even sure how that's possible but it is. You're "Not even sure how that's possible" as if implying PHP is slow? Even old pre-7 PHP was much faster than Ruby, Python, and others. And most PHP libs are just wrappers over C code.
Playing with Elixir, I feel similar speed of development, but it also comes with speed of running, which is incredible.
Re: Elixir saves Pinterest $2M a year in server costs
#145Earlier quoted context omitted.
They rewrote, which is known to help too. Going from 30 to 15 instances is not bad but it's very likely that a Java-to-Java rewrite would have helped go down too. The big one however is going from 200 Python servers to 4 Erlang ones: a 50x reduction is quite something and a Python-to-Python rewrite would not have allowed to achieved a 50x gain: > All this is possible because Elixir, and the Erlang platform underneath…
> The big one however is going from 200 Python servers to 4 Erlang ones If your rewrite or refactor gives you a 10X in performance, that's not an optimization, but a bugfix. Unless you are a researcher who have just found a revolutionary algorithm.
Re: Elixir saves Pinterest $2M a year in server costs
#146Re: Elixir saves Pinterest $2M a year in server costs
#147> The combined effect of better architecture and Elixir saved Pinterest over $2 million per year in server costs So it may not even be Elixir that is saving most of that money. Who knows.
My bet is that the bulk of the savings came from the re-architecture and, at best, Elixir sped up the path to get there.
i had been developing in ruby for over a decade and about 5 years of Node exp at the time.
im not a language enthusiast and mostly write in go today.
Re: Elixir saves Pinterest $2M a year in server costs
#148> José: Why did you choose Elixir? > Steve: We chose Elixir because we were looking for a system that was easy for programmers to understand and could take better advantage of our servers. I was intrigued at Elixir’s combination of friendly syntax, powerful metaprogramming features, and incorporation of the Actor model. Am I wrong or is this guy in some sort of bubble where only functional languages are taught?
I bought a book about Elixir and genuinely tried to learn it, but noped out quickly as in I find programs written in it to be unworkable mess quickly.
It's like Perl on crack.
Re: Elixir saves Pinterest $2M a year in server costs
#149Earlier quoted context omitted.
[flagged]
NodeJS was designed to run single-threaded. Sure, you can use cluster module to run it with multiple but there's memory overhead and the ergonomics of sharing state and message-passing is nowhere near GenServer. Not to mention all the other benefits of BEAM. But about the specifics of implementing a web-crawler, a NodeJS way to implement it would be to parallelize using lambdas.