views:

783

answers:

11

I've been arguing with some friends on the university, and we can't get to a point to which is the framework with more scalability for web applications (and still very fast).

One calls for jsp, the other one for ruby other for php and so on. Could i ask you to clarify us on what as more scalability potential?

Tks, hope I'm not duplicating anything I've searched but didn't found any previous question like this.

Edit: If you could point a comparison about this it would be good :)

+3  A: 

Algorithms will count more for scalability than the language used.

That said, there will be differences in execution speed between the languages. I believe that Java (Servlets and JSPs compile to servlets, i.e., native code) will be faster than Ruby and PHP by some amount). There are also a tonne of web frameworks for Java that will encourage you to do things the best way for scalability.

Also design your app so that it can run happily behind a load balancer, and scalability becomes a lot easier :) This isn't my field of expertise however.

JeeBee
A: 

A compiled language will generally run faster than an interpreted language so I think Ruby and PHP start behind the eight ball but It really comes down to how you use the language and how you structure the code.

All languages will have their own best practices and patterns to build scalable applications and often there will be compromises depending on the functionality of the proposed application.

Nathan Smith
+2  A: 

You can also take a look at "What’s faster? PHP vs ASP vs JSP vs CGI etc"

I think Java/JEE is the only "framework" designed from scratch to develop distributed/clustered applications and that encourages good practices to achieve it from specifications (EJB, JTA...).

But as usual, it depends. This kind of questions often tend to flame wars :)

Guido
EJB = committee designed nonsense, not 'best practice' by any means. :)
gbjbaanb
I agree, but anyway it was designed to allow distribution of application components... Lets say "good practices from Sun point of view" ;)
Guido
So true the flame wars :P
fmsf
+15  A: 

Ruby and PHP are not webapp frameworks. They are programming languages which are popular for web development.

Generally speaking, webapp scalability is not a property of a programming language, and a given webapp framework may at most not hamper scalability. Good scalability is more a property of application design.

There are way too many webapp frameworks out there for a point-by-point comparison that is anything short of encyclopedic.

Also, you can tackle scalability for a given application in several ways. One way is to have a well defined and narrow scope and aim awesome raw performance, so a single machine can serve bazillion of work units. The best example around is Mailinator.

Another way is to make it easier to serve increasing loads by "just" adding more hardware. Pretty much any database-backed webapp framework can scale this way: just add more application servers between a load balancer and a shared database back-end. If you frame the problem this way, your main concern is designing the application to minimize 1. database contention 2. database load.

The last way is design the system to be insanely parallel all the way. Google being the prime example.

In summary: languages or frameworks do not make scalable applications, software architects do.

EDIT: To be clear, my answer is focusing on scalability, that is the ability to handle increasing loads without changing design. This is a different property than speed of execution.

ddaa
A minor disagreement,'languages or frameworks do not make scalable applications...'. They do need something to start with. Popular frameworks are well supported and hence scaled easily. I agree that it is up to the designer to harness them. Parallel algorithms have their role, so does hardware.
questzen
+2  A: 

I'm not sure any of those frameworks you mention will seriously hinder scalability.

It all depends on the implementation.

I would concentrate getting your web app to work well first, and then worry about scalability when it becomes an issue. In other words "let's cross that bridge when we come to it".

Paul Fedory
+2  A: 

A: C ISAPI dll (or custom apache module) :)

Even then the overhead of the web server, parsing the http requests and serving the html pages makes the execution time of your apps almost irrelevant. If you run your app as a CGI app, then expect even less performance.

For scalability in the web, you're really talking about adding more servers and load balancing, taking load off the server by putting the database (if heavily used) on a separate server.

The raw performance of those languages are almost nothing to worry over. Use the one you want to use, that you will be most productive with. Worry over the other issues you'll run into - network io, security, correctness.

gbjbaanb
+1  A: 

Several good points already. My main point would be this: A person who knows python inside and out will probably be able to make more scalable code using python than using Java. And there are many massively big sites that use all the technologies that you mention, so I don't think there's really any big advantage either way.

For the most part, you should stick to what you're familiar with unless there's a really significant reason to go another way.

Jason Baker
+2  A: 

Web framework scalability is a bit of an over thought question (some would say p155ing contest). Unless you are getting mega bucks (good luck with that these days) and can ensure millions of visitors per day all those frameworks can handle it well (as can ASP.NET).

Personally I would always choose ASP.NET. It is as scalable as anything and has the best developer tools. Only downside is hosting and operating system costs.

Craig
A: 

The answer is...you don't have this problem. If you have this problem, you can afford to pay an expert to come up with the answer.

Marcin
A: 

If you want to know how the major sites use LAMP to achieve scalability, you should take a look at database sharding.

A: 

The choice of a web framework has less impact on the scalability (the ability to scale) than the architecture of your site. Most modern web frameworks lend themselves very well to scaling so it's really your deployment setup that needs attention.

Ashwin Phatak