• 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
  • Devaka Cooray
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Jeanne Boyarsky
  • Tim Cooke
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
Bartenders:

Providing dynamic content from separate web/app servers

 
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello all. I wasn't sure whether to post this in this forum or whether this is more of a Apache/Tomcat issue. But here goes.
I am converting a Microsoft IIS website to Apache/Tomcat/Java. One of the applications within the web pulls images from a database, stores the contents into a dynamically-generated .jpg file, then returns a dynamically-generated HTML page with an IMG SRC= tag pointing to the image file name. In the current configuration (the IIS one), the web server and the application server are on the same physical machine. So all the application has to do is retrieve the image data, convert and store it into a .jpg file, then stage the .jpg file in a directory on the machine that is one of the web server's virtual directories, then return the HTML.
One of the major differences between the old and new webs' configurations is that the new version has the application servers (Tomcat) running on different machines than the web servers (running Apache.) There will be two load balanced web servers connected to two load balanced Java application servers. I know how to do convert nearly everything, at least conceptually, that this piece of the functionality currently does. The retrieval from the database and the generation of dynamic HTML isn't a problem. Where I'm stuck is determining how to copy the files onto the web servers from the application servers once the image data is retrieved and the .jpg file is built.
To restate the question, if you have separate web and application servers, and the web server provides dynamic content
that must be accessible in a virtual directory on the web machine, how's the best way to move the data? FTP, sockets, etc.? Furthermore, with this sort of application am I going to have to propagate the dynamically created image across all my
web servers? When the dynamically-generated HTML reaches the browser, and the browser requests the embedded image, will the request for the image 'automagically' be routed back to the server where the request originated? Does Apache/Tomcat provide some sort of 'affinity' that tries to keep a web browser coming back to a particular web server?
Thanks for any info,
Rick <><

[This message has been edited by Rick Crawford (edited December 03, 2001).]
 
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
We accomplish something like this at work (on Solaris boxes) using an NFS file mount.

It makes a directory on a remote machine appear as 'local' to another box.
 
a fool thinks himself to be wise, but a wise man knows himself to be a fool - shakespeare. foolish tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic