Skip to main content

Home/ Groups/ Google AppEngine
3More

Parallel Asynchronous Datastore Commands with Twig 1.0 - Google App Engine for Java | G... - 1 views

  •  Twig is an alternative to the standard   persistence interfaces JDO and JPA, specifically designed to make the   most of the underlying datastore's unique features.
  • Twig is the only interface to support direct unowned relationships so   your code is not dependent on low-level datastore classes.  It is the   only interface to support OR queries by merging together multiple   queries, sorting them and filtering out duplicates at the lowest level   for performance.
  • Async datastore calls are not yet part of the low-level API.  Twig   uses the underlying Protocol Buffer layer classes to call   ApiProxy.makeAsyncCall() instead of makeSyncCall.  All the code is   open source so you can check out how its done.
1More

Async Datastore API - Google App Engine for Java | Google Groups - 0 views

  • > I'm still curious where does "method" name come from? That is just "Get" of "Put" or "RunQuery" etc.    I have also checked   in an implementation of Nick Johnsons ApiProxyHook which logs all this   info: LoggingApiProxyDelegate.  Its handy for seeing how what rpc   calls are being made.  If you want to discuss Twig specifics probably   best to do that here http://groups.google.com/group/twig-persist
1More

Developer's Notes: Lists and Nulls in Google App Engine Datastore - 0 views

  • So the summary is: do not store nulls into Lists, otherwise you will get into a problem in future.
3More

AppEngine Tips: Many to Many - 0 views

  • A join model is a data model that models the relationship between two other models. For example, you might have Person entities and Group entities, and you want Persons to be in Groups and Groups to "have" Persons. The relationship between Persons and Groups is one of Memberships. A Person is "in" a Group "through" a Membership. They may belong to multiple Groups, i.e. have multiple Memberships.
  • class Membership(db.Model): person = db.ReferenceProperty(Person) group = db.ReferenceProperty(Group)
  • If certain properties of your joined entities (Person and Group in this example) don't change much, but get queried often via the join model, you may find it worth caching those properties on the join model itself.
1More

Deleting entities in bulk. - Google App Engine | Google Groups - 0 views

  • class DeleteFull():     def execute(self):         deleting = model_class_name.all().order('__key__').fetch(100)         while deleting:             a = []             key = deleting[-1].key()             for item in deleting:                 a.append(item)             db.delete(a)             deleting = model_class_name.all().filter('__key__ >', key).order('__key__').fetch(100) This purged everything, but it took a hell of a long time.
1More

Unowned relationship confusion - Google App Engine for Java | Google Groups - 0 views

  • Just my 2 cents: I was "forced" to use an "unowned relationship" for my application because I had very large objects: My parent object "Journey" contained thousands of "JourneyPoints" in a List element. A call to "makePersistent" constantly hit the 30s deadline. By modeling it as an unowned relationship and distributing the parent key by hand to the JourneyPoints everything was fine again and the performance was very good.
1More

Prerelease: New Appengine Bulkloader - Google App Engine | Google Groups - 0 views

  • You should get prompted for authentication. Make sure remote_api is installed correctly on your server by visiting whatever you used for the --url argument in your browser. It should require you to log in then say "This request did not contain a necessary header"
1More

Authenticating against App Engine from an Android app - Nick's Blog - 0 views

  • Authentication with App Engine, regardless of where you're doing it, is a three-stage process: Obtain an authentication token. This can be done with ClientLogin for installed apps, for example, or with AuthSub for a webapp. When logging in directly to an application, this is the part of the login process where your user sees a Google signin screen. Take that authentication token, and use it to obtain an authentication cookie. Use that authentication cookie in all subsequent requests.
3More

Gaelyk - a lightweight Groovy toolkit for Google App Engine Java - 0 views

  • The easiest way to get setup rapidly is to download the template project from the download section. It provides a ready-to-go project with the right configuration files pre-filled and an appropriate directory layout: web.xml preconfigured with the Gaelyk servlets appengine-web.xml with the right settings predefined (static file directive) a sample Groovlet and template the needed JARs (Groovy, Gaelyk and Google App Engine SDK)
  • Running your application locally Google App Engine provides a local servlet container, powered by Jetty, which lets you run your applications locally. If you're using the Gaelyk template, when you're at the root of your project — and we assume you have installed the App Engine SDK on your machine — you can run your application with the following command-line: dev_appserver.sh war
  • Deploying your application in the cloud Once you're at the root of your application, simply run the usual deployment command: appcfg.sh update war
1More

Entities to JSON - Gaelyk | Google Groups - 0 views

  • you could leverage Entity's getProperties() method, in combination with JSON-lib's groovy-friendliness and ability to serialize maps as JSON. So, say you have an Entity: def person = new Entity("person") person.name = "Guillaume Laforge" def jsonString = person.properties as JSONObject Have a look at JSON-lib and the Entity JavaDoc. And I think it'll solve your problem pretty neatly!
1More

Gaelyk + GWT - Gaelyk | Google Groups - 0 views

  • you can use the sample project that the google plugin for eclipse create for you. Then you can easily replace the generated java code by groovy / gaelyk code. Note that you need to add the jars in the war/WEB-INF/lib of your project, and add them in the project build path options.
1More

Creating, Getting and Deleting Data - Google App Engine - Google Code - 0 views

  • Every entity has a key that is unique over all entities in App Engine. A complete key includes several pieces of information, including the application ID, the kind, and an entity ID. (Keys also contain information about entity groups; see Transactions for more information.) An object's key is stored in a field on the instance. You identify the primary key field using the @PrimaryKey annotation. The app can provide the ID portion of the key as a string when the object is created, or it can allow the datastore to generate a numeric ID automatically. The complete key must be unique across all entities in the datastore. In other words, an object must have an ID that is unique across all objects of the same kind and with the same entity group parent (if any). You select the desired behavior of the key using the type of the field and annotations. If the class is used as a "child" class in a relationship, the key field must be of a type capable of representing an entity group parent: either a Key instance, or a Key value encoded as a string. See Transactions for more information on entity groups, and Relationships for more information on relationships. Tip: If the app creates a new object and gives it the same string ID as another object of the same kind (and the same entity group parent), saving the new object overwrites the other object in the datastore. To detect whether a string ID is already in use prior to creating a new object, you can use a transaction to attempt to get an entity with a given ID, then create one if it doesn't exist. See Transactions. There are 4 types of primary key fields:
1More

A simple Groovlet to read and display JSON data on Google App Engine with Gaelyk - Mess... - 0 views

  • ! In this blog post we learn how easy it is to deploy a simple Groovlet to the Google Appengine and how easy it is to parse JSON results.
2More

Free Java hosting with the Google App Engine « JTeam Blog / JTeam: Enterprise... - 0 views

  • Cron jobs / task queues Instead of using a framework like Quartz to schedule jobs, Google App Engine takes care of executing jobs for you. You simply enter a cron-like expression and a URL to call and your job is configured. You also have a task queue at your disposal. Your application code can add tasks to a task queue which will be executed later in the future, asynchronously. An example use case is that you don’t want clients to wait for an email to be sent before he sees the next page. Instead you can put the email task on the task queue and the email will be sent asynchronously.
  • When an email is received Google App Engine does a post on an URL in your application you configured. The HTTP body of the POST request contains the exact mime message as it was received by Google. To parse this mime message you can use the MimeMessage class provided by the JDK.
1More

Episode 3: Using the GAEJ Email Service « Google App Engine Java Experiments - 0 views

  • You can study the JavaMail API in more detail to understand how to do things like sending attachments in your email too. You can do that using the Google App Engine Email Service.
2More

Creating Microsoft Office files on Google App Engine « Stephen Huey - 0 views

  • GaeVFS ships with a servlet that handles file uploads and abstracts how it writes them to its virtual file system. 
  • GaeVFS is built on top of Apache Commons VFS, and you use their FileObject instead of the standard File class.  There are some examples on the GaeVFS wiki, but I had to play around for a bit before I figured out some of the differences I needed to know. 
2More

gaevfs - Project Hosting on Google Code - 0 views

  • GaeVFS is an Apache Commons VFS plug-in that implements a distributed, writeable virtual file system for Google App Engine (GAE) for Java. GaeVFS is implemented using the GAE datastore and memcache APIs. The primary goal of GaeVFS is to provide a portability layer that allows you to write application code to access the file system--both reads and writes--that runs unmodified in either GAE or non-GAE servlet environments.
  •  
    GaeVFS is an Apache Commons VFS plug-in that implements a distributed, writeable virtual file system for Google App Engine (GAE) for Java. GaeVFS is implemented using the GAE datastore and memcache APIs. The primary goal of GaeVFS is to provide a portability layer that allows you to write application code to access the file system--both reads and writes--that runs unmodified in either GAE or non-GAE servlet environments.
1More

Proxy caching on Google Appengine - Kyle Jensen - 0 views

  • Here is the strategy I use for caching responses. This could apply to other, non-appengine environments too.
1More

brad's life - Perl on App Engine - 0 views

  • we can build the start of an open source App Engine server clone that's suitable for many purposes:  initially just for regression testing & local development (like the "dev_appserver" that comes with the App Engine Python SDK), but perhaps in the future (once Hypertable/Hbase/etc are ready) a full stack to give to ISPs to let them run App Engine apps on their own.
2More

How to browse local Java App Engine datastore? - Stack Overflow - 0 views

  • protocol
  • ublic void doGet(HttpServletRequest req, HttpServletResponse resp)     throws IOException {    resp.setContentType("text/plain");    final DatastoreService datastore = DatastoreServiceFactory.getDatastoreService();    final Query query = new Query("Table/Entity Name");    //query.addSort(Entity.KEY_RESERVED_PROPERTY, Query.SortDirection.DESCENDING);    for (final Entity entity : datastore.prepare(query).asIterable()) {        resp.getWriter().println(entity.getKey().toString());        final Map<String, Object> properties = entity.getProperties();        final String[] propertyNames = properties.keySet().toArray(            new String[properties.size()]);        for(final String propertyName : propertyNames) {            resp.getWriter().println("-> " + propertyName + ": " + entity.getProperty(propertyName));        }    }}
1 - 20 Next › Last »
Showing 20 items per page