Re:App Engine’s New Go 1.11 Runtime
by Strom on Tuesday October 16, 2018 @01:59PM
(#18231571)
Both google.golang.org/appengine/datastore and cloud.google.com/go/datastore connect to the same data? Is there a list of incompatibilities somewhere? I remember seing some serialization differences between these two datastore libraries.
[ Parent
| on HN ]
Re:App Engine’s New Go 1.11 Runtime
by chrisbroadfoot on Tuesday October 16, 2018 @05:22PM
(#18233389)
You remember right - I think you might be referring to this issue:
https://groups.google.com/forum/#!topic/google-api-go-announ...
> the cloud datastore package will default to writing your nested structs as entity values, while the appengine datastore packages will only write your nested structs as flattened sets of attributes.
Other than that, there are no differences.
(GCP Gopher)
Hi (App Engine PM here).
Yes both libraries connect to the same database (Cloud Datastore). cloud.google.com/go/datastore is preferred as it uses the Cloud Datastore API instead of the App Engine specific API, so your code will be portable.
You are right that the devil is in the details, and there might be some slight serialization differences. I cannot find an exact list.
Feel free to post here if you need more help.