Thanks for clarifying this further Stuart. It makes much sense now.

Chris


On Jul 3, 5:05 pm, Stuart <stut...@gmail.com> wrote:
> 2009/7/3 Christian Fazzini <christian.fazz...@gmail.com>:
>
>
>
> > Currently, we are saving the images onto our server. If we can hotlink
> > the images to S3. This would save us storage space. However, the only
> > drawback is, whenever a user loads a page on our website, it would
> > have to connect to the S3 servers everytime, to load the images on our
> > site.
>
> > If, on the other hand, we saved the images on our server, then our
> > website would only have to load everything locally instead of having
> > to connect to the S3 servers.
>
> > Which method should be used?
>
> It's completely up to you.
>
> FIrst of all you don't quite understand how a browser loads a web
> page. It's the browser that connects to S3 to get the images not your
> server, so there is nothing "local" about either option. In fact you
> might see a small improvement in load time by using S3 due to the
> pipelining algorithms employed by most browsers.
>
> If you cache the images on your servers then you guarantee that they
> will always work without needing to check the Twitter API for changes.
> The reason for this is that when someone changes their profile image
> the S3 URL also changes leading to broken images if you're loading
> them from S3. The downsides are that you're using a lot more
> bandwidth.
>
> If you use the S3 URLs you'll need to regularly check that the S3 URL
> still exists or hit the API for each user to see if they've changed
> their image.
>
> Which is best for you really depends on what your application is doing
> with the API and what service it's providing to its users.
>
> -Stuart
>
> --http://stut.net/projects/twitter
>
> > On Jul 3, 4:05 pm, Christian Fazzini <christian.fazz...@gmail.com>
> > wrote:
> >> Anyone?
>
> >> On Jul 1, 4:04 pm, Christian Fazzini <christian.fazz...@gmail.com>
> >> wrote:
>
> >> > So is this wrong if I save the image and user details locally (on our
> >> > server) ?
>
> >> > Also, how would it be possible to get the users profile pic 
> >> > athttp://apiwiki.twitter.com/Twitter-REST-API-Method%3A-users%C2%A0show
> >> > using <profile_image_url> ?
>
> >> > At current it only returns _normal.jpg, which is set at 43x43. I need
> >> > the bigger profile image that is set at 73x73
>
> >> > On Jun 30, 10:45 pm, Abraham Williams <4bra...@gmail.com> wrote:
>
> >> > > Twitter has said in the past they are more then willing to take care
> >> > > of the bandwidth for smaller applications but if you go huge they ask
> >> > > you to look at local caching.
>
> >> > > On Tue, Jun 30, 2009 at 08:12, Philip Plante<pplante....@gmail.com> 
> >> > > wrote:
>
> >> > > > You can cache the user's profile data so API lookups are kept to a
> >> > > > minimum.  Though the profile image should be hotlinked using whatever
> >> > > > value is stored int he profile_image_url attribute of the user object
> >> > > > returned from Twitter.  By using S3 as a central source Twitter is
> >> > > > able to help alleviate image sync issues that would arise when third
> >> > > > party services cache the image locally.  Also keep in mind that most
> >> > > > of the time your user's should already have their cache primed, via
> >> > > > twitter.com or another service, due the caching rules employed by
> >> > > > Twitter and S3.
>
> >> > > > On Jun 30, 6:32 am, Christian Fazzini <christian.fazz...@gmail.com>
> >> > > > wrote:
> >> > > >> Hello,
>
> >> > > >> We are in the process of developing a website that uses the Twitter
> >> > > >> API.
>
> >> > > >> I understand that the Twitter API is capable of retrieving a user's
> >> > > >> profile photo via:
>
> >> > > >>http://apiwiki.twitter.com/Twitter-REST-API-Method%3A-users%C2%A0show
>
> >> > > >> Other websites that are using the Twitter API are, instead, getting
> >> > > >> these profile photos from Amazon's S3 storage service 
> >> > > >> (http://s3.amazonaws.com/twitter_production/).
>
> >> > > >> At current when a Twitter user logs onto our website, it will 
> >> > > >> retrieve
> >> > > >> his information and store it our local db. At the same time it will
> >> > > >> also grab the profile photo from <profile_image_url> and store it on
> >> > > >> our server.
>
> >> > > >> In my opinion, this seems more appropriate instead of having the 
> >> > > >> site
> >> > > >> quer the Twitters API and / or hotlink to Amazon's S3 storage 
> >> > > >> service
> >> > > >> whenever a user loads a page. Especially, if it has to load several
> >> > > >> profile photos on every page load, on our site. I could be wrong
> >> > > >> here.
>
> >> > > >> What do you guys think the best approach for this is?
>
> >> > > >> Hoping to hear from you soon.
>
> >> > > >> Best regards,
> >> > > >> Chris
>
> >> > > --
> >> > > Abraham Williams | Community Evangelist |http://web608.org
> >> > > Hacker |http://abrah.am|http://twitter.com/abraham
> >> > > Project |http://fireeagle.labs.poseurtech.com
> >> > > This email is: [ ] blogable [x] ask first [ ] private.

Reply via email to