• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

image handling in Java

 
Elangovan Kal
Greenhorn
Posts: 2
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
We are planning to develop a web application with image gallary. We want to publish the images in the web. The end user can customise the images and can save it. Those images will be stored in the back end and planning to publish in the web as and when the end user needs. But we feel, we may get a performance problem due to this approach. Because for each request , our request will hit the application server and intern application server is will interact with database and vise versa. So for extracting the image every time will take more time.
So is there any alternative approach for this kind of scnerio? How can we handle this situation?
Thanks in Advance,

Regards,
Kenny
[ February 23, 2004: Message edited by: kenny ]
 
Michael Morris
Ranch Hand
Posts: 3451
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi kenny,
Welcome to JavaRanch, the absolute best site on the www for Java information. We don't have many rules around here, but we do have one. Please change your display name to a first and last name to comply with the JavaRanch Naming Policy. You can change it here. Thank you for your cooperation.
 
Jessica Sant
Sheriff
Posts: 4313
Android IntelliJ IDE Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
will you be storing the images in a DB or just the path to where the image resides on the server in the DB?
I ask because if you're simply storing the path in the DB, you may be able to do some educated-guessing / caching in order to prevent too many calls to the DB.
Scenario:
User logs in and selects to view a picture from "mars gallery". Instead of only grabbing that one image, you get the path info for ALL the images in the "mars" gallery and store the info in session. Then if the user views more images from the same gallery (which would seem pretty likely). You simply get the information from the user's session rather than making another call to the DB.
 
Elangovan Kal
Greenhorn
Posts: 2
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We are planning to store the images in the DB. 'cas the end user can customize the image and he can again upload. So for this kind of situation, i feel storing the URL in the DB can be a good option?
Please justify....
Thanks in Advance..
Originally posted by Jessica Sant:
will you be storing the images in a DB or just the path to where the image resides on the server in the DB?
I ask because if you're simply storing the path in the DB, you may be able to do some educated-guessing / caching in order to prevent too many calls to the DB.
Scenario:
User logs in and selects to view a picture from "mars gallery". Instead of only grabbing that one image, you get the path info for ALL the images in the "mars" gallery and store the info in session. Then if the user views more images from the same gallery (which would seem pretty likely). You simply get the information from the user's session rather than making another call to the DB.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic