0

I'm trying to figure out how to force a flush of the GAE datastore to disk in the dev appserver.

I understand that some time ago writes were disabled until dev_appserver shutdown from here: App Engine local datastore content does not persist

My app is running 24/7 doing things and generating data, and I do not want to have to restart things from zero if the VM hosting my dev_appserver goes down or something. So, I'd like to schedule a periodic flush of the datastore.

I found this method for 1.6.4: GAE SDK 1.6.4 dev_appserver datastore flush

That doesn't work anymore, and I haven't found a variant using the API server that I am permitted to invoke from my app. Anyone know how to flush to disk on demand in 1.9?

Community
  • 1
  • 1
  • 2
    I would highly, highly, highly recommend that you do *not* use the dev_appserver as a production system. It is designed as a testing tool for App Engine applications and doesn't have any guarantees around availability or data loss. If you are working with real data, consider using the actual Datastore. With the Cloud Datastore API (https://cloud.google.com/datastore/docs/concepts/overview) which lets you access Datastore directly from your VM and has specific guarantees around uptime: https://cloud.google.com/datastore/sla – Patrick Costello Apr 15 '16 at 18:03

1 Answers1

0

No, dev_appserver is not designed to be used in production and provides no reliability or durability guarantees.

Ideally you'd be using the service on GCP, however if for some reason that is not possible you can look at the open source project AppScale that is designed for feature parity of Google App Engine / Cloud Datastore.

Dan McGrath
  • 41,220
  • 11
  • 99
  • 130