[thelist] What is the best programming language for the web?

Ken Schaefer Ken at adOpenStatic.com
Fri May 25 08:20:17 CDT 2007


Hi Phil,

There's a lot more to writing a web application than simply choosing a
language. I'll give you two examples:

a) Suppose you write a C++ CGI application and try to run it on a Windows
Server (without Fast CGI support). Every time you hit your CGI you'll be
spinning up a new process on that server. That simply isn't scalable. On the
other hand, your PHP ISAPI extension is scalable (since it relies on a
persistent process with a managed thread pool)

b) Consider an n-Tier web application. The bulk of the work is being done in
your application, database and integration tiers. The last big web project I
worked on had 26 web servers, 16 application servers, and two Unisys ES7000s
as the main backend database cluster (ES7000s are 64-way CPU boxes). Why did
we have so many web servers? Not because they were particularly resource
constrained, but just so that we could hold open the number of HTTP
connections so that all the various back end systems could catch up with the
occasional spike in load.

c) If you look at major web applications around the world, you'll find very
few written in straight C. Developers are too expensive, there are too few
methodologies, frameworks, testing infrastructure and all round experience
with writing web apps in C. Most enterprise web applications are written in
some Java implementation (JSP, J2EE etc) or .NET (ASP.NET, middle tier etc).
Why? Because there are robust IDEs, unit testing tools, modelling tools that
are all integrated. There are pre-build base functionality. There are a host
of enterprise services (like transaction support) provided by the underlying
framework. And a wealth of experience.

Bottom line - it's not all about running a single piece of code the quickest.
It's about reducing risk in development (writing non-trivial apps in C is
fraught with issues) and scalability (being able to scale to whatever peak
load you need to handle). 

(Aside: scalability and speed are not one and the same. You can have code
that can run very quickly, but if it's single threaded then it can only
handle a single user/request at a time. Scalability means handling more
users, concurrently. And sometimes that means each individual request runs
slower but you gain the ability to handle many thousands, tens of thousands
or millions of requests concurrently). 

I have some stats from the ms.com people (they run Microsoft.com - not
including hotmail, MSN etc). They handle well over 1.4 million concurrent
HTTP connections (average). www.microsoft.com itself handles 13 million
unique visitors/day. And none of that is written in straight C AFAIK.

Cheers
Ken

-----Original Message-----
From: thelist-bounces at lists.evolt.org
[mailto:thelist-bounces at lists.evolt.org] On Behalf Of Sales @ Lycosa
Sent: Thursday, 24 May 2007 6:45 PM
To: thelist at lists.evolt.org
Subject: [thelist] What is the best programming language for the web?

Hi,

I would like to open up a discussion on which programming language is 'best'
for web programming.

I have been using php for some years now, but I was recently told that C
could run up to 170 times faster. Raw speed is not necessarily an issue, but
it made me think about using other programming languages.

I am interested to hear other people's opinions, and to see what languages
you use. In particular, I am interested in speed of development, cost,
processing speed/server load and learning curve.

Phil Parker 



More information about the thelist mailing list