Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Choosing Rails vs. Django based on performance and scalability [closed]

I'm currently working on a side project (that hopefully will grow into something more), and right now its strictly static front-end stuff; HTML, CSS and jQuery. So in the meantime, I have time to do heavy research on choosing Ruby on Rails vs. Python/Django.

I've read countless articles comparing the two, which usually come down to "what language do you prefer?" and considerations of the development community.

My question here is strictly of a technical nature, comparing the frameworks (and their respective languages) as such:

Between Ruby/Rails vs. Python/Django:

  1. Which run-time performs better (any statistics or real-world examples would be great)?
  2. What are the known scalability problems, and which scales better in the long run (again, any technical documentation or data to represent this would be great)?

I understand that scalability comes down to architecture, so the question is what framework and its respective tools, APIs, plug-ins, community, documentation, etc. "guides" you towards the best scalable web architecture from the "get-go"?

Thanks!

like image 394
Michael Avatar asked Sep 25 '11 17:09

Michael


People also ask

Is rails faster than Django?

If we compare the two frameworks, Ruby on Rails is faster than Django by 0.7%. Learning Curve. Because of a flexible interface, RoR features a smoother learning curve, but Django may be easier to get started with for developers with some experience in Python.

Which is better Django or Rails?

In the battle of Django vs Ruby on Rails performance, it is observed that Rails is faster by 0.7%. It is because Rails has the advantage of a rich repository of amazing libraries and plugins to enhance the speed and eventually the performance of this framework.

Which is more scalable Django or Flask?

Django is great for building complex sites with dynamic content, with scalability in mind; big projects that require out-of-the-box solutions can be deployed really fast. Flask is perfect for developing simple web apps.

Is Ruby on Rails better than Python?

Python is generally better for educational use or for people who want to build quick programs rather than work as developers, while Ruby is better for commercial web applications. There are more specific differences when comparing Ruby versus Python, and they have in common that there are many ways to learn both.


1 Answers

That's the wrong approach to thinking about the problem.

Scalability on the web comes from expanding the number of application servers rather than speeding up an individual application server.

Ruby and Python are both slow languages with problematic multithreading and problematic garbage collectors. We use them anyway because they are very good at permitting the developer to write simpler programs that do the job better. It's not worth bothering about the question, which of these two runtimes performs better.

So long as you keep good web architecture, where your application server stateless (where all state is kept in the database or in cookies, but not in server-side sessions), you should not care what the actual performance of an individual request is, so long as it is reasonable. Because if your application server is stateless, you can scale that tier horizontally to cope with any need for scalability.

like image 54
yfeldblum Avatar answered Oct 10 '22 00:10

yfeldblum