Mitch,
maybe someone with more knowledge about the flexible GAE environment or GCE
can help regarding portability of code and if there are performance
differences.
>From my experience with only the standard GAE environment (Python with
NDB/Datastore, GCS, Task Queue and a few other things), I don't think that
portability is an easy task here. Of course, you can use WSGI, Django,
webapp2 and so on, some standard features are conveniently wrapped (e.g.
logging, GCS as file I/O, sockets) etc. But at the end of the day, GAE is a
PaaS offering with nicely integrated services ready-to-go and easy to
manage and scale ("batteries included"), and as such it is probably less
portable than IaaS offerings. The NDB library for Datastore comes to my
mind. I guess, you could use equivalent clients in the Cloud Python library
to achieve a more portable solution for all of the features coming with the
Standard environment, but then it might make more sense to pick the
flexible GAE environment or even GCE. Each of the options come with their
own pros and cons, really depends on your requirements and
priorities/constraints.
Regarding the two GCS libraries specifically, I'm afraid they have
different APIs.
AppEngine's lib reference:
https://cloud.google.com/appengine/docs/standard/python/googlecloudstorageclient/functions
Cloud Client lib reference:
https://googlecloudplatform.github.io/google-cloud-python/stable/storage-client.html
Anastasios
Mit freundlichen Grüßen / Kind regards
i. A.
Anastasios Hatzis
Fon: +49 8374 930813
Fax: +49 8374 930810
Mobil: +49 1520 8592878
On 24 March 2017 at 14:29, Mitch Mitch <[email protected]> wrote:
> It does! Thats what I thought. Thanks, I just wanted to make sure one
> was not outdated or the improper use of the library.
>
> To follow up. Is there a performance difference?
>
> I'd like to keep the app provider agnostic (premature optimization) or if
> I end up hosting it natively or on GCE. So if I code in a new storage lib,
> I'd like to keep it flexible. But if it is much better / easier to use the
> GAE version, then I'll just use that.
>
> Best,
> Mitch
>
>
> On Thursday, March 23, 2017 at 6:05:29 PM UTC-4, Mitch Mitch wrote:
>>
>> Hello:
>>
>> I'm converting a Python app to use GAE and I'm translating the storage
>> provider from S3 to Google Storage. Before I go too far down the rabbit
>> hole.. I'm seeing two libraries to write to Cloud Storage.
>> "GoogleAppEngineCloudStorageClient" and "google-cloud-storage"
>>
>> Some docs say to use GoogleAppEngineCloudStorageClient
>> https://cloud.google.com/appengine/docs/standard/python/goog
>> lecloudstorageclient/setting-up-cloud-storage
>>
>> and some say to use google-cloud-storage
>> https://cloud.google.com/storage/docs/reference/libraries
>>
>> Which one is the best to use?
>>
>> Thanks!
>> -Mitch
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at https://groups.google.com/group/google-appengine.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/google-appengine/012a9aae-5d5b-4e77-8097-
> e98e0afdb3ec%40googlegroups.com
> <https://groups.google.com/d/msgid/google-appengine/012a9aae-5d5b-4e77-8097-e98e0afdb3ec%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>
--
HATZIS Edelstahlbearbeitung GmbH
Hojen 2
87490 Haldenwang (Allgäu)
Germany
Handelsregister Kempten (Allgäu): HRB 4204
Geschäftsführer: Paulos Hatzis, Charalampos Hatzis
Umsatzsteuer-Identifikationsnummer: DE 128791802
http://www.hatzis.de/
--
You received this message because you are subscribed to the Google Groups
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit
https://groups.google.com/d/msgid/google-appengine/CAABQH8ZAgYr28ZJ9sVZaXOAVUUBNTiU7eFV-wdLTxJSd2LO5eA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.