Search code examples
javagoogle-app-enginegoogle-cloud-endpointsgoogle-cloud-sqlgoogle-cloud-datastore

Using Google Cloud Endpoints with Cloud SQL and Cloud DataStore in a polygot architecture


I was going through the possibility of building an universal data backend with Google Cloud Endpoints but because I was considering it for a business application so I needed to have Google Cloud SQL as my data storage and use Google Cloud DataStore to store configuration level data. This architecture really intrigued me to find more about the possibility of how to do this with Java but I'm astonished that there is not one single resource on the web where somebody show you how to use Google Cloud Endpoints with Google Cloud SQL, not even google has some documentation of how to achieve this. Does this mean that is impossible to achieve this in Google Cloud infrastructure. Can somebody point me to some resource or atleast shed some light onto this matter. Please I'd be very obliged to get some replies.


Solution

  • Assuming that you already use a library such as Hibernate to convert from the SQL data to Java objects, you do not have much more to do to make Cloud Endpoints work with Cloud SQL.

    Simply return serializable objects when using Cloud Endpoints.