gae-datastore

Sharding and managing very busy variable

I have one variable pool, shared by all clients, that stores all remaining enemies in a game. When a client starts a game, he gets some enemies from pool. When he finishes, enemies that he did not kill are put back into pool. The game also checks to see if all the enemies have been killed (i.e., pool is empty). What is the best way t...

datastore.Cursor - paging in reverse supported?

I'm looking at the documentation for using cursors. Are these forward-only cursors - we can't page backwards?: http://code.google.com/appengine/docs/java/datastore/queriesandindexes.html#Query_Cursors Cursor cursor = Cursor.fromWebSafeString(cursorString); Map<String, Object> extensionMap = new HashMap<String, Object>(); extensionM...

Importing GeoPt data with the Google AppEngine BulkLoader YAML

I am uploading data from a csv file with a GeoPt column in it. I have the GeoPt column data in quotes like this: SomeData,"54.321,-123.456",MoreData My bulkloader.yaml file has an entry like this: - property: location external_name: LOCATION # Type: GeoPt Stats: 1 properties of this type in this kind. When I do the upl...

Webservice credentials - OpenID/Android AccountManager ?

I'm building a webservice and would like to use the user's google account credentials. The service runs on GAE and will have a web client and an Android native client. This is my first attempt of something like this and I've been reading about OpenID and the Android AccountManager library. I'm still not sure what are my options in ter...

Using django-admin on django-nonrel, using App Engine models

I am creating an Django app for Google App Engine. I am using django-nonrel but am using Google App Engine models. I am wanting to also use Django's admin site. My models.py for airlines app is: from google.appengine.ext import db class Airline(db.Model): name = db.StringProperty(required=True) description = db.TextProperty() no...

Could not initialize class com.sample.PMF (Google app engine)

Hi, I am getting this error while trying to save something to Datastore. I have tried to search but not getting anything. This is the code where i am saving to datastore : Student temp = null; PersistenceManager pm = PMF.get().getPersistenceManager(); try { Student stu = new Student(name); temp = pm.makePers...

Gae db.model @property setters and getters

How can I use properties in db.models that are not meant to be handled as datastore properties? For instance: class SpotModel(db.Model): rating = db.RatingProperty(default=3, choices=[1,2,3,4]) @smiley.setter def smiley(self, value): return value In the above I have a property called smiley, but when I test it using nosete...

Storing a file in the blobstore from a URL in app engine?

I want to retrieve a file form a URL like http://www.abc.com/files/file.pdf and store in the blobstore... how do I do this? Right now it only allows from form posts ... ...

grails + app-engine upload error

I am using grails 1.3.3 and app-engine plugin 0.8.10; my test case is: upload.gsp: <form action="/test/process" method="post" enctype="multipart/form-data"> <input type="file" name="file"/> <input type="submit"/> </form> TestController has: def process = { println request.getFile("file").inputStream.text } First time...

[GAE Java] Entity groups

Hey, I'm experimenting a bit with google app engine and the lack of a transaction di framework is missing. I'm implementing it as good as I can, but I'm hitting the same exception again and again: can't operate on multiple entity groups in a single transaction. found both Element... I have read the documentation (http://code.google.com/...

GAE java.lang.IllegalStateException: Must call one of set*BlobStorage() first.

I am trying to upload a file in GAE using the Blobstore API. I am getting the following exception when running the GAE server locally (dev mode): WARNING: /_ah/upload/ag10cmlwc2NoZWR1bGVychsLEhVfX0Jsb2JVcGxvYWRTZXNzaW9uX18YFQw java.lang.IllegalStateException: Must call one of set*BlobStorage() first. at com.google.appengine.api.blobsto...

app engine - how can i increase the datastore item size limit

how can i increase the datastore item size limit, which is now only 1 MB, in app engine? if i buy more storage what will happen to this limit? thanks ...

Retrieving an entity from GAE datastore by key

If I have the google assigned key of an entity in my datastore, say ag1iYXRjaC1nZW5lcmljchcLEgxCYXRjaGVzTW9kZWwiBUpvYiAyDA, is there a way I can easily fetch the entity by this key? I've tried using .get_by_id(), .filter('__key__=', 'ag1iYXRjaC1nZW5lcmljchcLEgxCYXRjaGVzTW9kZWwiBUpvYiAyDA') and can't seem to find anything that works. Any ...

[GAE] Fastest way to check if an object exists

I'm using GAE/Java with Objectify, and I'm trying to find the fastest way to check if a given object exists in the datastore, given the key. What I'm doing right now is .get(key) with @Cached on, but either way that still retrieves the entire object, which is unnecessary. Any ideas on how to do this with an index only hit? I was also th...

Unzipping a BlobstoreInputStream >= 1MB in size

I've got a small function that reads a zip file from an input stream and then stores the contents in an arraylist. I'm using GAE which is limited to files less than 1mb. I've converted the InputStream into a BlobstoreInputStream so I can now upload zip files that are > 1mb. However I can still only access < 1Mb of data from it or I get ...

Problem with collections in GAE

Hi all. Learning GAE I`ve got some issue. I want to save contact list of my users in database. I use addUser() to add new user and it works. But when I refresh the page the list is empty (not null). In GAE "Datastore Viewer" the "list" field is null but in application it exists. @PersistenceCapable(identityType = IdentityType.APPLICATIO...

Are @ManyToMany relationships not allowed in GAE?

My understanding is that with GAE JPA support I cannot: @ManyToMany private Set<SSUser> contacts; protected SSUser(){} public SSUser(final String userId, final String emailId){ this.userId = userId; this.emailId = emailId; contacts = new HashSet<SSUser>(); } I'm trying to establish a contacts...

GAE: Getting key of entity just created

I'm creating a new entity like: some_model = ModelName( attr1 = ..., attr2 = ..., attr3 = ..., attr4 = ... ).put() Is there anyway to get the key of this newly created entity? I tried doing some_model.key() put that does not work. ...

db.get() vs db.get_by_key_name() performance (GAE BIgtable/Datastore)

How does the performance of db.get() compare with that of db.get_by_key_name()? ...

App Engine BadValueError On Bulk Data Upload - TextProperty being construed as StringProperty

bulkoader.yaml: transformers: - kind: ExampleModel connector: csv property_map: - property: __key__ external_name: key export_transform: transform.key_id_or_name_as_string - property: data external_name: data - property: type external_name: type ...