gae-datastore

List of floats on the google appengine

Been hunting for an hour or so. It would appear that db.Float does not exist. Is there any way to store a list of floats in a ListProperty? Here's the basic idea: class Data(db.Model): temperatures = db.ListProperty(item_type=???) Thanks in advance. ...

Django Google app engine reference issues.

Hi all, I am working on an application on Django and google application engine. In my application I have several models with several ReferenceProperty fields. The issue is that if any of the ReferenceProperty field gets deleted it produces a ReferenceProperty related errors in all the other models where it has been used. What I want is...

How to order by ancestor/parent Google App Engine query?

I would like to order entities by ancestor, GQL reference only mentions properties in ordering. Do I have to store a parent as a property to involve it in the ordering? I trying to achieve something like this: Foo.all().ancestor(bar).order('ancestor').order('-value').fetch(100) EDIT: I have something like this: bar ├ spam │ ├ fo...

MapReduce on more than one datastore kind in Google App Engine

I just watched Batch data processing with App Engine session of Google I/O 2010, read some parts of MapReduce article from Google Research and now I am thinking to use MapReduce on Google App Engine to implement a recommender system in Python. I prefer using appengine-mapreduce instead of Task Queue API because the former offers easy it...

Designing a scalable product database on Google App Engine

I've built a product database that is divided in 3 parts. And each part has a "sub" part containing labels. But the more I work with it the more unstable it feels. And each addition I make it takes more and more code to get it to work. A product is built of parts, and each part is of a type. Each product, part and type has a label. And...

Google App Engine - getting count of records that match criteria over 1000

I've read in multiple locations that GAE lifted the 1000 record limit on queries and counts, however, I can only seem to get a count of the records up to 1000. I won't be pulling more than 1000 queries at a time, but the requirements are such that I need a count of the matching records. I understand you can use cursors to "paginate" th...

Datastore and task queue downtime correlation

What correlation is there between datastore and task queue downtime? (I'd like to use the task queue to defer some operations in the case of datastore downtime.) ...

Fail-safe datastore updates on app engine

The app engine datastore, of course, has downtime. However, I'd like to have a "fail-safe" put which is more robust in the face of datastore errors (see motivation below). It seems like the task queue is an obvious place to defer writes when the datastore is unavailable. I don't know of any other solutions though (other than shipping ...

Unable to delete persistent objects from Google App Engine datastore

I have 2 classes AAA and BBB, where BBB contains a field of AAA type. When I call makePersistent() on 10 AAA and 10 BBB objects, the datastore ends up with 20 AAA objects and 10 BBB objects. I understand this is normal since GAE's datastore is non-relational. However, when I try to deletePersistentAll using the following, pm.newQuery(...

GAE for Java Best Practice. How to store sorted List<string> in a most optimal way

What is the best way to store lists (collections) of simple types in Google App Engine for Java? I usually use something like that: public class Person { // .... @Persistent(serialized = "true") private List<Date> DatesList; // .... } I am not sure how it is stored in DataStore, atomically or as a list of references? Hence wa...

Can we combine multiple Google AppEngine accounts for larger free quota?

Hello GAE Experts, I am trying to see if it possible to build an App which uses multiple Google App Engine Accounts - sort of a distributed App on GAE. Fact: Each Google Account can have upto 10 Google AppEngine Apps under it. My Requirement: What i am trying to do is to see if my Media intensive App can be distributed over multiple G...

Computing number of sub-queries in Google AppEngine

How can I determine how many sub-queries are required for a single top-level query on app engine (python)? I am playing around with the IN operator, and I am curious if there is any way to be notified if I over-step my 30 sub-query limit. ...

GAE: Child object that is not in the class

I am trying to duplicate the pattern described in Building Scalable, Complex Apps on App Engine. I am having trouble understanding how to tell GAE that Message index is a child of Message. From google, they say that you create a child object by including it in the parent class, but this is exactly what we are trying to prevent. So how...

Google App Engine counters

For all my data in the GAE Datastore I have a model for keeping track of counters/total number of records (since we can't use traditional SUM queries). I want to know the most efficient way of incrementing these global count values whenever I insert/delete a record. This is what I'm currently doing: counter = DBCounter.all().fetch(1) db...

How to access lowlevel API for storing data in Google App Engine for python

What is the alternative for Entity.java in python version? I do not want any data model. I want my entities without a predefined structure. I just want them to be key and value pairs as the above Entity.java is. Can I do it in Python version? ...

AppEngine: Query datastore for records with no condition for a specific property

i want to do a query that a user may or may not select a filter, but i don't want to create 2 indexes (tables). value=self.request.get('filter') if value: results=Entity.all().filter('p1 =','v1').filter('p2 =','v2').filter('filter_property =',value) else: results=Entity.all().filter('p1 =','v1').filter('p2 =','v2') i could ord...

Using the App Engine datastore to find overlapping ranges

I'm using Google App Engine for Java with the JDO interface for the datastorage for an application for a CrimeWatch organization. One of the features I'm trying to implement is an away log where people report when they're going to be away for an extended period of time (so the patrols know to keep an eye on the houses). In the app, I h...

Finding the maximum value in a column using GQL

How do I find the maximum value in a particular column of a table in the GAE datastore using GQL? ...

How long will a query with two "contains" tests take to execute on the appengine datastore?

I have two sets of thirty or forty IDs, set A and set B. I have a kind of entity that has a field idA (an id that might be in set A) and a field idB (an id that might be in set B). I want to find all of the entities with idA in set A and idB in set B. I could perform a query with filters like "A.contains(idA) && B.contains(idB)," but ...

What are the consequences of failing to close a query or persistence manager?

I see from every example for the appengine datastore that it is important to surround query executions, etc with try{}finally{} blocks to ensure that queries are always closed. What happens if a query or persistence manager isn't closed, but goes out of scope? Could an entity ever be made permanently inaccessible? ...