google-cloud-datastore

What is maximum size/limitation of ListProperty for Google App Engine datastore?

天涯浪子 提交于 2019-12-05 17:39:34
I am using GAE long time but can not find what is maximum length of ListProperty. I was read documentation but not found solution I want to create ListProperty(long) to keep about 30 values of long or more. I want use this field as filter - can I use it similar to StringListProperty? What is size limits of ListProperty(long)? @marcadian has a pretty good answer. There's no limit specifically on a ListProperty. You do need to look at datastore limits on entities though: https://developers.google.com/appengine/docs/python/datastore/#Python_Quotas_and_limits The two most obvious limits are the

Spring Boot with Google Cloud Datastore API fails to run

流过昼夜 提交于 2019-12-05 16:10:24
I am trying to configure Google Cloud Datastore API with Spring Boot in order to deploy it on Compute Engine. When I try to run the Spring Boot project locally, I keep on getting the following error org.apache.catalina.core.ContainerBase : A child container failed during start Problem I built a demo project using Spring Initizr ( http://start.spring.io/ ) and added the maven dependency for Google Cloud Datastore API as following <dependency> <groupId>com.google.cloud</groupId> <artifactId>gcloud-java-datastore</artifactId> <version>0.2.0</version> </dependency> I am able to build the project

Safely Handling Concurrent Memcache Updates in AppEngine

落爺英雄遲暮 提交于 2019-12-05 15:12:52
The Google Apps Engine doc about safely Handling Concurrent Memcache Updates: The putIfUntouched and getIdentifiable methods of the Memcache service can be used to provide a way to safely make key-value updates to memcache in scenarios where multiple requests are being handled concurrently that need to update the same memcache key in an atomic fashion. (It is possible to get race conditions in those scenarios.) i am building an application which need accurate cache value, below is my code, please help me check if it is right: ... IdentifiableValue oldCountIdValue = mc.getIdentifiable( cacheKey

Saving blobs with Google Endpoint

做~自己de王妃 提交于 2019-12-05 14:25:32
I have an app that allows users to save blobs in the blobstore. I have a schema that does so presently, but I am interested in something simpler and less twisted. For context, imagine my app allows users to upload the picture of an animal with a paragraph describing what the animal is doing. Present schema User calls my endpoint api to save the paragraph and name of the animal in entity Animal . Note: The Animal entity actually has 4 fields ( name , paragraph , BlobKey , and blobServingUrl as String). But the endpoint api only allows saving of the two mentioned. Within the endpoint method, on

Google Cloud Datastore / Mobile Backend Starter - Permissions failure on update/updateAll calls

人走茶凉 提交于 2019-12-05 13:23:46
Using the Mobile Backend Starter (MBS) Android classes (those distributed as a sample project when creating a new project in Google Dev Console and demoed at Google I/O 2013) I'm able to insert new entities to the cloud datastore via calls to CloudBackendMessaging.insertAll or .updateAll. The latter will create entities if none exist so seems functionally identical to insert for new records. The insertion/creation works fine. However when I attempt to update existing entries in the datastore, I received permissions errors e.g. (from the backend log) Method: mobilebackend.endpointV1.updateAll

The API call datastore_v3.Put() required more quota than is available

会有一股神秘感。 提交于 2019-12-05 12:33:11
问题 How to reset quota if Datastore Write Operations limit is reached ? Any operation (both from admin console and from my code) on datastore reports the following error: The API call datastore_v3.Put() required more quota than is available. I have tried to disable application and wait for quota reset, but it did not work. When the app is enabled, it produces a lot of tasks that in turn try to operate on datastore, what obviously consumes the quota. Now, I have paused the task queues and will

App Engine High Replication Datastore

泄露秘密 提交于 2019-12-05 12:18:25
问题 I'm a total App Engine newbie, and I want to confirm my understanding of the high replication datastore. The documentation says that entity groups are a "unit of consistency", and that all data is eventually consistent. Along the same lines, it also says "queries across entity groups can be stale". Can someone provide some examples where queries can be "stale"? Is it saying I could potentially save an entity without any parent (ie. it's own group), then query for it very soon after and not

How can I store the date with datastore?

丶灬走出姿态 提交于 2019-12-05 12:06:31
Datastore documentation is very clear that there is an issue with "hotspots" if you include 'monotonically increasing values' (like the current unix time), however there isn't a good alternative mentioned, nor is it addressed whether storing the exact same (rather than increasing values) would create "hotspots": "Do not index properties with monotonically increasing values (such as a NOW() timestamp). Maintaining such an index could lead to hotspots that impact Cloud Datastore latency for applications with high read and write rates." https://cloud.google.com/datastore/docs/best-practices I

Does the NDB membership query (“IN” operation) performance degrade with lots of possible values?

泄露秘密 提交于 2019-12-05 10:35:11
The documentation for the IN query operation states that those queries are implemented as a big OR'ed equality query: qry = Article.query(Article.tags.IN(['python', 'ruby', 'php'])) is equivalent to: qry = Article.query(ndb.OR(Article.tags == 'python', Article.tags == 'ruby', Article.tags == 'php')) I am currently modelling some entities for a GAE project and plan on using these membership queries with a lot of possible values: qry = Player.query(Player.facebook_id.IN(list_of_facebook_ids)) where list_of_facebook_ids could have thousands of items. Will this type of query perform well with

Golang - Appengine datastore filter query with []byte comparison

血红的双手。 提交于 2019-12-05 10:33:16
I am trying to perform a filter query on a set of entities in the datastore, but the entity field I am trying to query against, with the equality operator, is of type []byte and I don't know if appengine datastore can perform this comparison This is my entity: type Data struct { Id int64 `json:"id"` Version int32 `json:"-"` HMAC []byte `json:"-"` Status string `json:"status"` } And here is my query logic func (view *DataView) GetDataByHMAC(hmac []byte) (Data, error) { view_key := datastore.NewKey(view.context, "View", "data-view", 0, nil) data := make([]Data, 0) query := datastore. NewQuery(