Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I'd be happy to learn, but you'd have to expand the one-liner.


I am involved with two very high volume sites, one is written in Java using tomcat as the server and it needs 3 servers to handle between 650K and 1.5M uniques daily, server load is ok but fairly high, the other is a PHP based service that serves up 1.8 million pages on a good day to 50K uniques, the server load on that box is a relaxed 0.6.

When used properly PHP is performing quite well. Note that this is without any front-end caching, each page gets generated anew.


Are these two sites doing equivalent work? Without knowing what kind of work these sites are doing, this isn't really a useful comparison.


Yes, absolutely.

Otherwise I wouldn't have used them as examples. They are basically implementations of the same kind of site but on different platforms, the one more successful than the other.

In terms of raw performance I'd say the java environment is a little bit faster, but not by much.

In terms of programmer performance I'd say the PHP environment is a lot faster than the java environment.

The java I would qualify as more maintainable though, but it is less stable in production than PHP (we see the occasional freeze on java, the apache/PHP stuff seems to run itself for year after year without any issues).

Both use mysql db backends.


I wonder whether it's not so much Java, but the excessive "architecture" around the language. My software uses the Jetty web server, a minimal framework, and JRuby for application code. It's very very fast, stable, not particular heavy on memory consumption, and I get good programmer productivity with the Ruby language. Importantly, I get to use all the shiny Java libraries instead of battling with Ruby gems.

I have come to the conclusion that the JVM combined with the vast number of libraries is great, but the Java ecosystem is not terribly optimal and over complicated.


One day someone will come up with a 'runnable war file' that contains the whole web application+container and does not require unpacking or other manipulation, entirely stand-alone.


Would it actually be that hard to put everything in a single jar file and generate a class to boot it? Is it more than tracing dependencies and setting up the servlet configuration? Admittedly I have avoided the whole Java infrastructure, but using Jetty as an embedded web server has been painless.


I don't know, but I'm tempted to go and find out.

Not unpacking a .war file would be a fairly major deal I think.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: