• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Why do we require a web server and an application server?

 
Ranch Hand
Posts: 174
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi friends
Its been recommended that an ideal architecture for a medium to big sized web based application is supposed to be
--Firewall
--web servers (e.g. Apache)
--firewall
--app servers
--Database

It would mean that deploy the application in two parts, .war file and .ear file, all web related activies on web server and then all the ejb stuff's,business processing and other things on app server.

Can we discuss here the benefits and complexity with this kind of architecrure not just w.r.t assignment but real world also?


Vinay
 
Sheriff
Posts: 5782
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is a general J2EE architecture question, so you have a better chance of initiating some interest in the J2EE forum. Transferring this thread there....
 
Ranch Hand
Posts: 704
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Vinays,

One reason why I don�t personally like this architecture is because it might impact your application�s performances pretty badly. To be more precisely I�ll tell you that separating the web app and ejb container (and having separate war and ear) will make impossible for your servlets or jsp to access the ejbs via their local interfaces. Therefore every client call will result in at least one remote call form the presentation layer to the business layer. Therefore one needs to design the application using kind of command design pattern strategy in order to reduce the number of calls from one layer to another. This will tide the application design to the system architecture as well.
On the other hand this architecture provides very strong security capabilities. Even more this is exactly the kind of requirements that advocate the need of using an ejb container. So I suppose the answer is somewhere in between: if all deployed applications were initially designed for this kind of hardware architecture, it might be an excellent solution. However it might not be the most optimal configuration for deploying all type of applications.
Regards.
 
Vinay Singh
Ranch Hand
Posts: 174
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Valentin
I am facing the same problems and as an architect or solution designer we might need to justiy why this is ok and why not.I have got some points on this from net and would like to share with all

Reasons to add a web tier
1) Buffering stream input (data coming from the brower) - this is important for applications with different speed / quality client connections (e.g. dial-ups vs. DSL).

2) Buffering stream output (data going back to the browser) - this is even more important for applications with different speed / quality client connections - you don't want to waste a thread in your app tier waiting on data to get acked through a dialup connection.

3) Connection buffering and throttling (lots of incoming connections) - the handling for these conditions is often more efficient and more graceful in a web server; why waste your app tier resources handling this?

4) SSL - assuming you don't hardware accelerate it in your hardware load balancer, it's typically much more efficient to handle the SSL in the uber-scalable web tier than in the app tier.

5) Security - there can be a firewall between the web tier and the app tier, and a firewall in front of the web tier, and only one port (assuming no ssl) open in either firewall.

Are these valid and are there some more like this ?

Cheers
Vinay
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic