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 Java in General and the fly likes image handling in Java 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 » Java » Java in General
Bookmark "image handling in Java" Watch "image handling in Java" New topic
Author

image handling in Java

Elangovan Kal
Greenhorn

Joined: Feb 23, 2004
Posts: 2
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

Joined: Jan 30, 2002
Posts: 3451
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.


Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius - and a lot of courage - to move in the opposite direction. - Ernst F. Schumacher
Jessica Sant
Sheriff

Joined: Oct 17, 2001
Posts: 4313

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.


- Jess
Blog:KnitClimbJava | Twitter: jsant | Ravelry: wingedsheep
Elangovan Kal
Greenhorn

Joined: Feb 23, 2004
Posts: 2
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: image handling in Java
 
Similar Threads
Image display problem
architectural help required
difference between the webserver and application server
application server and web server difference needed
I need suggestions on the following logic i developed to generate a random string.