Re: [appengine-java] no async queries on AsyncDatastoreService for 1.4.0?

2010-12-07 Thread Maxim Veksler
Hi Max, Could you please provide input on the following design: We design for DataSource redundancy. For this we've built a flow which obtains data from 2 sources: First from GAE DataSource using PreparedQuery and if that fails (0.5sec timeout) from our backup service feed which we access using

Re: [appengine-java] no async queries on AsyncDatastoreService for 1.4.0?

2010-12-07 Thread Alfred Fuller
Currently hasNext() will block on the first batch of results. There is currently no way to do what you are asking in Java. On Tue, Dec 7, 2010 at 2:40 AM, Maxim Veksler ma...@vekslers.org wrote: Hi Max, Could you please provide input on the following design: We design for DataSource

Re: [appengine-java] no async queries on AsyncDatastoreService for 1.4.0?

2010-12-07 Thread Maxim Veksler
Thank you for the information. We kinda expected that the current implementation will block... In case anyone wonders our current worked out design is as following: Do async get to EC2 (takes ~270ms) and right after that do blocking get to datastore (with timeout of 300ms). Because we know

[appengine-java] no async queries on AsyncDatastoreService for 1.4.0?

2010-11-29 Thread Luke
i was taking a look at the 1.4.0 javadoc for AsyncDatastoreService. i see the get, put and delete operations return a Future, but the prepare methods return a naked PreparedQuery object, and it doesn't look like PreparedQuery has any async get methods. does the AsyncDatastoreService not support

Re: [appengine-java] no async queries on AsyncDatastoreService for 1.4.0?

2010-11-29 Thread Max Ross (Google)
Hi Luke, First the awesome news: As of 1.4.0, many queries are implicitly asynchronous. When you call PreparedQuery.asIterable() or PreparedQuery.asIterator(), we initiate the query in the background and then immediately return. This lets you do work while the first batch of results is being