1

In the google app engine firebase tic-tac-toe example here: https://cloud.google.com/solutions/using-firebase-real-time-events-app-engine

nbd is used to create the Game data model. This model is used in the code to store the state of the tic-tac-toe game. I thought nbd was used to store data in Cloud Datastore, but, as far as I can tell, nothing is being stored in the Cloud Datastore of the associated google cloud project. I think this is because I am launching the app in 'dev mode' with python dev_appserver.py app.yaml In this case, is the data being stored in memory instead of actually being written to cloud datastore?

Ying Li
  • 2,500
  • 2
  • 13
  • 37
BrainPermafrost
  • 644
  • 2
  • 7
  • 20

2 Answers2

2

You're correct, running the application locally is using a datastore emulation, contained inside dev_appserver.py.

The data is not stored in memory, but on the local disk. So even if the development server restarts it will still find the "datastore" data written in a previous execution.

You can check the data actually saved using the local development server's admin interface at http://localhost:8000/datastore

Dan Cornilescu
  • 39,470
  • 12
  • 57
  • 97
1

Dan's answer is correct; your "dev_appserver.py" automatically creates a local datastore.

I would like to add that if you do wish to emulate a real Cloud Datastore environment and be able to generate usable indexes for your production Cloud Datastore, we have an emulator that can do that. I assume that's why you want your dev app to use the real Datastore?

Either way, if you just doing testing and need a persistent storage to test (not for production), then both the default devserver local storage and the Cloud Datastore Emulator would suffice.

Ying Li
  • 2,500
  • 2
  • 13
  • 37