简体   繁体   中英

Can you integrate app engine standard with Firebase Storage to write and process files?

I'm looking to extend my Firebase project to app engine to help with cpu heavy file processing, specifically video transcoding.

App engine standard seems like a good fit because it can scale rapidly and to zero, however, after watching this GCP video (~0:40), it mentions that you have to use app engine flexible to write to the file system. Is this true? In the firebase documentation , it mentions app engine standard for something like this:

The Firebase SDKs for Cloud Storage use the Google App Engine default bucket...This is useful for performing audio encoding, video transcoding, and image transformations...The Java, Python, and go Standard environments for Google App Engine include the GAE Images API (Java, Python, which can resize, rotate, flip, and crop an image, as well as return an image serving URL which allows for client side transformations

Can app engine standard be used with Firebase Storage to download, process, and upload files to storage?

GAE does not support writing local files .

But you can very easily read and write files with Cloud Storage from GAE using client libraries for your chosen platform . You would have to stream the data into memory to work with.

If you're unable to load the entire file into memory to work with, then GAE might not be the right solution for you. If you need local storage space, consider using Compute Engine instead.

GAE Standard Python 3 DOES allow writing to the file system, via the /tmp directory. From: https://cloud.google.com/appengine/docs/standard/python3/runtime#filesystem

Filesystem The runtime includes a full filesystem. The filesystem is read-only except for the location /tmp, which is a virtual disk storing data in your App Engine instance's RAM.

This may not be suitable for large file sizes, though. You'd want to make sure your instance includes enough RAM to handle the file. Also, as the name implies, this is a temporary directory. The files written there will be gone once their space is reclaimed in RAM.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM