Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Difference between servers?

 
Siddharth Bhargava
Ranch Hand
Posts: 280
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What's the difference between Web server, Application Sever and Container. Please could anyone explain me the concept with examples .... !!! Thanks in advance.
[ July 24, 2007: Message edited by: David O'Meara ]
 
Rahul Bhattacharjee
Ranch Hand
Posts: 2308
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is how I see the things , might not be a very formal definations.

Web server - For basic HTTP requests.For serving static content.

Web container - Implementation of servlets and Jsp.

Application server - Implementation of certain J2EE x.x version.And has to pass the testcases mentioned in CTS (Compatibility test suite) provided by sun for that particular J2EE specification.
[ July 24, 2007: Message edited by: Rahul Bhattacharjee ]
 
Siddharth Bhargava
Ranch Hand
Posts: 280
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Still not very clear concept wise...... Please could you give me some examples of products which are Web server and Web container but not application server. ...... or which are all of the three........Thanks in advance....
 
Rahul Bhattacharjee
Ranch Hand
Posts: 2308
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Siddharth Bhargavav:
Still not very clear concept wise...... Please could you give me some examples of products which are Web server and Web container but not application server. ...... or which are all of the three........Thanks in advance....


TOMCAT is web container (static pages + servlets + jsp) but not application server as it doesnot implement the complete J2EE specification.

Websphere application server (WAS) is application server.
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Be careful to define these terms when you have a conversation because they don't mean the same thing everywhere you go.

In my shop, an "HTTP server" does static HTML, images, etc, period. Anything that runs Java is an "application server". An application server can run a Servlet Container, an EJB Container or others. I doubt "container" is very well defined either, but these two are frameworks that run your code and provide useful services to your code. It very much feels like your code is running "inside" the container.
 
Pat Farrell
Rancher
Posts: 4678
7
Linux Mac OS X VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Rahul Bhattacharjee:


TOMCAT is web container (static pages + servlets + jsp) but not application server as it doesnot implement the complete J2EE specification.



Examples can be dangerous. Especially on terms that are defined by marketing folks.

Tomcat is also a web server (delivers static pages), and can be faster than Apache for some things.

Caucho's Resin is at least a web container, and delivers static pages well, but can't do all the things Apache can do. Resin started out as a JSP/servlet engine, but has added more J2EE stuff, I think it is full now.
 
Raghavan Muthu
Ranch Hand
Posts: 3381
Mac MySQL Database Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Siddharth Bhargavav:
What's the difference between Web server, Application Sever and Container. Please could anyone explain me the concept with examples .... !!! Thanks in advance.

[ July 24, 2007: Message edited by: David O'Meara ]


Server - A machine which serves the requests (from clients) with the requested resources.

In order to receive a request and respond to it, there should be a means to communicate. In computer terminology, we term it as a protocol which is an agreement between the two parties involved (client and server) that states the rules and regulations for the communication.

Web Server - as it indicates a machine which could serve the requests over web. That means, through the protocol for web (HTTP - Hyper Text Transfer Protocol) this machine will serve a request from clients.

A Web Server is limited to serve the static resources which are present inside it.

Application Server - its also a server where its NOT restricted with a single protocol like HTTP. Unlike web servers, it can service any requests from various protocols like FTP, SMTP as well.

In other terms, Application Server is a superset of WebServer.

Container - An application/software which could run inside a Web or Application Server to provide a dynamic content generation facility. This could be of anything for taking a decision at runtime.

The Containers vary based on its nature. Some are Web Containers which could serve for the web technologies (Servlets, JSPs) whereas some are EJB Containers to serve for the business components (EJBs).

The containers is more-or-less like a stand alone application but with a restriction is that it has to adhere certain standards defined by the Specification for the nature of it. Web Containers have some standards to be adhered for the technologies involved whereas it would be totally different for the EJB containers as the specification for EJBs differ.

How JRE for your Java Applications, Containers are for your specialized Java programs. These specialized Java Programs could be a Servlet, JSP Page or an EJB or a Web Service or a Portal. But without these containers, these programs will find no supporting environment to withstand and run.

The containers basically provide the implementation of lifecyle management, networking, multi-threading features etc to maintain the application based on the technologies it supports.

The Application Server is somehow superficial wherein it provides the environment for the container to fit in and run inside it. The containers are pluggable inside a server(Web or Application).

Does that help you?
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This question gets asked a lot in our Apache / Tomcat forum.
I've just added a FAQ entry.
It needs polishing but it covers some of the history behind these terms and should clear things up, or, at least explain why this will never be clear.
http://faq.javaranch.com/java/WebVsApplicationServer
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic