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

storing image

 
Ranch Hand
Posts: 455
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

hi,

any ideas on how images are stored in social websites like facebook/myspace. Its not stored in filesystem i believe. What would be the best approach to store images if have to develop a website like facebook application using j2ee .

i have stored images in db and displayed in on JSP using servlets for my current project . Is it a good approach if there are millions of users uploading images ?
I'm just curious :-)

thanks,
Rajeev
 
Ranch Hand
Posts: 166
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Anytime I have stored images for use for applications of mine I have stored them as blobs in an oracle database. That way you can use additional attributes in the table for indexing.
 
Rajeev Ravindran
Ranch Hand
Posts: 455
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i agree with that DB approach but if there are millions of images, is it the right way to do it ? i was wondering if there is anything much better which im not ever aware of.

thanks,
 
Ranch Foreman
Posts: 275
jQuery Eclipse IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
face book uses a system called Haystack.
read Inside Facebook’s Photo Factory
or this from facebook
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I've only ever used file system storage, meaning the relevant DB record contains all the information needed to access the image file on a file server.

You'd need to think about how to handle synchronization in the case where more than one person has write access to an image (not likely in the Facebook example, but often the case in image-handling applications).
 
Aniruddh Joshi
Ranch Foreman
Posts: 275
jQuery Eclipse IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
we use a netApp server to store images and access them using HTTP to display on the screen.
The paths are stored in a DB
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This has nothing to do with PD. Moving to General Computing

Eric
 
Rajeev Ravindran
Ranch Hand
Posts: 455
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thank you all for the replies !! its really informative..
no, there is no need for synchronization, no 2 people will be editing an image at same time. I was just curious to know about the image storing approach used by various websites which has millions of unique daily users.

Aniruddh, thanks for the facebook link.


- raj
 
Ranch Hand
Posts: 466
1
IntelliJ IDE Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can use content server, set workflow, etc....
 
Ranch Hand
Posts: 263
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You could store your images in a third-party storage like Amazon S3.

The advantage here is that the storage is quite cheap, and your main web-site is not hit with image requests, instead it goes to a third-party.

Infact a lot of social networking sites, like many have pointed out do store images separately.
The largest number of images is with facebook!
 
Ranch Hand
Posts: 419
Mac jQuery Objective C
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Check this one Facebook approach
 
Trust God, but always tether your camel... to this tiny ad.
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic