No idea about question #2 - it was my impression that S3 was a
stateless mechanism and didn't support the concept of streaming, but I
haven't read all that much about it, so I could easily be wrong.

#1 is probably best resolved by taking advantage of the S3 REST
interface and plugging that in to your code as desired. There's
nothing to my knowledge that uses S3 as a straight database backend
mechanism for the Django models - so anything you do there will likely
be custom code adding on as you specifically need it.

I don't know if I'd push that into a model myself -  maybe an instance
method that retreived the values you needed as desired?  Depending on
your needs, just doing some light custom code that can be invoked from
any view and makes agressive use of caching to pull down the values
you want is probably how'd I would initially try to tackle it. If you
allowed updating of that image through your site, then you could also
take advantage of that interface to invalidate the local cache of any
images and push in your newly updated pieces.

-joe

On 5/6/07, Sam Purtill <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> I am doing two things with Amazon S3:
>
> 1) Storing images/thumbnails for user profile pictures. Uploading 1
> picture and resizing it to 4 different sizes so I can grab those
> easily on different pages.
>
> 2) Allowing users to upload documents.
>
> I have two questions about doing this
>
> 1) What is the most logical way to set up your data models so I can
> retrieve the data from the S3 service as fast as possible?
>
> 2) How do I open a stream to the S3 service when a user is signed in?
> I want to be able to have a connection with the service that doesn't
> close until the user closes his/her browser if possible. If there is
> another way, such as opening a connection each page, that would be
> fine. Whichever is fastest.
>
> Thanks in advance,
>
> Sam
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to