Skip to content
/ nds Public

A Go (golang) Google App Engine datastore package with strongly consistent caching.

License

Notifications You must be signed in to change notification settings

qedus/nds

Repository files navigation

nds

Build Status Coverage Status

Package github.com/qedus/nds is a datastore API for the Google App Engine (GAE) Go Runtime Environment that uses memcache to cache all datastore requests. This package guarantees strong cache consistency, meaning you will never get data from a stale cache.

Exposed parts of this API are the same as the official one distributed by Google (appengine/datastore). However, underneath github.com/qedus/nds uses a caching stategy similar to the GAE Python NDB API. In fact the caching strategy used here even fixes one or two of the Python NDB caching consistency bugs.

You can find the API documentation at http://godoc.org/github.com/qedus/nds.

One other benefit is that the standard datastore.GetMulti function only allows you to retrieve a maximum of 1000 entities at a time. The GetMulti in this package allows you to get as many as you need (within timeout limits) by concurrently calling the datastore until your entity request is fulfilled.

How To Use

You can use this package in exactly the same way you would use appengine/datastore. However, it is important not to mix usage of functions between appengine/datastore and github.com/qedus/nds within your app. You will be liable to get stale datastore entities as github.com/qedus/nds goes to great lengths to keep caches in sync with the datastore.

Limitations

PropertyLoadSaver is currently not implemented.