Question on serving Images on App Engine ( 2 Alternatives ) -


is planning to launch a comic site that works on comic strips (images).

So in my 2 ways I am thinking:

1 Use of LinkProperty

  class comedy (db.Model) image_link = db. LinkProperty () Timestamp = db.DateTimeProperty (auto_now = True)  

Advantages: Images are found only by disk space (and disk space is cheap, I take it?) I can easily I can set the app to be cached in the user's browser with an expiration date. I can use the memcache set to retrieve entities fast. I can use it (for high traffic)

using 2 BlobProperty

I used this tutorial, it is very clean

Side Question: What I can say that BlobProperty does "protect" my relationships with external relationships? This means that people can not directly link directly to comic strips

I have some concerns for method 2.

  • I can clearly remember to read these institutions as quickly as possible.

But then:

  • Is it good to remember images? My images are large (100-200kb per image) I think memcache only allows 4 GB of cached data? Or is it 1MB per mechmarketed unit, with unlimited entities ...

  • What if the appendix fails the memchease? -> Solution: I have to go back to the datastore.

  • How do I cache these images in a user's browser? If I was not doing any method 1, I could easily add it to the end date for the content in my app.yaml, and take photos cached users side.

Would you like to hear your thoughts, should I use method 1 or 2? Method 1 Dead looks simple and simple, should I be careful about it?

[edit] How to solve this dilemma? The dilemma: The last thing I want to do is prevent people from getting a direct link to the image and put it in a little while. Because the user will automatically direct the image to its server (and not the ad / content around it, if the user had accessed it from the main page)

You are going to use a lot of bandwidth to transfer all of these images from the server to the customers (the browser). Remember that the maximum number of episens in the number of files you can upload is, I think it is 1000 but it can increase lately and if you want to control access to files then I do not think That you can use option # 1. Option # 2 is good, but your bandwidth and storage costs are going to be very high if you have a lot of content to solve this problem of content, usually the Content Delivery Network (CDN) Change. Amazon S3 and Agentcast are two such CDNs that support token based access URLs. That means, you can generate tokens in your appenin app, which is good for IP address, time, geography and some other parameters and then give your CDN URL to the requester with this token. The CDN serves your images and checks access to the basis of the token. This will help you control your reach, but remember that there is a desire, then there is a way and you can not be 100% safe - but you probably get close enough.

Instead of archiving the material, Appengine will store it on the CDN and use the appenjun to create the URL with the token pointing to the contents on the CDN.

Here are some links to the signed URLs. I have used both of these:

- See 'Content security'


Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -