0

I'm currently new to web developing and right now I started with a Spring Boot application which I converted to standard App Engine project. I'm wondering if it is possible to not convert my Spring Boot application to my App Engine project and still use Datastore as database?

Ryan A.
  • 411
  • 4
  • 13
remy_zero
  • 25
  • 4

1 Answers1

3

Yes, it's possible to use the Cloud Datastore from an app in the GAE flexible environment, from outside GAE or even from outside the Google Cloud. From Cloud Datastore (emphasis mine):

You can access Cloud Datastore from anywhere using the Cloud Datastore API. Use the Google Cloud client libraries to store and retrieve data from Cloud Datastore.

The same Cloud Datastore data is available regardless of if you use the App Engine libraries, the Google Cloud client libraries, or call the API directly.

But you can't use the GAE Standard Environment Client Libraries, you have to use either the Cloud Datastore Client Libraries or the Cloud Datastore API v1.

Potentially of interest: the Deploying to the App Engine Flexible Environment guide happens to use a spring boot app as example.

Dan Cornilescu
  • 39,470
  • 12
  • 57
  • 97
  • Potentially relevant: https://stackoverflow.com/questions/42051453/how-do-i-use-google-datastore-for-my-web-app-which-is-not-hosted-in-google-app-e/42060551#42060551 – Dan Cornilescu Mar 06 '18 at 05:59
  • Thank you Mr. Cornilescu, your effort is greatly appreciated. – remy_zero Mar 06 '18 at 06:47
  • How can I check if my project is in a GAE flexible environment though? I'm sorry I am quite new to web development and for now I'm just following tutorials like this one [here](https://medium.com/google-cloud/getting-started-with-google-app-engine-and-spring-boot-in-5-steps-2d0f8165c89) – remy_zero Mar 06 '18 at 06:56
  • If you have "env: flex" in your app.yaml it's GAE flex, otherwise it's standard. This might also help: https://stackoverflow.com/questions/45842772/how-to-tell-if-a-google-app-engine-documentation-page-applies-to-the-standard-or – Dan Cornilescu Mar 06 '18 at 12:51