Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Comparision between Java vs PHP vs Ruby  RSS feed

 
ying lam
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Over theserverside.com, there is a long discussion about java is not as scalable as PHP.
http://www.theserverside.com/news/thread.tss?thread_id=43020

I don't mean to start a flame war. But I want to understand the technical reasons behind it.
In Java:
* Each request is handled by a thread, whereas PHP/Ruby they are apache module, so each request is handled by a Process. Is this correct?
* Java has hotspot compiling. I don't think PHP/Ruby has it
* Java has generational garbage collector. I think PHP/Ruby only has Mark and sweep.

What does PHP/Ruby has with Java does not so that it can be more scalable?

I am looking at the technical reasons (performance/memory usage/speed), NOT about developer productivities, tools, clearer code, etc.

Thank you for any advice.
 
Jeanne Boyarsky
author & internet detective
Sheriff
Posts: 36427
454
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Reading the original comparison, the biggest thing missing is what was being compared for scalability.

In Java, the application server you are using directly affects scalability. So comparing "Java" with PHP doesn't really mean anything. It also depends on what you are comparing - database, I/O, # requests/second, security, transactions, etc.

What does PHP/Ruby has with Java does not so that it can be more scalable?

I haven't used PHP or Ruby (just read about them) so I can't comment on this. Note that Ruby was shown as being less scalable than Java in the original presentation. So you are really asking about PHP.
 
Scott Johnson
Ranch Hand
Posts: 518
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In my opinion, the fact that PHP is 20% faster than Java (or not) is of very low importance. In a well architected web application, I can add more/faster servers if I need more capacity.

A much more important aspect of a language is how it affects speed-to-market and the development costs over the life cycle of the application. Are the developers productive with the available tools? Is the code maintainable? Are quality third-party libraries available? Etc.

So the question of which is faster is really academic.

I know that doesn't answer your question, but those are my two cents...
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!