新手问题 发现 2 个找茬的帖子:Elixir vs ror

i5ting · 2014年11月29日 · 最后由 i5ting 回复于 2014年12月03日 · 4121 次阅读

发现一个回复,说的很好

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

求科普

合适的工具干合适的事,合适的团队用合适的工具。这些纠结都是浮云。

我了个去,用 Erlang VM 才能跑出 一个 Ruby 框架的三倍?那有啥意义啊?

#3 楼 @blacktulip 早猜到这帖子必定惹骂,哈哈

#2 楼 @billy

不过里面测试我觉得有的地方有问题,rails 的 erb 还有 node 的 cluster,怎么看都不太对

#4 楼 @i5ting 不是骂,我说的是真的。。。erlang 应该有数量级的优势才对

#6 楼 @blacktulip 恩多谢 b 大,erlang》Elixir》phoenix 这样一层的加到 rails 一样 fullstack,估计也好不到哪里了

Go 才是 Sinatra 的 2 倍

#6 楼 @blacktulip 凭什么 Erlang 要比 Ruby 有数量级的优势呢?Ruby 不也是越来越快

#8 楼 @Los Martini 说明不了 Go 的性能,这东西为了酷炫黑魔法用太多,性能超烂,甚至都被 PyPy 下的 tornado 甩老远,Martini 的作者都拆了一个叫 negroni 的 middleware 包,然后自己跑去玩 mux 了。

挺好的,估计 Akita 就是看了这个帖子才做 raptor 的...

这 benchmark 绝对有问题。

nroth 那里 Phoenix 的 Latency Max 是 56.55ms, Rails 才 58.57ms

而 littlelines 那里 Phoenix 是 43.30ms,Rails 有 159.43ms

还有 c100 就别比了。这么简单的东西 c1000 还差不多。

#13 楼 @bhuztez #6 楼 @blacktulip

老是把你俩弄混,哈哈

需要 登录 后方可回复, 如果你还没有账号请 注册新账号