This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes Architect Certification (SCEA/OCMJEA) and the fly likes Dynamics of static content Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Certification » Architect Certification (SCEA/OCMJEA)
Bookmark "Dynamics of static content" Watch "Dynamics of static content" New topic
Author

Dynamics of static content

Rama Raghavan
Ranch Hand

Joined: Aug 22, 2001
Posts: 116
This is a generic web architecture question:
Consider we have a web server (say iPlanet) and an application server (say, weblogic, or webshpere). The application is deployed as a war file on the app server. The web server and app server are on two different boxes (unix).
The weblogic plug-in on the iPlanet directs traffic to the app server based on ppath.
A given URL resolved on the app server (via jsp/servlets/ejb communication) may have static content such as images or links to html etc.
Seems to me that the static content can be managed better by not putting them inside the war file..say I have updates to the images, etc..BUT
1. Could the static content (gifs, text, multi-media files, flash, javascript) for an application be stored on the web server, while dynamic content (jsp/servlets) be located on the app server ?
2. Does this mean the app server opens a http connection with the web server as well ?
3. What are the performance issues with this model ?
4. Are there best practices anyone can share on this
Thanks much -


Rama Raghavan<br />SCJP2<br />SCWCD
Ajith Kallambella
Sheriff

Joined: Mar 17, 2000
Posts: 5782
Okay, before we proceed, I want to get some terminology corrected. The "web server" you are talking about is actually the HTTP server. These days the term web server has become synonymous with web container that hosts JSPs and Servlets. Similarly the term "app server" refers to an infrastructure that has both the web container and the ejb container. This design also promotes the concept of co-locating the web container with the EJB container to help improve performance. So, we have an http server, a web server and an app server.

1. Could the static content (gifs, text, multi-media files, flash, javascript) for an application be stored on the web server, while dynamic content (jsp/servlets) be located on the app server ?

Yes. Since it is the http server that serves the content to the client, images and other resources are usually stored on the http server, and resolved at runtime by the server. You can simply reference them in the generated HTML response using relative path maps.

2. Does this mean the app server opens a http connection with the web server as well ?

No, nothing changes. The app server works the way it does, building the dynamic content in conjunctino with the web server. The app( and web ) server will only need to access the resources if they are required for some processing. For instance, if you are analyzing an image while building the content, then you will need the resource to be on the app server.

3. What are the performance issues with this model ?
None.
4. Are there best practices anyone can share on this
Separate static content from dynamic content.
Use a http server in front of the app server
Co-locate webcontainer with ejb container.


Open Group Certified Distinguished IT Architect. Open Group Certified Master IT Architect. Sun Certified Architect (SCEA).
Rama Raghavan
Ranch Hand

Joined: Aug 22, 2001
Posts: 116

2. Does this mean the app server opens a http connection with the web server as well ?
....For instance, if you are analyzing an image while building the content, then you will need the resource to be on the app server.

Thanks for mentioning it..'cos that is what I should have stated in my post..
Can the resource (static content) be on the http server or should it have to be on the app server ?
 
 
subject: Dynamics of static content
 
Similar Threads
Tomcat vs J2EE
diff between jar, ear and war files in detail
Dynamics of static content
Regarding WAR & EAR
Automated deployment script using ant