Re: [appengine-java] Re: any plans for deferred.defer in Java?

2009-11-24 Thread Jeff Schnitzer
Attached is a modified version of that class that lets you define any path you want for the servlet and lets you specify which queue to use like this: Deferred.defer(task, queueName); (I needed this for my own purposes) Do with it as you wish :-) The only other major change I would make is to

[appengine-java] Using Long as a natural key

2009-11-26 Thread Jeff Schnitzer
I store a record that has a natural Long primary key (a facebook user id). I currently create a Key with that id and insert this record. I just noticed this comment on the Entity(Key) constructor: Creating an entity for the purpose of insertion (as opposed to update) with a key that has its id

Re: [appengine-java] Re: Why is it called Google App Engine for Java ?

2009-11-30 Thread Jeff Schnitzer
I, for one, am sick and tired of Sun's domineering, suffocating stranglehold on what is and isn't Java. GAE is a breath of fresh air. JavaME and JavaEE also impose a variety of limitations on Java. What's the difference between those and GAE? The difference is that Sun got a committee of big

Re: [appengine-java] summary of using JPA with GAE

2009-11-30 Thread Jeff Schnitzer
There doesn't appear to be any API for detaching objects using the JPA interface. If you need to serialize entity objects (say, to put them in memcache), you're stuck with JDO (or one of the alternative interfaces like Siena, SimpleDS, or the low-level API). (if there is some undocumented way of

[appengine-java] Why no GAE system property?

2009-12-03 Thread Jeff Schnitzer
Why isn't there a system property that can be used to detect if a program is running on appengine? This is really a glaring oversight. I would expect something like System.getProperty(google.appengine) to be development or production (or of course null). Before someone says check the servlet

Re: [appengine-java] Why no GAE system property?

2009-12-03 Thread Jeff Schnitzer
On Thu, Dec 3, 2009 at 10:46 AM, Jeffrey Goetsch jeffg@gmail.com wrote: Could you create a Servlet that is loaded on launch, and set this kind of property?  I think this is a workaround until they can do it officially. I can't - remember this is in a library, so I would have to force all

Re: [appengine-java] Getting datastoretimeout exception more frequent today...

2009-12-10 Thread Jeff Schnitzer
Ok, glad to know it's not just me. Unfortunately I'm getting large numbers of these exceptions, pretty much bringing my app to its knees. The related code and data haven't changed: Caused by: com.google.appengine.api.datastore.DatastoreTimeoutException: Unknown at

Re: [appengine-java] Re: Why not use integer primary keys?

2009-12-12 Thread Jeff Schnitzer
H, some issues surrounding this: * As you've probably figured out, the datastore natively only supports two types of id, Long and String * Only Long will autogenerate * There is no guarantee that autogenerated values will be monotonic or even valued in the low-order 4 bytes. So, if you are

[appengine-java] Re: Datastore String limit: 500 characters or 500 bytes, which is it?

2009-12-16 Thread Jeff Schnitzer
Hello? I've now bugged this: http://code.google.com/p/googleappengine/issues/detail?id=2519 Jeff On Mon, Dec 14, 2009 at 4:24 PM, Jeff Schnitzer j...@infohazard.org wrote: Can anyone comment on this in an official capacity? I can write some code to test actual behavior, but I'd really rather

Re: [appengine-java] Re: Datastore String limit: 500 characters or 500 bytes, which is it?

2009-12-17 Thread Jeff Schnitzer
and not 500 characters? Thanks, Jeff On Wed, Dec 16, 2009 at 1:34 PM, Ikai L (Google) ika...@google.com wrote: Jeff, The limit should be 500 bytes. On Mon, Dec 14, 2009 at 4:24 PM, Jeff Schnitzer j...@infohazard.org wrote: Can anyone comment on this in an official capacity? I can write some

Re: [appengine-java] unable to delete cron job

2010-01-02 Thread Jeff Schnitzer
It's not really intuitive behavior. It's basically summed up in this bug: http://code.google.com/p/googleappengine/issues/detail?id=2530 Jeff On Sat, Jan 2, 2010 at 6:20 PM, seleronm seler...@gmail.com wrote: Hi, Please refer to the following links

[appengine-java] Sending email with HTML inline images

2010-01-02 Thread Jeff Schnitzer
It looks like this issue has been forgotten about: http://groups.google.com/group/google-appengine/browse_thread/thread/ba2f36a160049e4d/c52daefd59156399 After some experimentation, I've concluded that it's impossible to send HTML email with inline images using GAE. This is a really, *really*

Re: [appengine-java] Re: custom vs. generated keys / storage?

2010-01-09 Thread Jeff Schnitzer
You have a mistaken understanding of what a Key is. Both values displayed on the Datastore Viewer (aghtb2JjYS1zdHIOCxIHQ2hlY2tpbhjiQww and YourEntityKind: id=12345) are merely alternative visual representations. The actual value stored in BigTable is a binary representation of this data. It may

Re: [appengine-java] Re: custom vs. generated keys / storage?

2010-01-10 Thread Jeff Schnitzer
better, what the mechanics are here... Viktor On Jan 9, 12:11 pm, Jeff Schnitzer j...@infohazard.org wrote: You have a mistaken understanding of what a Key is.  Both values displayed on the Datastore Viewer (aghtb2JjYS1zdHIOCxIHQ2hlY2tpbhjiQww and YourEntityKind: id=12345) are merely

Re: [appengine-java] Re: App instance recycling and response times - is there solution?

2010-01-12 Thread Jeff Schnitzer
I've been thinking about this issue a little. It's not quite as straightforward as just keeping an instance warm. Even if you have an app that gets multiple hits per second, there will still be cold starts: * When a new instance comes online to serve more demand. * When you redeploy a version

Re: [appengine-java] Re: App instance recycling and response times - is there solution?

2010-01-12 Thread Jeff Schnitzer
This is a tragedy of the commons. It may in fact work for you right now, and will continue to work... until it doesn't. It will stop working when enough people figure it out and millions of zombie applications push the working applications out of memory. Or Google pulls the plug on this

[appengine-java] Objectify-Appengine, a typesafe data persistence tier for App Engine

2010-01-13 Thread Jeff Schnitzer
http://code.google.com/p/objectify-appengine/ I probably should have called this project Goldilocks, because it's a little bit how I feel.  Despite being a longtime Hibernate user (since the 1.0 days), the JDO/JPA abstraction just doesn't make me happy on appengine - it's too big, too

Re: [appengine-java] Re: App instance recycling and response times - is there solution?

2010-01-14 Thread Jeff Schnitzer
On Thu, Jan 14, 2010 at 12:59 PM, Stephan Hartmann hartm...@metamesh.de wrote: Jeff, in one point i disagree. In a high available einvironment you would have a cluster of load balanced application servers and you would deploy new versions of your app in turn, one at a time. So if one

Re: [appengine-java] App Engine cold starts and overly aggressive cycling

2010-01-16 Thread Jeff Schnitzer
Should my application be cycling even if it receives steady traffic? I average about 1 hit per second, yet my app seems to bootstrap several times every hour at an erratic rate. Appid is mobca-st. Look in the logs for ConfigurationBootstrap at level Info. This is the Resteasy bootstrap. The

Re: [appengine-java] RESTfull - JAX-RS and GAE/J

2010-01-16 Thread Jeff Schnitzer
JBoss Resteasy works fine without any special customization for GAE. I use it extensively. http://www.jboss.org/resteasy Jeff On Sat, Jan 16, 2010 at 1:09 PM, ChrisDane gregersen@gmail.com wrote: Hi there, Has anyone seen any examples on using only JAX-RS on GAE. Implementing the

Re: [appengine-java] Re: Using GWT RPC for Browser client on GAE - and RESTful to access data from Android/iPhone

2010-01-16 Thread Jeff Schnitzer
I mentioned Resteasy in your other thread, but you might also want to consider Hessian. I recently patched the Caucho impl and now both client server work on GAE (we use Hessian for server-server RPC, and JAX-RS to the phones). If you're creating internal protocols, Hessian is way easier than

Re: [appengine-java] Re: RESTfull - JAX-RS and GAE/J

2010-01-17 Thread Jeff Schnitzer
anything if I figured out to implement my own javax.ws.rs.Application? Thanks again Regards ChrisDane On Jan 16, 10:23 pm, Jeff Schnitzer j...@infohazard.org wrote: JBoss Resteasy works fine without any special customization for GAE. I use it extensively. http://www.jboss.org

Re: [appengine-java] Re: RESTfull - JAX-RS and GAE/J

2010-01-18 Thread Jeff Schnitzer
Or you can just get rid of that trainwreck called Maven. Jeff On Mon, Jan 18, 2010 at 12:10 PM, Philippe Marschall philippe.marsch...@gmail.com wrote: On Jan 16, 10:23 pm, Jeff Schnitzer j...@infohazard.org wrote: JBoss Resteasy works fine without any special customization for GAE. I use

Re: [appengine-java] Re: 1000 Entity limit

2010-01-18 Thread Jeff Schnitzer
If you call PreparedQuery.asIterator(), you can actually iterate yourself as far as you want (within the deadline, of course). In practice I've found you can rarely iterate through more than a couple thousand entities. The offset value is limited to 1,000. Basically the datastore is iterating

Re: [appengine-java] Using Restlet to access datastore.

2010-01-19 Thread Jeff Schnitzer
Entities persisted with Objectify can be serialized in their entirety (including keys) through GWT-RPC, so I'd be surprised if you had any trouble using them with Restlet. I have a number of times rendered entity objects directly to JSON with JAX-RS, although there's no reason you couldn't do

Re: [appengine-java] Re: equal rights for Java URLFetch

2010-01-20 Thread Jeff Schnitzer
Sorry if this is a silly question but... How do you make an asynchronous URLFetch call in Java? Is this a question of making calls to fetch() without calling getContent() on the response? Jeff I see no limit of simultaneous [urlfetch] API calls documented on the quotas page (

Re: [appengine-java] Re: Objectify-Appengine, a typesafe data persistence tier for App Engine

2010-01-21 Thread Jeff Schnitzer
On Thu, Jan 21, 2010 at 7:48 AM, Duong BaTien duong.bat...@gmail.com wrote: While exploring list-property and merge-join from this talk http://code.google.com/events/io/2009/sessions/BuildingScalableComplexApps.html i concur with your value proposition. Neat, I had missed that talk. Good

Re: [appengine-java] Re: Objectify-Appengine, a typesafe data persistence tier for App Engine

2010-01-21 Thread Jeff Schnitzer
SimpleDS' api is closer than the others to what I want, but here's what I don't like: * Not enough use of generics. Key, Query, and PreparedQuery should all be generified classes. * Key should not be used as the id for a class. The class itself identifies the Kind, so having a Key id carries

Re: [appengine-java] Re: Question: best practice to persist medium-large data?

2010-01-26 Thread Jeff Schnitzer
On Tue, Jan 26, 2010 at 5:50 AM, a.maza andr.m...@gmail.com wrote: sorry for this maybe thumb question, but I just want to make sure: both frameworks  are making the needs for open session in view (as almost required when using jdo/jpa in web applications) obsolete, or? Neither Twig nor

Re: [appengine-java] Question: best practice to persist medium-large data?

2010-01-26 Thread Jeff Schnitzer
On Mon, Jan 25, 2010 at 11:52 PM, John Patterson jdpatter...@gmail.com wrote: This is why you configure what type of relationship is used using: @Embed, @Entity(PARENT), @Entity(CHILD) or @Entity(INDEPENDENT) So you have the flexibility to choose configuration _without_ rewriting your code.  

Re: [appengine-java] Question: best practice to persist medium-large data?

2010-01-26 Thread Jeff Schnitzer
, especially in the social graph set intersections and union. Duong BaTien DBGROUPS and BudhNet On Tue, 2010-01-26 at 14:19 -0800, Jeff Schnitzer wrote: On Mon, Jan 25, 2010 at 11:52 PM, John Patterson jdpatter...@gmail.com wrote: This is why you configure what type of relationship

Re: [appengine-java] Re: Question: best practice to persist medium-large data?

2010-01-27 Thread Jeff Schnitzer
On Wed, Jan 27, 2010 at 2:44 AM, datanucleus andy_jeffer...@yahoo.com wrote: Exposing Key to a user is not (in my opinion) a requirement for *providing* a JDO impl on GAE/J. Other datastores have their own internal id and we don't expose theirs (e.g db4o). ... And, of course, all of that

Re: [appengine-java] Re: Question: best practice to persist medium-large data?

2010-01-27 Thread Jeff Schnitzer
On Wed, Jan 27, 2010 at 3:28 PM, datanucleus andy_jeffer...@yahoo.com wrote: I only represent JDO, as a spec, not how GAE/J have implemented it. The docs for that are provided in the JDO spec and on the DataNucleus website. I fail to see anything controversial in how they are represented in

Re: [appengine-java] Webservice on Google App Engine

2010-01-28 Thread Jeff Schnitzer
The easiest way to publish a web service (interpreted as an http-based rpc protocol) is with Hessian. The 4.0.3 version of Caucho's hessian jar should work fine as both client and server on Appengine. Other solutions (JAX-RS, SOAP) are available but they are all a lot more complicated. With

Re: [appengine-java] Re: Webservice on Google App Engine

2010-01-29 Thread Jeff Schnitzer
and this will be null + if (getClassLoader() == null) + return; + try { Enumeration iter; On Fri, Jan 29, 2010 at 12:26 PM, Jeff Schnitzer j...@infohazard.org wrote: The fix went into version 4.0.3, which is actually available for download but the link is missing from

Re: [appengine-java] Can't use hessian with appengine

2010-02-02 Thread Jeff Schnitzer
FWIW, it's actually quite easy to check out Resin trunk (which holds the hessian source code), make the patch, build with ant, and get a hessian.jar. Hessian works quite beautifully on appengine. I wish I had an asynchronous ObjectiveC hessian client so I could ditch my tediously duplicated

Re: [appengine-java] Google Plugin for Eclipse 1.3 plans

2010-02-04 Thread Jeff Schnitzer
On Thu, Feb 4, 2010 at 11:52 AM, Keith Platfoot kplatf...@google.com wrote: GWT/App Engine projects will no longer require our SDK library on the classpath.  This means Maven users will be able to pull in JAR files from their M2 repository as they're accustomed to and the plugin won't mind a

Re: [appengine-java] Getting Started : Eclipse, GWT, App Engine - Unable to resolve

2010-02-08 Thread Jeff Schnitzer
If you add Objectify (http://code.google.com/p/objectify-appengine/wiki/ObjectifyWithGWT) to your project, you will be able to use the datastore basic types (Email, Link, GeoPt, etc) in GWT without any extra effort. This works even if you don't use the Objectify persistence system. Jeff On Mon,

[appengine-java] [ANN] Objectify-Appengine 2.0, an easier way to work with the datastore

2010-02-10 Thread Jeff Schnitzer
Today we released version 2.0 of Objectify-Appengine. Objectify is a mid-level persistence API for the Appengine datastore - much simpler than JDO, much more sophisticated than the Low-Level API, much easier to use than either! http://code.google.com/p/objectify-appengine/ If you are unfamiliar

Re: [appengine-java] Re: any plans for deferred.defer in Java?

2010-02-11 Thread Jeff Schnitzer
A bit of a blast from the past on this thread, but... I've always had a trickle of serialization problems in production using the Deferred servlet. Finally I had one that was consistent and repeatable. I forced it to base64 encode always (not just dev mode) and now it works consistently. FYI.

Re: [appengine-java] Re: Google maps geocoder responds with 620 error since last nights server maintenance

2010-02-19 Thread Jeff Schnitzer
apps servers. On Feb 18, 6:25 pm, Ivan Pardo trux...@gmail.com wrote: At least now I can be certain that it's not a problem with my code.  I can only hope that Google can fix this problem ASAP, as my application is absolutely useless without a working geocoder. On Feb 18, 5:44 pm, Jeff

Re: [appengine-java] Using GAE Platform Outside of Google

2010-02-19 Thread Jeff Schnitzer
There is this: http://appscale.cs.ucsb.edu/ http://code.google.com/p/appscale/ I have no idea how mature or stable it is. Jeff On Thu, Feb 18, 2010 at 2:58 PM, Greg Marine gregmar...@iccnet.org wrote: Hello All! I am evaluating GAE/Java for some of my projects and came across a scenario I

Re: [appengine-java] Re: Google maps geocoder responds with 620 error since last nights server maintenance

2010-02-19 Thread Jeff Schnitzer
updates. On Fri, Feb 19, 2010 at 10:51 AM, Jeff Schnitzer j...@infohazard.org wrote: It helps to have some links... please star these issues! http://code.google.com/p/googleappengine/issues/detail?id=2806 http://code.google.com/p/gmaps-api-issues/issues/detail?id=2186 This problem

Re: [appengine-java] What is the purpose of keyName? (Low-level API)

2010-02-22 Thread Jeff Schnitzer
I hate to be the dork that argues with the referees, but I'm not fond of this advice... * long-id keys can be user-defined just as easily as string-name keys, so you can enforce uniqueness constraints either way if you have some sort of natural key. * Readable urls are a high level construct,

Re: [appengine-java] Re: Quick question regarding List Order

2010-02-22 Thread Jeff Schnitzer
On Wed, Jan 27, 2010 at 10:22 AM, datanucleus andy_jeffer...@yahoo.com wrote: A List follows the contract of java.util.List, hence obviously ordering should be preserved. Whether it is JDO or JPA, the whole point of transparent persistence - people shouldn't need to know anything about the

Re: [appengine-java] What is the purpose of keyName? (Low-level API)

2010-02-22 Thread Jeff Schnitzer
On Mon, Feb 22, 2010 at 1:19 PM, Max Ross (Google) maxr+appeng...@google.com wrote: user-defined long-id keys are not quite as easily used.  You either need to commit to not letting the datastore generate ids for that kind or you need to reserve a batch of ids using the

Re: [appengine-java] What is the purpose of keyName? (Low-level API)

2010-02-22 Thread Jeff Schnitzer
and/or siggestion. Duong BaTien DBGROUPS and BudhNet On Mon, 2010-02-22 at 13:52 -0800, Jeff Schnitzer wrote: On Mon, Feb 22, 2010 at 1:19 PM, Max Ross (Google) maxr+appeng...@google.com wrote: user-defined long-id keys are not quite as easily used.  You either need to commit to not letting

Re: [appengine-java] Re: High latency issue

2010-02-22 Thread Jeff Schnitzer
On Mon, Feb 22, 2010 at 2:29 PM, Steve Pritchard steve...@gmail.com wrote: This reply is really to the Google folks. Guess: 64Bit Servers running some sort of VMWare. 32bit Linux used as the host operating system. (4) My guesses could be way off and this whole strategy out to lunch. I'm

Re: [appengine-java] What is the purpose of keyName? (Low-level API)

2010-02-22 Thread Jeff Schnitzer
string pk is a necessary part of the solution. Regards, Max On Mon, Feb 22, 2010 at 1:52 PM, Jeff Schnitzer j...@infohazard.org wrote: On Mon, Feb 22, 2010 at 1:19 PM, Max Ross (Google) maxr+appeng...@google.com wrote: user-defined long-id keys are not quite as easily used.  You either

Re: [appengine-java] What is the purpose of keyName? (Low-level API)

2010-02-23 Thread Jeff Schnitzer
... it just silently overwrites the existing one.  In either case, storing the email as a key or as a field, you would need to do a query (or get) in a transaction to be sure you were not going to overwrite an existing record with the same email. On 23 Feb 2010, at 13:37, Jeff Schnitzer wrote

Re: [appengine-java] Can pm.makePersistentAll() help me write 12,000 objects?

2010-02-24 Thread Jeff Schnitzer
I think this is actually an interesting question, and brings up a discussion worth having: Is datastore performance reasonable? I don't want to make this a discussion of reliability, which is a separate issue. It just seems to me that the datastore is actually kinda pokey, taking seconds to

Re: [appengine-java] Re: Can pm.makePersistentAll() help me write 12,000 objects?

2010-02-25 Thread Jeff Schnitzer
making sense. On Wed, Feb 24, 2010 at 5:52 PM, Jeff Schnitzer j...@infohazard.org wrote: On Wed, Feb 24, 2010 at 1:06 PM, Ikai L (Google) ika...@google.com wrote: My point wasn't necessarily that it wasn't possible. makePersistentAll does use a batch write, and there are definitely sites

[appengine-java] Re: Eclipse hangs at startup, Ubuntu

2010-02-28 Thread Jeff Schnitzer
Did anyone ever resolve this in a consistent way? I recently upgraded from OSX 10.5 to 10.6, and now my Eclipse (Cocoa 64-bit, as I was using before) hangs on most startups. I see the Updating MyProje... - 1.3.1 in the bottom right corner and the entire window is locked up. Only way out is to

Re: [appengine-java] Re: Eclipse hangs at startup, Ubuntu

2010-03-02 Thread Jeff Schnitzer
that the update of war/WEB-INF/lib occurs on classpath change instead of classpath init. That should alleviate this sporadic issue. The fix will be available in a forthcoming version of GPE. On Mon, Mar 1, 2010 at 2:34 AM, Jeff Schnitzer j...@infohazard.org wrote: Did anyone ever resolve

Re: [appengine-java] Forwarding a request to a external URL preserve IP - Can it be done?

2010-03-04 Thread Jeff Schnitzer
The short answer is no, this is not possible. It's not an appengine issue, IP networks just don't work that way. Jeff On Wed, Mar 3, 2010 at 8:47 AM, mscwd01 mscw...@gmail.com wrote: Hey, Is there a method in which I can receive a request and then forward the same request to an external URL

Re: [appengine-java] Re: Made a Facebook Page For App Engine For Java Issues

2010-03-04 Thread Jeff Schnitzer
On Thu, Mar 4, 2010 at 1:54 PM, Robert Lancer robert.lan...@gmail.com wrote: You should join me in commenting on every pro google article on techcrunch (they're all pro google), im basically accusing them of being google suck ups for totally missing the app engine outage. this is prob the

Re: [appengine-java] Re: Made a Facebook Page For App Engine For Java Issues

2010-03-04 Thread Jeff Schnitzer
On Thu, Mar 4, 2010 at 4:34 PM, Locke locke2...@gmail.com wrote: Really? Are you absolutely certain that it is technically impossible to spin up an app *before* handing it over to users? Are you confident that the laws of physics prohibit spinning up new instance of apps in the background

Re: [appengine-java] Re: Made a Facebook Page For App Engine For Java Issues

2010-03-04 Thread Jeff Schnitzer
On Thu, Mar 4, 2010 at 6:31 PM, Robert Lancer robert.lan...@gmail.com wrote: Jeff please watch this http://www.youtube.com/watch?v=aXJklICrFJI That reinforces my opinion that the GAE team should spend less time focusing on cold starts and worry more about datastore latency, which affects *every*

Re: [appengine-java] Re: Objectify-Appengine, a typesafe data persistence tier for App Engine

2010-03-05 Thread Jeff Schnitzer
On Fri, Mar 5, 2010 at 12:34 AM, Nacho Coloma icol...@gmail.com wrote: Having an id field instead of a key makes queries easier.  With Objectify, you can create a query without needing to know that the id is part of a key field: query.filter(id , 5000).sort(-id) This would only work  with

Re: [appengine-java] Re: How do you transfer a ListJdoObject from server to client?

2010-03-05 Thread Jeff Schnitzer
If you use the Google data classes (Key, GeoPt, Email, Link, User, etc) in your entities you will have trouble serializing them through GWT-RPC. Even though you're using JDO, you can still use Objectify's GWT integration to solve the problem:

Re: [appengine-java] Re: What are the rules for object persistence between requests

2010-03-07 Thread Jeff Schnitzer
On Sun, Mar 7, 2010 at 11:36 AM, tempy fay...@gmail.com wrote: Interesting... now I need to go and make sure all my logic still works if singletons stick around between requests.  GAE is full of surprises!  Thanks for the tip =) It may be true that GAE is full of surprises, but this shouldn't

Re: [appengine-java] Re: What are the rules for object persistence between requests

2010-03-07 Thread Jeff Schnitzer
On Sun, Mar 7, 2010 at 2:30 PM, tempy fay...@gmail.com wrote: Well I didn't think that GAE would start up a new JVM per request, but I assumed the GC would clean up any data created between requests, as there seems to be nothing left holding references to said data.  One of these days I will

Re: [appengine-java] Slim3: Global Transaction support, Fast spin-up and HOT reloading

2010-03-09 Thread Jeff Schnitzer
On Tue, Mar 9, 2010 at 7:07 PM, Yasuo Higa higaya...@gmail.com wrote: Slim3 locks an entity group when getting, putting and deleting entities so that nobody updates the entity group. So it never happens that the first two entity group transactions commit and the third fails. What do you do

Re: [appengine-java] How to query objects with criterias defined in child entities

2010-03-09 Thread Jeff Schnitzer
Create a UserSkill entity with a parent key of User. Do a keysOnly query for UserSkill objects that match your criteria, then get the parent keys out of the UserSkill key, then do a batch get on the parent keys. The Objectify code: class UserSkill { @Id Long id; @Parent KeyUser user;

Re: [appengine-java] How to query objects with criterias defined in child entities

2010-03-09 Thread Jeff Schnitzer
This is a good segue into something I've been contemplating: Does anyone actually use the Relation Index Entity pattern? How does it perform? I don't mean how do queries perform - obviously those would be fast. But how expensive in both latency and price is it to write an entity with

Re: [appengine-java] How to query objects with criterias defined in child entities

2010-03-10 Thread Jeff Schnitzer
On Tue, Mar 9, 2010 at 8:47 PM, John Patterson jdpatter...@gmail.com wrote: For the sake of comparison, see below for the Twig equivalent class UserSkill {       �...@parent User user;        String skill        int ability; } Note that no key is required and user is referenced directly

Re: [appengine-java] How to query objects with criterias defined in child entities

2010-03-10 Thread Jeff Schnitzer
On Wed, Mar 10, 2010 at 6:14 AM, John Patterson jdpatter...@gmail.com wrote: No that is incorrect.  You actually have very fine control over what is loaded and when using activation [1] Ah, this Activation annotation does help out. But it still leaves edge cases (read on). I also don't think

Re: [appengine-java] How to query objects with criterias defined in child entities

2010-03-11 Thread Jeff Schnitzer
On Wed, Mar 10, 2010 at 7:39 PM, John Patterson jdpatter...@gmail.com wrote: On 11 Mar 2010, at 03:40, Jeff Schnitzer wrote: That is an empty claim with no example or evidence.  Every comparison we have see so far is cleaner  and more readable in Twig. Nonsense.  The only example

Re: [appengine-java] Objectify - Twig - approaches to persistence

2010-03-11 Thread Jeff Schnitzer
I'll try to ignore the blatent trolls. But you want things easier to do in Objectify than Twig, so here's a few: - How, in Twig, do you rename a field? Objectify lets you import data from a variety of historical formats; as you load and save data it will naturally be transformed in format:

Re: [appengine-java] Objectify - Twig - approaches to persistence

2010-03-12 Thread Jeff Schnitzer
On Thu, Mar 11, 2010 at 8:56 PM, John Patterson jdpatter...@gmail.com wrote: But for typesafe changes large or small Twig supports data migration in a much safer, more flexible way than Objectify.  Read on for details. You are increasing my suspicion that you've never actually performed schema

Re: [appengine-java] Re: Objectify - Twig - approaches to persistence

2010-03-12 Thread Jeff Schnitzer
Scott: Nacho is the author of SimpleDS. Schema migration is something that Hibernate and RDBMSes actually do rather poorly. The typical process is to prepare a series of scripts (ALTER TABLE and then any relevant data transmogrification), shut down the application, run the scripts, then bring

Re: [appengine-java] Objectify - Twig - approaches to persistence

2010-03-12 Thread Jeff Schnitzer
On Fri, Mar 12, 2010 at 8:35 PM, John Patterson jdpatter...@gmail.com wrote: On 12 Mar 2010, at 16:28, Jeff Schnitzer wrote: Look at these graphs: http://code.google.com/status/appengine/detail/datastore/2010/03/12#ae-trust-detail-datastore-get-latency http://code.google.com/status

Re: [appengine-java] Objectify - Twig - approaches to persistence

2010-03-14 Thread Jeff Schnitzer
jdpatter...@gmail.com wrote: On 13 Mar 2010, at 11:00, Jeff Schnitzer wrote: since you can (and IMNSHO probably should) always disable automatic activation and refresh the graph manually. Although I dislike premature optimisations such as this note that you can configure Activation

Re: [appengine-java] Re: How to delete all entities of a kind with the datastore viewer

2010-03-14 Thread Jeff Schnitzer
One thing you get used to on appengine is that any bulk data work requires the task queue. You can use a little bit of framework and make all of these transforms (including deleting data) a question of just writing a simple task class and firing it off. You'll want a copy of the Deferred

Re: [appengine-java] Re: How to query objects with criterias defined in child entities

2010-03-15 Thread Jeff Schnitzer
On Sun, Mar 14, 2010 at 9:16 PM, Max thebb...@gmail.com wrote: If I would like to find all users that have java level 5 and c++ level 2, then how to write a query in your suggested data model? Every time this kind of question comes up I usually think to myself how would an RDBMS do this? and

[appengine-java] Why do custom indexes require single-property indexes?

2010-03-15 Thread Jeff Schnitzer
I'm puzzled by the behavior of custom indexes. I have a simple test case below, a simple equality filter on one property combined with a descending sort on another property. If I set the properties with setUnindexedProperty(), the query fails to find the result. If I set the properties with

Re: [appengine-java] Re: Why do custom indexes require single-property indexes?

2010-03-18 Thread Jeff Schnitzer
include the property in any custom indexes interpretation of setUnindexedProperty. Can you post the link to the continuation post? I'm curious what Googlers have to say about it. Tristan On Mar 18, 11:13 am, Jeff Schnitzer j...@infohazard.org wrote: This doesn't make sense to me. Every scrap

Re: [appengine-java] Re: App instance recycling and response times - is there solution?

2010-03-24 Thread Jeff Schnitzer
On Mon, Mar 22, 2010 at 7:21 AM, Guillermo Schwarz guillermo.schw...@gmail.com wrote: In order to load the app, a kind of core file must be read from disk in order to represent the app state in RAM. That process takes too long (used to be up to 3 secs, now it is up to 12 seconds AFAIK)

[appengine-java] Objectify-Appengine 2.1 released, supports Partial Indexes

2010-03-25 Thread Jeff Schnitzer
Today we released Objectify v2.1, the latest version of our opensource replacement for JDO/JPA on the Google App Engine datastore. This version includes a major new feature, Partial Indexes. If you aren't sure what partial indexes are, the Wikipedia page

Re: [appengine-java] Re: How to get IP address of Appengine running my java servlet page

2010-03-29 Thread Jeff Schnitzer
It seems quite unlikely that GAE appservers are going to have public IP addresses. Even if you can get the IP address of the host (and I suspect this is impossible), it's going to be a private address. The best you will probably be able to do is get the NATed apparent address of the URLFetch

Re: [appengine-java] Re: Objectify - Twig - SimpleDS articles

2010-03-30 Thread Jeff Schnitzer
On Tue, Mar 30, 2010 at 8:03 AM, Guillermo Schwarz guillermo.schw...@gmail.com wrote: SQL can be run on top of a file system (fseek, read, write) or on top of a persistent hashmap (datastore). If you create a SQL interface on top of any of those, then it is a relational database, not a fake

Re: [appengine-java] JIQL and SQL on appengine

2010-03-30 Thread Jeff Schnitzer
to access the data. This tool works very well. Thanks, Sandeep. On Tue, Mar 30, 2010 at 4:51 AM, Jeff Schnitzer j...@infohazard.org wrote: Hey, so one of the things I complained about in Andreas' great article is the difficulty of doing analytics on appengine.  GAE is great for operational systems

Re: [appengine-java] Re: Why should app startup times be a problem.

2010-03-31 Thread Jeff Schnitzer
On Wed, Mar 31, 2010 at 6:36 AM, John Patterson jdpatter...@gmail.com wrote:  Unlike some of the other frameworks there is no registration process for your data model classes - each class is analyzed the first time it is used per server instance and the meta-data is cached for the duration of

Re: [appengine-java] Re: Why should app startup times be a problem.

2010-03-31 Thread Jeff Schnitzer
On Wed, Mar 31, 2010 at 6:41 PM, jd jdpatter...@gmail.com wrote: On Apr 1, 3:14 am, Jeff Schnitzer j...@infohazard.org wrote: What does Twig do when someone issues a type-less query? datastore.find().addFilter(color, EQUAL, green). returnResultsNow() The expression above is actually

Re: [appengine-java] Re: Why should app startup times be a problem.

2010-04-01 Thread Jeff Schnitzer
On Thu, Apr 1, 2010 at 12:45 AM, John Patterson jdpatter...@gmail.com wrote: All queries that are possible with the low-level datastore are possible with Twig because there are low-level to type-safe bridge methods.  So you can simply do a typeless low-level ancestor query and then get Twig to

Re: [appengine-java] Re: Why should app startup times be a problem.

2010-04-01 Thread Jeff Schnitzer
On Thu, Apr 1, 2010 at 1:57 AM, John Patterson jdpatter...@gmail.com wrote: You are making a classic premature optimization mistake. [...] The only String value that can uniquely identify a class with no registration is its fully qualified type name.  I see no problem using that kind name as

Re: [appengine-java] Re: Why should app startup times be a problem.

2010-04-01 Thread Jeff Schnitzer
On Thu, Apr 1, 2010 at 2:19 AM, John Patterson jdpatter...@gmail.com wrote: From a quick browse of the Objectify source code it looks to me like the default is to use Class.getSimpleName() for the kind name which will also break on renaming and doesn't even have the advantage of working

[appengine-java] Google: Please, stop using the Builder pattern in the Low-Level API!

2010-04-01 Thread Jeff Schnitzer
This is a genuine, heartfelt plea: The Builder pattern (DatastoreServiceConfig, FetchOptions) makes code extra annoying when layering an API on top of the low-level API. Let's say you are writing some code by hand that creates a FetchOptions with a limit and an offset: FetchOptions opts =

Re: [appengine-java] Google: Please, stop using the Builder pattern in the Low-Level API!

2010-04-01 Thread Jeff Schnitzer
:07 AM, Jeff Schnitzer j...@infohazard.org wrote: This is a genuine, heartfelt plea:  The Builder pattern (DatastoreServiceConfig, FetchOptions) makes code extra annoying when layering an API on top of the low-level API. Let's say you are writing some code by hand that creates a FetchOptions

Re: [appengine-java] Google: Please, stop using the Builder pattern in the Low-Level API!

2010-04-01 Thread Jeff Schnitzer
, Jeff Schnitzer j...@infohazard.org wrote: Yes, that would solve the problem.  Although I have to wonder, how is this any better than having a public constructor? Jeff On Thu, Apr 1, 2010 at 10:08 AM, Max Ross (Google) maxr+appeng...@google.com wrote: Hi Jeff, Note

Re: [appengine-java] DatastoreService instances

2010-04-01 Thread Jeff Schnitzer
Appengine devs have said on a number of occasions that we should not assume thread-safety of any class not documented as being thread-safe. I don't see anything in the javadocs indicating that DatastoreService is thread-safe, therefore keeping an appwide instance of DS is probably risky - even if

Re: [appengine-java] Re: JDO Relationship Performance Problems - what am I doing wrong?

2010-04-06 Thread Jeff Schnitzer
The most important number in my mind is the number of line items in an order. If you're seeing 20s+ queries, it must be a pretty large number. Objectify (and Twig) support queryable collections of embedded objects, so you can put all the line items in a single order object. There are some

Re: [appengine-java] Re: Is it possible to have collections of embedded objects?

2010-04-07 Thread Jeff Schnitzer
You can serialize object graphs, but keep in mind that you won't be able to index/query this data and it will be opaque to the datastore viewer. It will also be opaque to GAE/Python tools. As John mentioned, you can get embedded object collections without Java serialization if you use Objectify

Re: [appengine-java] Re: Create Online Game That Contains High Change Data

2010-04-17 Thread Jeff Schnitzer
You should never put something in the memcache that you don't mind losing when the memcache service flushes your data. Players are probably going to be very unhappy if their scores and current positions suddenly disappear mid-game. GAE is just not an appropriate platform for a realtime game.

Re: [appengine-java] Re: Create Online Game That Contains High Change Data

2010-04-19 Thread Jeff Schnitzer
, Jeff Schnitzer j...@infohazard.org wrote: You should never put something in the memcache that you don't mind losing when the memcache service flushes your data.  Players are probably going to be very unhappy if their scores and current positions suddenly disappear mid-game. GAE is just

Re: [appengine-java] Working version of Hessian 4.0.3 for Google App Engine?

2010-04-19 Thread Jeff Schnitzer
The Caucho folks have been slow to update the hessian download page, but the actual binaries are still being generated and put up for download. You can craft the download link by hand. This version works with GAE: http://caucho.com/download/hessian-4.0.6.jar Jeff On Sun, Apr 18, 2010 at 1:36

Re: [appengine-java] Slow app JVM wake - even with no data store access?

2010-04-19 Thread Jeff Schnitzer
3-4s is pretty close to as good as it gets to start a JVM, load your app, and begin serving pages. I've seen 2s load times but 3-4s is pretty typical. Consider yourself lucky! The poor souls running Spring apps usually wait 15s+ for cold starts... Jeff On Mon, Apr 19, 2010 at 4:58 PM, Blake

Re: [appengine-java] using an Objectify query filter with IN -- IllegalArgumentException

2010-04-21 Thread Jeff Schnitzer
Looks like you found a bug. I should be able to have a unit test and a fix checked in tonight. Sorry about that! Jeff On Wed, Apr 21, 2010 at 1:43 PM, Larry White ljw1...@gmail.com wrote: Hi, I'm trying to pass in a collection of Strings to be used in a filter using Objectify (which I

Re: [appengine-java] using an Objectify query filter with IN -- IllegalArgumentException

2010-04-21 Thread Jeff Schnitzer
Fixed. Although you might prefer to issue a batch get() operation instead of the query. There might be a performance difference - I'm not sure. Jeff On Wed, Apr 21, 2010 at 6:46 PM, Jeff Schnitzer j...@infohazard.org wrote: Looks like you found a bug.  I should be able to have a unit test

Re: NoClassDef ReadPolicy$Consistency? (was Re: [appengine-java] using an Objectify query filter with IN -- IllegalArgumentException)

2010-04-22 Thread Jeff Schnitzer
?) but don't know which one. Can anyone tell me what jar com/google/appengine/api/datastore/ReadPolicy$Consistency is in? On Wed, Apr 21, 2010 at 11:10 PM, Jeff Schnitzer j...@infohazard.org wrote: Fixed.  Although you might prefer to issue a batch get() operation instead of the query.  There might

  1   2   3   >