发现一个回复,说的很好
AkitaOnRails • 5 months ago
I'm sorry to say, but this is a pointless comparison.
To start, Phoenix is not nearly as complex as Rails (meaning, Rails does a whole lot more). The language is obviously much faster than Ruby, we all know that. And anyone could write Rails in any other faster language, and they did. You do have ASP.NET MVC in C#, Laravel in PHP, Django (this came before) in Python. Now, the question is: if you can write something much faster in any other language, why did Rails not only survive, but grew?
Elixir + Phoenix is the same in terms of use case as Node.js + Express. You are comparing apples and oranges. Elixir's use case lies in the same category as Node.js, Scala, Go, Clojure. Asynchronous messaging, background batch processing, etc. Elixir does add a heavily needed coat of eye candy and niceties that drops a lot of entry barriers for Erlang, but it's far com being a Ruby-replacement (and it's not even it's main goal, I suppose).
I understand the motivation, but I don't think this is the way to try to evangelize Elixir and Phoenix. Ruby and Rails is not the competition. GoLang and Node.js are.
This is not to say I dislike Elixir or Phoenix. Far from that. I only think there are other ways to showcase something good without such comparisons.
但是 see https://github.com/mroth/phoenix-showdown#comparative-benchmark-numbers here
结论是 phoenix 的吞吐量是 sinatra 的 3 倍多
就算 helloworld,ruby 估计也干不过 Elixir
求科普