This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Servlets and the fly likes Technology selection for B2B and B2C web application Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Technology selection for B2B and B2C web application" Watch "Technology selection for B2B and B2C web application" New topic
Author

Technology selection for B2B and B2C web application

Venkat Sadasivam
Ranch Hand

Joined: May 10, 2008
Posts: 139
I am seeing more of cgi, perl, php for B2C web applications. For example JavaRanch uses cgi.

Java is been used heavily for B2B web application.

Does this indicate Java is not scalable solution for large scale web application?


“Any fool can write code that a computer can understand. Good programmers write code that humans can understand. ”<br>
-Martin Fowler
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60765
    
  65

Originally posted by Venkat Sadasivam:
I am seeing more of cgi, perl, php for B2C web applications.
This is not a trend that I have observed.

For example JavaRanch uses cgi.
Not because it's "better". See the JavaRanch FAQ.

Does this indicate Java is not scalable solution for large scale web application?
It does not.
[ August 16, 2008: Message edited by: Bear Bibeault ]

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Venkat Sadasivam
Ranch Hand

Joined: May 10, 2008
Posts: 139
My question is just the intuition, I don't have any reference or experience in comparing CGI and Java performance.

Is there any good reference can you sight?
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30076
    
149

Venkat,
A big advantage of Java over CGI is that you don't have to launch a new process for each request.

Are the B2C sites you've seen for big companies or small companies? As far as I know, smaller companies are more likely to use PHP because development resources are cheaper. Of course, they are also less likely to need massive scalability.

J2EE is all about building large scalable apps including web apps.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Pat Farrell
Rancher

Joined: Aug 11, 2007
Posts: 4646
    
    5

Originally posted by Venkat Sadasivam:
I am seeing more of cgi, perl, php for B2C web applications.

While php is popular, cgi and perl were much more popular last century.

Its also dangerous to make assumptions based on the visible url/query strings. They can be mapped from language to language, and are often obfuscated to add a little security by obscurity.

How big of a scale do you want? Once you get into tens of thousands of transactions per hour, it takes real engineering, no matter what language you use.
Venkat Sadasivam
Ranch Hand

Joined: May 10, 2008
Posts: 139
I am hearing CGI and PHP are better in database connectivity performance.

Also I heard:
Services such as Amazon, Yahoo, Google, and Slashdot have known about scripting languages for years and used them effectively in production. Yahoo even adopted PHP as its language of choice for development.

Your comments?
Deepak Bala
Bartender

Joined: Feb 24, 2006
Posts: 6661
    
    5

I am hearing CGI and PHP are better in database connectivity performance.


Are there any metrics to prove this ?

Yahoo even adopted PHP as its language of choice for development.


They also have java projects


SCJP 6 articles - SCJP 5/6 mock exams - More SCJP Mocks
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30076
    
149

Originally posted by Venkat Sadasivam:
I am hearing CGI and PHP are better in database connectivity performance.

Whether that is true or not, it is unlikely to be a scalability concern. I've never had a bottleneck being the database connectivity (on enterprise applications.) The biggest bottlenecks tend to be the queries themselves, network traffic and I/O. (and possibly CPU in some specialized cases). The language specific part of this isn't take a high percentage of the total time.


Also I heard:
Services such as Amazon, Yahoo, Google, and Slashdot have known about scripting languages for years and used them effectively in production. Yahoo even adopted PHP as its language of choice for development.

Your comments?





Also I heard:
Services such as Amazon, Yahoo, Google, and Slashdot have known about scripting languages for years and used them effectively in production. Yahoo even adopted PHP as its language of choice for development.

Most places have known about scripting languages for years. They have their uses. It is all about choosing the right tool for the job. Just because sometimes a scripting language is the best tool for the job, doesn't mean Java isn't suited for scalability. (your original question.) Interestingly both Amazon and Google have a mix of Java and scripting. They are great and picking the best tool for the job. I assume the others do too - I just don't have the knowledge to state so definitively.


Any comments?

Nothing in this thread means scripting languages are better or worse than Java. My biggest caution would be not to leap to conclusions based on incomplete data or something you heard. It's good that you asked for more comments here as you get that balance. Even though it's a Java site, people have experience with different languages and have a proper respect for the balance.

Interestingly, the latest version of Java supports scripting languages in the JVM.
Pat Farrell
Rancher

Joined: Aug 11, 2007
Posts: 4646
    
    5

Originally posted by Jeanne Boyarsky:
Nothing in this thread means scripting languages are better or worse than Java.


OK, I'll add something. I, personally, much prefer Java over perl or PHP. I believe that programmer productivity is the critical resource in 99% of all applications. (skipping things that scale like Google or Amazon).

I write systems that require a couple of engineers or more, up to about ten. I much prefer Java's strong type safety at compile time over the loose approach of perl or PHP.

I will not work on an effort that requires hundreds of engineers, so I'll leave those projects out of my scope as well.

I'm not thrilled about how this ends up really being built, with the guts in Java accessed through servlets, and the presentation in jsp pages. I think jsp pages are too much of a hack, and EL is really a hack. But I'll take Java + jsp over perl or PHP any day. IMHO, etc.

I don't believe that Java is a solution out ten years. I expect that other languages will be built on the JVM, but Java is showing its age, and its not aging as well as perl has.

The expensive part of any computer application is the engineers needed to build and maintain it. Hardware is cheap, use more hardware.

YMMV, IMHO, etc.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Technology selection for B2B and B2C web application
 
Similar Threads
Web Services (The IT Industry) ON A ROADMAP TO DISASTER 2007 ONWARDS ? Do U Think So?
Java/J2EE Analyst/Developer - Dubai (Tax Free Package)
Portable J2EE 1.4 Web Services?
B2B & B2C .
doubt on a question from ibm test