Forums Register Login

Difference between web server & application server

+Pie Number of slices to send: Send
Can someone tell me the difference between web server and application server ? If u can quote some examples it will be helpful.
My understanding is that you cannot deploy components in webserver, whereas one can deploy components like EJB in app server. Is my understanding right ?
+Pie Number of slices to send: Send
There are several different flavors of servers, and various products blur the lines so it's not always easy to know what's what. I don't think everyone is going to agree on names, but see if this make sense:
A vanilla web server minimially serves static HTML, images or other files. I'd be happy to call that a "web server" or more specifically an HTTP server.
A J2EE servlet container provides the framework for you to run servlets, JSPs and so on. I might call that a "presentation server" just to keep things straight.
A J2EE EJB container provides the framework for you to run EJB stuff: session beans, entity beans, etc. For my money, that's definitely an "application server".
You can architect these things using one vendor product or two or three, on one box or two or three, in one JVM or two or three. Or multiples of any server if you want load balancing and redundancy. The options are dizzying, no? And we left out database servers altogether!
+Pie Number of slices to send: Send
Thanks James, but does web server also take care of Connection pooling for databases and Resource pooling ?
Eg:- Tomcat is a web server right, so this should be taking care of these isnt it ?
If I take an example of yahoo mail a/c & we assume it uses EJB, it will require both application server & web server isn't it as we cannot deploy components on web server. In that case who takes care of resource management & connection pooling ?
Am I too confused ??
+Pie Number of slices to send: Send
In that case, web server takes care of pooling of web components (servlets etc) and app server takes care of EJBs.
If you use an app server, you do not need a web-server. An app server has web containers (Servlets, JSPs, HTML, images, etc) and an EJB container for EJBs. So, depending what is being "served" to the client, one of the containers will come into play, for resource pooling etc.
Does that help ?
+Pie Number of slices to send: Send
Hi SJ,
You can have Tomcat manage a db connection pool for you with a Resource element (you can see the docs on Tomcat for more info and an example in the roller weblogger).
Assuming that Yahoo uses EJB on the back end thena ll the resource mgt and connection pooling etc would be (hopefully) handled in the ejb server and not from the web tier. So you would not need db connections from the web tier (instead you would go through a Business Delegate and probably a Session Facade to get to your EJB's.)
Hope this helps.
+Pie Number of slices to send: Send
Bingo,Thanks all got it
+Pie Number of slices to send: Send
 


If you use an app server, you do not need a web-server.


I'm just getting picky with language, but even with an all-in-one product, it can be useful to distinguish these separate components. When we talk architecture, we can say "function x belongs in the servlet container" or "function y belongs in the app server". For example, within the WebSphere family, there is a web server (Apache based), a servlet container, and an EJB container. They could all be in one process, or on separate boxes or JVMs for load balancing or scaling purposes. My current project runs the WebSphere http and servlet parts with a non-EJB app server.
It's just a flesh wound! Or a tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 1336 times.
Similar Threads
Difference between Web Server and Application Server
Diff betn web and App server
Difference between Application Server and Web Server
App Servers and Web Servers
Diff betn web and App server
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 09:59:20.