Replacement NDB datastore library for Go

51 views
Skip to first unread message

re...@el-tramo.be

unread,
Jan 30, 2021, 6:31:15 AM1/30/21
to Google App Engine
Hi,

I'm investigating using Go for an AppEngine project that uses Google Cloud Datastore. The official Go package for accessing datastore seems to be just that: a package for accessing the datastore. Coming from previously having used Python for App Engine apps with datastore, with the NDB library (and previously the DB library) available, this feels very limited: 

- there is no support for reading/writing models into datastructures without dataloss if the DB entity doesn't match the datastructure (something which was even provided in the old Python DB library)
- there is no support for local or global caching (available in NDB)
- there is no support for a unit-testable environment (something which also isn't in NDB, but used to be available in the old DB package)
- ...

Are there any projects out there that offer a more high-level API for datastore, preferably with the above properties?

Since I couldn't find one, I started one here: https://github.com/remko/nds , but no working code yet.

thanks,
Remko

Kaan

unread,
Jan 30, 2021, 2:01:40 PM1/30/21
to Google App Engine
I'm not really answering any of your questions here, but just making conversation

NDB was a true masterpiece

I switched to NodeJS - new libraries make me sad, both functionality-wise and design-wise, but honestly, I don't look back despite how they compare to the old

Personally I miss retry functionalities and well documented behaviour + exception cases most

I suggest you look into NodeJS as well, JS is really an inferior language, yet the benefits are enormous, and the advantages are countless - for example with new libraries you can just access/process data locally very practically, with Python it was an acquired master skill

Prateek Malhotra

unread,
Feb 1, 2021, 12:17:03 AM2/1/21
to Google App Engine
Not sure if you've seen github.com/qedus/nds/v2 yet - but you could implement your own Cacher interface that behaves the way you'd prefer (e.g. with in-memory caching) instead of trying to rewrite a client from scratch.
Reply all
Reply to author
Forward
0 new messages