Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Play! framework vs Ruby on Rails [closed]

It's not going to be a request for general comparisson:

Play! framework is Java based which means the code is interpreted to bytecode and then compiled by the JVM in runtime. On the other hand, Ruby is a dynamic language which means the code is interpreted with every request. This is certainly obvious for every programmer.

Another aspect is the development process and the ease of the language (strong typing vs weak typing).

Currently I'm developing a new website using Play!
So, for the questions:

  1. Performance for an HTTP server (Play! runs on the JVM, Ruby is dynamic) - does it really matter for a website? would you see a significant differences?
  2. I feel RoR has much larger community, sources, tutorials etc, and it's a little batter me. Or should it?
like image 889
socksocket Avatar asked Oct 14 '12 21:10

socksocket


2 Answers

Well, it depends.

  1. Ruby's not a particularly fast language, but language execution speed is likely not to be your bottleneck—in my experience, ruby's relative slowness is often just a drop in the ocean of external service calls (e.g. databases), algorithmic problems (e.g. synchronous, blocking subroutines), and design choices that are just generally inappropriate for the problem domain. Keep your whole technology stack in perspective.

  2. Community's important, and Ruby/Rails has an extremely active one. AFAIK Play's smaller, but in my own experience Java and Scala (and the myriad other languages that have JVM implementations (including Ruby)) also have good communities.

All of this depends on the specific needs of your app (and you!). If Ruby's too slow, it's too slow. If you absolutely need some library that only exists in Java, use Java. Choose the tool to fit the task. But keep the entire task (and your own needs for completing that task) in perspective.

like image 162
pje Avatar answered Nov 17 '22 09:11

pje


Many differences between these two models. As for the performance, my opinion about Java based & RoR:

1, Java based website(running on several Java Application Servers), has its unique advantage, such as multi-thread model(highest speed to read local data), global memory, easy to pooling resources, plenty of efficient clients to connect all kinds of 3rd part OSS tools...

2, RoR (and Php) model of HTTPServer connection, need to "proxy" request to App tier. Multi-process model increases inter-process communications. And as a "dynamic language", the performance is lower.

But, nowadays, web programming depends on other tools to boost up. The widespread uses of cache, NoSQL(Memcached, Redis, TT/TC), IPC/RPC framework(netty, akka, )... shift the bottleneck. I knew both above models has been used in large-scale networking social games.

like image 4
hongtium Avatar answered Nov 17 '22 10:11

hongtium