• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Java Scalability

 
Ranch Hand
Posts: 694
Mac OS X Eclipse IDE Firefox Browser
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ]
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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.
 
Kaydell Leavitt
Ranch Hand
Posts: 694
Mac OS X Eclipse IDE Firefox Browser
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ]
 
author and jackaroo
Posts: 12200
280
Mac IntelliJ IDE Firefox Browser Oracle C++ Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
     
    Kaydell Leavitt
    Ranch Hand
    Posts: 694
    Mac OS X Eclipse IDE Firefox Browser
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator


    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 ]
     
    Consider Paul's rocket mass heater.
    reply
      Bookmark Topic Watch Topic
    • New Topic