How can I connect to AppEngine Datastore in development using the Cloud Datastore API with Go?

Linda Hamilton
Release: 2024-10-25 00:21:02
Original
997 people have browsed it

How can I connect to AppEngine Datastore in development using the Cloud Datastore API with Go?

Connecting to AppEngine Datastore in Development via Cloud Datastore API

You're looking to use the GCE instance to interact with the AppEngine datastore via the Cloud Datastore API. Below is a response to your posed issue.

Currently, this functionality is not supported in the development environment due to the different storage implementation used by the Java development server for Cloud Datastore and the Python development server for App Engine. This issue is being tracked on GitHub.

Developing a Google Cloud Datastore application in Go is feasible, but the go client library may encounter bugs. Notably, the development server does not support the JSON API used by the go library.

Update:

An alternative suggestion from proppy involves utilizing the Cloud Datastore Protobuf HTTP API with Go.

Note that you can still use Cloud Datastore Protobuf HTTP API with Go. The protobuf definition is available on GitHub, you can compile it to Go code using the Go protobuf compiler plugin and then send POST HTTP requests to /datastore/{version}/datasets/{datasetId}/{method}.

This approach enables you to use the Cloud Datastore API through Protobuf requests. However, it requires manual HTTP request crafting and prevents data sharing between your application and the Cloud Datastore in development.

The above is the detailed content of How can I connect to AppEngine Datastore in development using the Cloud Datastore API with Go?. For more information, please follow other related articles on the PHP Chinese website!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!