views:

112

answers:

3

Hi All,

I am developing an application in google application engine which would have a user profiles kind of feature. I was going through the Google App's online tutorial where I found that the maximum number of static files (app files and static files) should not exceed 3000. I am afraid whether the user's would be able to upload their images when the number of users increase. Is this limitation for the Free Quota only or its even after billing. In the document, its mentioned as the additional limit than the Free Quota.

Please suggest.

Thanks in advance.

+2  A: 

There is a new service called the BlobStore that let's you store binary data in the database. Also you may want to look into Amazon S3 as storage for the data. If user's are uploading images they cannot be stored as static files. Static files are files included in your GAE project like html and png/jpg/gif files.

BrennaSoft
Thanks for your reply Brenna. But I have a doubt on your post. Its fine if we use the blobstore for storing binary files. But if we save them in a directory/folder as a file, that should be considered as the static file. Correct me if I am wrong. Anyways, i would consider to storing images in database.
anand
You cannot write to the file system on GAE.
BrennaSoft
Thanks Brenna.. Got your point
anand
+5  A: 

Welcome to Stack Overflow!

One of the limitations in App Engine is that you cannot write directly to the filesystem from your app. Static files would be things like HTML, CSS, javascript and images that are global to your application, and get uploaded manually when you deploy. They are uploaded to and served from different servers than the ones that handle dynamic content.

Since you can't write to the filesystem from your app, files uploaded by users must be saved to the datastore as blobs. These are not considered static files. As others have mentioned, you can use S3 or the Blobstore API, however both of these require billing. With the free quotas, each entity can be up to 1MB, and each HTTP request and response can be up to 10MB. Using standard entities with a BlobProperty, you can easily store and serve dynamically uploaded files up to 1MB, or 10MB if you want to get fancy and store your blob in slices across multiple entities.

Drew Sears
Thanks a lot for this thorough description..
anand
A: 

greetings! as others have mentioned, for more dynamic content such as user-uploaded files, those should go into the datastore as blobs, or if they're larger, as Blobstore objects (max size 2GB).

3000 static files is somewhat reasonable unless you have a lot of static assets (such as images, HTML, CSS, and JS files). for Python source however, you have another workaround, and that is to throw all your .py files into a single ZIP so they don't hit that count so badly. here's an article that describes how to do this: http://goo.gl/p4zE ... just be aware that this article talks about how to bundle Django's source with App Engine. however, that's unnecessary unless you're doing 1.2 or are using a fork. App Engine systems already have 0.96, 1.0, and 1.1 on them.

hope this helps!

wescpy