Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Better Approach in j2ee env.  RSS feed

 
Neeraj Vij
Ranch Hand
Posts: 315
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

What is the better approach in big commercial web application for uploading images.

Should I suggest using a file server or storing into a oracle db(used by my client).

I feel file operations are more faster as compared to db operations.

maximum file size will be around 500 kb.

any inputs will be a great help.

Regards,
Neeraj.
 
Annie Smith
Ranch Hand
Posts: 172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you are sure that there is a less likelihood for the filesize to exceed 500KB, a database should be a good choice IMO.
 
Tien-Chih Wang
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
You can also store the img URL in DB, and mapping to another file server.

Tien-Chih Wang
 
clive jordan
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I guess is also depends on server load and resources and how long-lived your transactions or seesions are. I would imagine that if there was a lot of client traffic, you could have a lot of Entity beans being active at once, each consuming memory. If the images are very large and stored in the database, that is a lot of memory milling around in beans. If you use URLs instead, this gives a lot more headroom on the EJB server. However, you pay the price somewhere. The database will no doubt have a suitable backup/failover mechanism so having the images in the database you to plug in and go. If you are storing the images on disk on another server, you will need to ensure it is suitably robust which may require extra expense and effort.

Cheers,
Clive
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!