0
votes

I'm developing a Google App Engine Java application with endpoints, which uses Appengine datastore for its persistence (Using JPA and Datanucleus) and works fine.

Now I want to migrate my backend(database) to Google Cloud SQL. I have already created cloud sql account and instance. I also granted permission for my GAE app to use this instance.

Now, how I can i rewrite my app or what are the changes I should make to my application, in order to migrate to cloud sql.

Any good tutorial is there for it? Any help is greatly welcomed.

1

1 Answers

2
votes

If you are willing to migrate from Datastore to SQL database. You need to make changes basically at your Database Layer (DAO Layer).

  • Firstly you need to review all the relationships between your entities as in case of SQL and the similar you need.
  • Secondly you need to review all the indexes you have created in your Datastore and put them accordingly in your SQL instance database.
  • Thirdly check your search operations on your Datastore entities (basically check if you need to create too many joins in among your entities as this could be slow in SQL if you have JOIN on entities with large amount of data).