Win a copy of Reactive Streams in Java: Concurrency with RxJava, Reactor, and Akka Streams this week in the Reactive Progamming forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Ganesh Patekar

Comparision between Java vs PHP vs Ruby

 
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.
 
author & internet detective
Posts: 39528
776
Eclipse IDE VI Editor Java
  • 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.
 
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...
 
Let me tell you a story about a man named Jed. He made this tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!