Monday, March 7, 2005

What is an Application Server?

A friend recently asked me about the difference between an Application Server and a regular server program that is created using sockets in Java or C/C++. I explained to him that when a developer creates a regular server that locks on to a port listening to client requests, he is in charge of everything that the server program does. This sounds good at first since the developer is free to do whatever he wishes, but when creating an advanced and sophisticated piece of software that has requirements for clustering support, database connection pooling, web services, standards compliance, cross-platform deployment, database abstraction, webpage serving etc., the developer would go crazy trying to implement all of them on his own.

But one could also argue that all these advanced features can also be implemented using bits and pieces from different libraries/packages developed by different vendors and open-source projects. A C/C++ developer could use the Beowulf libraries for clustering, DBStep for database abstraction and so on. A Java developer can use JDBC for database abstraction, use elemenope for scalability and client/server messaging, Apache Axis for web services, Apache Tomcat for serving dynamic webpages etc.

Now using these different libraries does solve the purpose but they create new problems. There is no integration between these various libraries therefore each library has to be managed seperately. If tomorrow Apache Axis decides to make an update to their software and the developer wants to use the updated version as part of his software, the new version might interfere with a part of the elemenope code.

An integrated environment is one where all the sub-parts have been designed specifically to work together and not to interfere with each other's work. An application server gives you just that; an integrated set of libraries that work together to give developers a platform that provides all the functionality they need to create an advanced application.

But what about all the different Application servers out there, for Java, XML, PHP etc. Whats the difference there or why should a developer use one over the other. And why should a company opt for an expensive commercial application server when he can use an open-source alternative. I came across this article on the SYS-CON website which has the highlights of just such a discussion.