Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

storing image

 
Rajeev Ravindran
Ranch Hand
Posts: 455
  • Mark post as helpful
  • send pies
  • 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
 
Jeremy Wilson
Ranch Hand
Posts: 166
  • Mark post as helpful
  • send pies
  • 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
  • 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,
 
Aniruddh Joshi
Ranch Hand
Posts: 275
Eclipse IDE jQuery Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
face book uses a system called Haystack.
read Inside Facebook’s Photo Factory
or this from facebook
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • 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 Hand
Posts: 275
Eclipse IDE jQuery Spring
  • Mark post as helpful
  • send pies
  • 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
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • 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
  • 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
 
Vinod Tiwari
Ranch Hand
Posts: 466
1
IntelliJ IDE Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can use content server, set workflow, etc....
 
James Ward
Ranch Hand
Posts: 263
  • Mark post as helpful
  • send pies
  • 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!
 
pawan chopra
Ranch Hand
Posts: 417
jQuery Mac Objective C
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Check this one Facebook approach
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic