google-cloud-datastore

Google Datastore Strong consistency and Entity Group max size

拟墨画扇 提交于 2019-12-22 10:00:07
问题 In a shared expenses app that shows payments dues and shared expenses details for each group. As a financial application, so many operations are transactional, which requires strong consistency to ensure data integrity. We used Entity Groups and ancestor queries which seems to have solved the issue of strong consistency, this caused the entity group to be large in size. As the shared 'group' is now the parent of members, expenses, payments, dues..etc. Until now we don't see a problem, but we

Safely Handling Concurrent Memcache Updates in AppEngine

懵懂的女人 提交于 2019-12-22 08:59:24
问题 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,

Creating a Composite Index for AppEngine in Android-Studio-based project

眉间皱痕 提交于 2019-12-22 08:42:16
问题 I used Android Studio to create both an Android project, and its backend AppEngine Endpoints counterpart. I have a datastore for which I am using Objectify. The system worked great, until I added a filter to my Query (to show only specific given emails). Query<Report> query = ofy().load().type(Report.class).filter("email", user.getEmail()).order("email").order("-when").limit(limit); This is the POJO Datastore Entity: @Entity public class Report { @Id Long id; String who; @Index Date when;

Spring Boot with Google Cloud Datastore API fails to run

浪子不回头ぞ 提交于 2019-12-22 07:59:45
问题 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

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

跟風遠走 提交于 2019-12-22 07:58:39
问题 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)? 回答1: @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 Datastore filter with OR condition

百般思念 提交于 2019-12-22 05:23:44
问题 I am working with NodeJS on Google App Engine with the Datastore database. I am using composite query filter and just need a basic "OR" condition. Example: Query Tasks that have Done = false OR priority = 4 const query = datastore.createQuery('Task') .filter('done', '=', false) //How to make this an OR condition? .filter('priority', '=', 4); However, according to the documentation: Cloud Datastore currently only natively supports combining filters with the AND operator. What is a good way to

Google datastore - querying on key values

纵饮孤独 提交于 2019-12-22 05:07:35
问题 I have a EntityKind SuggestedInterest. When I populate that with a key "GrpId" and property "suggestedint". Now, I need the "suggestedint" value for a requested "GrpId" So, I write the query as: String findSuggestedInterest(String grpId) { DatastoreService datastore = DatastoreServiceFactory.getDatastoreService(); Filter filter = new FilterPredicate(Entity.KEY_RESERVED_PROPERTY,FilterOperator.EQUAL,grpId); Query q0 = new Query("SuggestedInterest").setFilter(filter); PreparedQuery pq0 =

How to create a query for matching keys?

左心房为你撑大大i 提交于 2019-12-22 05:07:26
问题 I use the key of another User, the sponsor, to indicate who is the sponsor of a User and it creates a link in the datastore for those Users that have a sponsor and it can be at most one but a sponsor can sponsor many users like in this case ID 2002 who sponsored three other users: In this case this query does what I want: SELECT * FROM User where sponsor =KEY('agtzfmJuYW5vLXd3d3ILCxIEVXNlchjSDww') but I don't know how to program that with python, I can only use it to the datastore. How can I

How to create a query for matching keys?

与世无争的帅哥 提交于 2019-12-22 05:07:08
问题 I use the key of another User, the sponsor, to indicate who is the sponsor of a User and it creates a link in the datastore for those Users that have a sponsor and it can be at most one but a sponsor can sponsor many users like in this case ID 2002 who sponsored three other users: In this case this query does what I want: SELECT * FROM User where sponsor =KEY('agtzfmJuYW5vLXd3d3ILCxIEVXNlchjSDww') but I don't know how to program that with python, I can only use it to the datastore. How can I

Google App Engine Access Cloud Datastore from Different Project

有些话、适合烂在心里 提交于 2019-12-22 00:35:20
问题 I have been trying to find a solution to accessing a datastore in one project from a different google app engine project. I went through the tutorial on accessing a datastore from a different project's compute engine, however, this is not what I am looking for. What is required here is accessing a datastore on one project from a different app engine project. Has anyone done this successfully? Any ideas? Cheers 回答1: As @Patrice says, this is possible by using the Remote API for Java (or for