aspose file tools*
The moose likes Beginning Java and the fly likes Java Scalability Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Java Scalability" Watch "Java Scalability" New topic
Author

Java Scalability

Kaydell Leavitt
Ranch Hand

Joined: Nov 18, 2006
Posts: 689

When I first started learning Java, I got the mistaken idea that I could use Java everywhere. After all, there is Java ME (J2ME) for micro-devices. There is Java SE (J2SE) for desktop and laptop computers, and there is Java EE (J2EE) for big websites.

Sun advertises Java as being 'scalable'. While this is true, my assumptions about what this meant were not true.

I thought, for example, for websites, I would just do everything in Java and I could scale from small to huge sites. This assumption turned out to be flawed. First, I found that many web-hosting services don't even host Java on the server-side. Of course you can find web-hosting services that do host Java on the server-side, but they are more expensive.

Second, I found that some huge sites, such as wikipedia, use php.

It seems to me now that when Sun talks about Enterprise websites, they are not merely talking about how many simultaneous users that a website can handle. They're talking about running large organizations with diverse hardware and diverse software that is distributed.

So, of course, Java is good, but it is only one tool in a programmer's tool-box.

There are times when php is the right answer because the hosting costs are smaller.

-- Kaydell

[Please read this]
[ March 30, 2008: Message edited by: Bear Bibeault ]
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42278
    
  64
First, I found that many web-hosting services don't even host Java on the server-side.

The http://faq.javaranch.com/java/ServletsFaq lists Java hosting companies; I think a few of them start at about USD 5 per month. It doesn't get a lot cheaper than that. You're right though that Java hosting in general is more expensive than PHP hosting. Hosting a JVM is a more resource-intensive thing to do than to run mod_php, so fewer users can be served with the same hardware.

Second, I found that some huge sites, such as wikipedia, use php.

And plenty of large sites do run on Java, so I'm not sure what that's supposed to show. Were you expecting the benefits of using Java on the server to be so great that no other technology could reasonably be used?

It seems to me now that when Sun talks about Enterprise websites, they are not merely talking about how many simultaneous users that a website can handle. They're talking about running large organizations with diverse hardware and diverse software that is distributed.

I think it's both. Of course, how many users a single server can support depends a great deal on the type of application. E.g., Wikipedia is -for the overwhelming majority of users- a read-only application. I don't think PHP is used much for transactional systems, at least not without the use of an application server behind it.

So, of course, Java is good, but it is only one tool in a programmer's tool-box. There are times when php is the right answer because the hosting costs are smaller.

Indeed, use the right tool for the right job. I've heard various points being made for and against PHP (and Java), but this one in particular seems to be a weak one to me. That would value a relatively small cost (a difference of maybe 5 or 10 USD per month) at more than all technical or pragmatic considerations.


Ping & DNS - my free Android networking tools app
Kaydell Leavitt
Ranch Hand

Joined: Nov 18, 2006
Posts: 689

For many smaller sites, I believe that you can get more for your money if you use php/mySQL instead of Java
[ March 30, 2008: Message edited by: fred rosenberger ]
Andrew Monkhouse
author and jackaroo
Marshal Commander

Joined: Mar 28, 2003
Posts: 11481
    
  94

Originally posted by Kaydell Leavitt:
There are times when php is the right answer ...


And?
  • there are times when Java is the right answer.
  • there are times when C is the right answer.
  • there are times when C++ is the right answer.
  • there are times when Perl is the right answer.
  • there are times when Python is the right answer.
  • there are times when Ruby is the right answer.
  • In the past 2+ years at Amazon.com, I have used Java around 90% of the time. I have sometimes used Perl, and sometimes C. I rarely use Scala, and I want to use more Ruby. The other languages I don't use at work.

    There are times when a LAMP solution may be best - I don't think anyone would argue with that. But I don't want to be classified as a "web developer for small companies" - I want to be able to say that I can develop middleware solutions, or thick client solutions, or back-end solutions, or micro-device (usually phone) solutions, or .... Java is not the only solution for all of these, but it is (IMHO) a good fit.

    Regards, Andrew


    The Sun Certified Java Developer Exam with J2SE 5: paper version from Amazon, PDF from Apress, Online reference: Books 24x7 Personal blog
    Kaydell Leavitt
    Ranch Hand

    Joined: Nov 18, 2006
    Posts: 689


    there are times when Java is the right answer.
    there are times when C is the right answer.
    there are times when C++ is the right answer.
    there are times when Perl is the right answer.
    there are times when Python is the right answer.
    there are times when Ruby is the right answer.


    I agree with you. It's just that when I started using Java I thought that it was a panacea and it would be everything I needed from programming micro-devices, to desktop and laptop applications, to websites scalable from one to a billion.

    It's just that I'm learning now what you already know. Java can't be everything to everybody.

    [sorry about the blatant advertising, I don't mind it being edited out by the moderators]

    -- Kaydell
    [ March 31, 2008: Message edited by: Kaydell Leavitt ]
     
    I agree. Here's the link: http://aspose.com/file-tools
     
    subject: Java Scalability