Re: [appengine-java] Re: Is the native API really so much faster than JDO and slim3?

2011-06-08 Thread Jeff Schnitzer
On Wed, Jun 8, 2011 at 4:26 PM, Gal Dolber gal.dol...@gmail.com wrote: Slim3 is indeed faster than any other because of the simple fact that it uses apt(code generation) instead of reflexion, the generated code it's almost the same that you'll write by-hand to wrap the low-level api. I'm

Re: [appengine-java] Re: Is the native API really so much faster than JDO and slim3?

2011-06-08 Thread Jeff Schnitzer
(); } LL API is much slower than before. http://slim3demo.appspot.com/performance/ Yasuo Higa On Thu, Jun 9, 2011 at 7:45 AM, Jeff Schnitzer j...@infohazard.org wrote: Slim3 may be a nice piece of software, but it has not been demonstrated to be faster than anything (including JDO).  It might

Re: [appengine-java] Request was aborted after waiting too long to attempt to service your request.

2011-06-07 Thread Jeff Schnitzer
Is this documented anywhere? It's something I figured out from occasional comments I've seen on this list over the years, but I've never seen it mentioned in the official documentation. And it's kinda important. In particular, I'd like to know what the bounds are for threaded java, and how the

Re: [appengine-java] Re: When to use a String as ID? (using Objectify and GWT)

2011-06-06 Thread Jeff Schnitzer
I just let the datastore do it. I like having Long ids: * Longs always stick out in code as an id - ie in a constructor with 15 things, it sucks when they are all Strings. I often wish Java supported C-style typedefs (or just allowed subclassing basic types). * Long keys are more

Re: [appengine-java] Multi-homing support

2011-06-04 Thread Jeff Schnitzer
down all the apps. And, obviously, python apps can not be multiplexed with java apps and vice versa. On Sun, Jun 5, 2011 at 4:24 AM, Jeff Schnitzer j...@infohazard.org wrote: Please star this issue: http://code.google.com/p/googleappengine/issues/detail?id=2878 This is a huge blocking issue

Re: [appengine-java] When to use a String as ID? (using Objectify and GWT)

2011-06-02 Thread Jeff Schnitzer
This is the classic synthetic key vs natural key debate, and the general consensus is that synthetic keys are almost always the way to go. For exactly the reasons you describe. Yup, I think you answered your own question :-) Jeff On Thu, Jun 2, 2011 at 4:21 AM, Drew Spencer

Re: [appengine-java] R: Re: New GWT/App Engine site

2011-05-31 Thread Jeff Schnitzer
Nice looking site... just on casual perusal, two things jumped out at me: 1) Polish the navigation a bit more. For example, you zoom into the map, click on a trail, click through to the trail's page, then hit the browser back button (seems to be the only way to get back) - and you're now zoomed

Re: [appengine-java] Protect my paypal credentials

2011-05-27 Thread Jeff Schnitzer
Since catastrophe results from a Malicious Entity getting two pieces of information (your encrypted PP credential and the AES key), you probably should store these pieces of information in two separate places. Store the encrypted PP credential in your deployment, but make fetch the AES key from

Re: [appengine-java] Re: why the development of java tools fall far behind that of python's?

2011-05-26 Thread Jeff Schnitzer
+1 The primary benefit of GAE comes from the services (datastore, task queue, memcache, etc) and the language is pretty much secondary. Don't be afraid to set up the Python SDK - it's *really* trivial (especially compared to setting up Eclipse). You don't even need to learn any Python. Chances

Re: [appengine-java] Re: Feelings about new pricing model

2011-05-24 Thread Jeff Schnitzer
Let's say you have a sustained traffic of 5 hits per second, and each request takes 1 second to process (waiting on the datastore, waiting on facebook, whatever). If you're using single-threaded python, you will need 5 instances to serve this load - each instance can do nothing else while it

Re: [appengine-java] Re: Feelings about new pricing model

2011-05-23 Thread Jeff Schnitzer
On Sun, May 22, 2011 at 10:15 PM, Tom Gibara tomgib...@gmail.com wrote:  Put it this way:  A single multithreaded Java appserver instance should be able to happily consume every last CPU cycle on a frontend box - and that's just the free tier. That presumes that the JVM that sandboxes the app

Re: [appengine-java] Re: Feelings about new pricing model

2011-05-22 Thread Jeff Schnitzer
I think you're worried about the wrong thing here. Given the [probable] surplus of CPU in the cluster, it's unlikely that your app will be starved for CPU. And does your app's frontend really perform all that much computation? On the other hand, what happens when there is a blip in

Re: [appengine-java] Re: Feelings about new pricing model

2011-05-22 Thread Jeff Schnitzer
On Sun, May 22, 2011 at 11:48 AM, Jeff Schnitzer j...@infohazard.org wrote: optimal concurrency Thinking out loud here... this is an interesting phrase. Imagine for a second that GAE was built on Node.js or an equivalent fully-asynchronous server. In this environment, RAM is not the limiting

Re: [appengine-java] Re: Feelings about new pricing model

2011-05-22 Thread Jeff Schnitzer
On Sun, May 22, 2011 at 3:04 PM, Jeff Schnitzer j...@infohazard.org wrote: Since-threaded blocking servers are just not cost-effective in 2010. That sentence should read Single-threaded blocking servers are just not cost-effective in 2011. Jeff -- You received this message because you

Re: [appengine-java] Java = Google app

2011-05-22 Thread Jeff Schnitzer
Ugh. I don't have time for a religious war, so this will be my only post in this thread. 1) Don't become a fanatic about anything. It's just software. 2) Maven is a gigantic steaming pile of crap. If you need to read books to make your build system work, you have a defective process.

Re: [appengine-java] GAE - Java - JSON?

2011-05-20 Thread Jeff Schnitzer
I've been very satisfied with RESTeasy, an implementation of the Java standard JAX-RS. It works great on appengine: http://www.jboss.org/resteasy Here's a quick example: @Path(hello) public class HelloResource { @GET @Path({name}) public String hello(@PathParam(name) final String

Re: [appengine-java] Facebook Login integration with java appengine

2011-05-14 Thread Jeff Schnitzer
Don't waste your time with facebook-java-api. It's ancient. You're much better off with RestFB or BatchFB (disclosure: I develop BatchFB). Use the Javascript SDK for login. Don't try to do OAuth yourself - aside from periodic changes to the protocol, it's not nearly as smooth for users. BTW,

Re: [appengine-java] How To: Persist an entity, if and only if, another successfully persists

2011-05-14 Thread Jeff Schnitzer
Depending on your application, you may be able to perform the 2nd entity write in a task. Enqueue the task transactionally with the first operation. You'll be guaranteed that if the first entity commits, the 2nd will *eventually* be written as well. It's not a perfect solution for all apps but

Re: [appengine-java] Adding the Ability to Set a Beta or Other Version of an Application To A Domain

2011-05-13 Thread Jeff Schnitzer
This is particularly important for Facebook applications because FB Connect is tied to a specific domain name. It's impossible to test an application (which has a custom domain) against xxx.appspot.com, so it's pretty much impossible to beta test code in vivo. Here's a related bug to star:

Re: [appengine-java] Re: Objectify: IllegalAccessError

2011-05-06 Thread Jeff Schnitzer
-1.0- sdk-1.3.8.jar. However, this version dates from october 2010, not that old! So I have to upgrade? BR On 3 mei, 04:04, Jeff Schnitzer j...@infohazard.org wrote: Are you running with a very old GAE SDK... something before 1.4.0, perhaps?  Make sure you are using the latest. Jeff

Re: [appengine-java] Objectify: IllegalAccessError

2011-05-02 Thread Jeff Schnitzer
Are you running with a very old GAE SDK... something before 1.4.0, perhaps? Make sure you are using the latest. Jeff On Mon, May 2, 2011 at 3:16 PM, GeneralSlaine lennart.ben...@gmail.com wrote: Hi all, I'm a first time user of objectify and  I'm implementing the intorduction (with slightly

Re: [appengine-java] Using Text instead of String - Problem?

2011-04-16 Thread Jeff Schnitzer
You must be calling toString() somewhere, which puts that extra formatting around it. Text.getValue() always returns the plain String. Jeff On Sat, Apr 16, 2011 at 7:41 AM, Thomas Riley tomrile...@gmail.com wrote: Hello all, In my app engine project I have been storing values in the datastore

Re: [appengine-java] Using Text instead of String - Problem?

2011-04-16 Thread Jeff Schnitzer
getValue() returns the whole String. Calling String.toString() just returns this. I strongly recommend you install JD (or some other decompiler) into eclipse so you can see what goes on inside Text. It's really quite simple. Jeff On Sat, Apr 16, 2011 at 3:08 PM, Thomas Riley

Re: [appengine-java] Is there a way to get the app name?

2011-04-14 Thread Jeff Schnitzer
SystemProperty.applicationId On Thu, Apr 14, 2011 at 10:08 AM, Luis Montes monte...@gmail.com wrote: Is there a way at runtime to get the app engine app name? It's possible to create an app in eclipse and deploy it to multiple .appspot.com  domains.  Also I can't just use

Re: [appengine-java] Best practice for multithreaded access/update to entity

2011-04-07 Thread Jeff Schnitzer
This video will help you immensely: http://sites.google.com/site/io/under-the-covers-of-the-google-app-engine-datastore You can skip to the end if you just want to grok the transactions, but the rest of it is extraordinarily helpful as well. You are correct, if you use transactions, you do not

Re: [appengine-java] Best practice for multithreaded access/update to entity

2011-04-07 Thread Jeff Schnitzer
); } }); This will guarantee that updates to the counter are not lost. Jeff On Thu, Apr 7, 2011 at 10:08 AM, Jeff Schnitzer j...@infohazard.org wrote: This video will help you immensely: http://sites.google.com/site/io/under-the-covers-of-the-google-app-engine-datastore You can skip to the end if you just want

Re: [appengine-java] JPA/JDO vs low level API

2011-04-06 Thread Jeff Schnitzer
You can only read or write from a single entity group in a transaction. Yet I often find that during the course of a transaction I require multiple pieces of additional data that are not part of my entity group. For example, during Similarity's* login process I synchronize a lot of data into

Re: [appengine-java] Sending/Receving data to/from my application

2011-04-05 Thread Jeff Schnitzer
Caucho's hessian server implementation runs reasonably well on appengine, and you can find hessian clients in just about any language. Jeff On Tue, Apr 5, 2011 at 6:18 AM, jake189 binhmin...@gmail.com wrote: Hi, I programmed my simple application and located it in google's server. And now, I

Re: [appengine-java] JPA/JDO vs low level API

2011-04-02 Thread Jeff Schnitzer
An incomplete list of things that are difficult or impossible with JDO/JPA, but easy with Objectify/LowLevelAPI: * Partial indexes * Running multiple concurrent transactions, or (more likely) a transaction + a nontransaction. Because of GAE's transaction model, this is actually necessary quite

Re: [appengine-java] Consolidated logs via email

2011-03-31 Thread Jeff Schnitzer
On Thu, Mar 31, 2011 at 5:10 PM, Kyle Baley k...@baley.org wrote: We want to be somewhat proactive about warnings or higher in our logs so we're looking at a way of being notified if they occur. First thought was to use log4j and the email appender. This is fine but won't scale as more people

Re: [appengine-java] Google checkout and GAE

2011-03-21 Thread Jeff Schnitzer
The google checkout sdk doesn't work on appengine. There are some reports of weirdness (like you describe) relating jaxb. I considered investigating and found the SDK code doesn't compile, decided this wasn't for me. If you want google checkout, don't use the SDK - just write your own handlers.

Re: [appengine-java] Re: how to persist a list of bytearray?

2011-03-18 Thread Jeff Schnitzer
I normally don't do this but... if you're using Objectify, it's just: @Serialized private Listbyte[] attachments; Jeff On Thu, Mar 17, 2011 at 12:38 AM, Khanh Dao Minh khan...@gmail.com wrote: Dear Tao, As I understand, you should not use byte[] in GAE store. GAE only support some core value

Re: [appengine-java] for the problem Applications are limited to 150000000 bytes of resource files

2011-03-16 Thread Jeff Schnitzer
You may have an application which just doesn't fit into GAE's model. If these are just data files, consider storing them on S3 or some other cloud file system. Jeff On Tue, Mar 15, 2011 at 11:43 PM, Chun sei.guoc...@gmail.com wrote: Hi, I'm working with an application on twitter data, which

[appengine-java] Undocumented limit on URL length?

2011-03-07 Thread Jeff Schnitzer
Is there an undocumented limit on the length of a URL that can be fetched using the URLFetch service? There is no mention of a limit in this document, other than 1MB total for the request: http://code.google.com/appengine/docs/java/urlfetch/overview.html#Quotas_and_Limits I'm getting a

Re: [appengine-java] Re: SystemProperty.applicationId.get() returns s~[APP-ID]

2011-03-03 Thread Jeff Schnitzer
I logged this as a bug: http://code.google.com/p/googleappengine/issues/detail?id=4673 Jeff On Mon, Feb 28, 2011 at 8:48 PM, Charms Styler charmssty...@gmail.com wrote: Thanks for the insight. ;) -- You received this message because you are subscribed to the Google Groups Google App Engine

Re: [appengine-java] count total records when using cursor

2011-02-27 Thread Jeff Schnitzer
There is no cache of query results when you use cursors - or limit/offset. They're just pointers into the real datastore index. If you change the datastore, the results will change. If you want 100% guaranteed unchanging query results in a highly dynamic dataset, cache the results yourself in

[appengine-java] Re: VerifyError using Joda Time on GAE

2011-02-24 Thread Jeff Schnitzer
I recompiled Joda from trunk and now everything is happy. Very mysterious. Jeff On Thu, Feb 24, 2011 at 5:18 PM, Jeff Schnitzer j...@infohazard.org wrote: Is anyone else having trouble with Joda time on appengine? I just added it to my app, and attempts to use it generate a VerifyError like

Re: [appengine-java] Re: 1.4.2: Can't make https call from dev server

2011-02-14 Thread Jeff Schnitzer
I experience this problem. I'm also using a library that makes the actual call, so I can't use the URLFetch service method. I will have to revert to GAE SDK 1.4.0. Mac OSX 10.6, default JVM, Eclipse Helios: java version 1.6.0_22 Java(TM) SE Runtime Environment (build 1.6.0_22-b04-307-10M3261)

Re: [appengine-java] Re: Just getting started with Datastore

2011-02-02 Thread Jeff Schnitzer
Awww, bush You have my permission, if you want to it... Jeff On Wed, Feb 2, 2011 at 1:01 PM, Ikai Lan (Google) ikai.l+gro...@google.com wrote: Yep, entities are schemaless. This is both powerful and a bit of a mismatch to Java's type system. We've all become very used to thinking in terms of

Re: [appengine-java] Re: Need some points on implementing REST API for chess-like game

2011-01-18 Thread Jeff Schnitzer
A couple words of advice: Nearly any third-party authentication system will require that you perform the login process in a web browser, but you should still use one even for desktop apps. Systems that ask you to create a login are almost anachronistic these days. Use google login, or facebook

Re: [objectify-appengine] Re: [appengine-java] Re: persistent and scalable global atomic counter: not possible with GAE?

2011-01-02 Thread Jeff Schnitzer
Upon deeper consideration, whether or not Monotonic currently could produce dups depends on the exact behavior of: MemcacheService.increment(java.lang.Object key, long delta, java.lang.Long initialValue) Unfortunately the documentation is ambiguous about what the return value will be when

Re: [objectify-appengine] Re: [appengine-java] Re: persistent and scalable global atomic counter: not possible with GAE?

2011-01-02 Thread Jeff Schnitzer
monotonically increasing number given the tools available in GAE. Jeff On Sun, Jan 2, 2011 at 8:36 AM, Jeff Schnitzer j...@infohazard.org wrote: Upon deeper consideration, whether or not Monotonic currently could produce dups depends on the exact behavior of: MemcacheService.increment(java.lang.Object

Re: [appengine-java] Re: DataStore embeds equals signs (=) into saved file

2010-12-24 Thread Jeff Schnitzer
You almost assuredly have some sort of MIME object being submitted with a Content-Transfer-Encoding of quoted-printable, but the receiver doesn't understand quoted-printable. I have no idea what your actual problem might be, but you might be able to figure it out by studying how MIME works

Re: [appengine-java] JavaMail Multipart message with inline images

2010-12-14 Thread Jeff Schnitzer
It's a longstanding bug/limitation in appengine - please star this issue: http://code.google.com/p/googleappengine/issues/detail?id=965 Jeff On Tue, Dec 14, 2010 at 5:28 PM, Ronald R. DiFrango ron.difra...@gmail.com wrote: I'm attempting to send an email that has an HTML body with inline

Re: [appengine-java] Re: datanucleus-appengine

2010-12-06 Thread Jeff Schnitzer
On Fri, Dec 3, 2010 at 12:50 PM, George Moschovitis george.moschovi...@gmail.com wrote: - Objectify seems to have more momentum, but is not standard, dunno if this will be supported in a year or two Just to give you a little perspective, it's worth pointing out how thin projects like Objectify

Re: [appengine-java] Re: data in xml format from data store

2010-12-03 Thread Jeff Schnitzer
I don't know what jacek had in mind, but since it sounds like you're making the request from a custom client, make sure you are making the request with Accept-Encoding: gzip. http://code.google.com/appengine/kb/general.html#compression Jeff On Fri, Dec 3, 2010 at 6:01 AM, pac

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

2010-12-03 Thread Jeff Schnitzer
Does it take so much time to process your results that it really matters they be done in the optimal order? All that polling code is complicated... unless you're shaving off a lot of real-world time, seems like it's better to just launch all batches and block on the first one. Jeff On Wed, Dec

Re: [appengine-java] Re: Entity relations (JPA vs lowlevel API)

2010-11-22 Thread Jeff Schnitzer
This doesn't make any sense; entities in the GAE datastore cannot have multiple *parent* keys. However, your structure would work fine if you just dropped the @Parent annotation. This may help: http://code.google.com/p/objectify-appengine/wiki/Concepts#Keys Jeff On Mon, Nov 22, 2010 at 10:22

Re: [appengine-java] protobuf storage with JDO

2010-10-16 Thread Jeff Schnitzer
On Fri, Oct 15, 2010 at 11:44 PM, Guillaume B. guillaume.brus...@gmail.com wrote: perhaps this is an useless question and the best way to do would take me a lot of time for just a small performance gain I think this is your answer right here. Don't optimize prematurely - build your app as

Re: [appengine-java] API CRUD interface for application ?

2010-10-15 Thread Jeff Schnitzer
Why bother with Java? This sounds like a simple system that could be done with about 10 lines of Python and the remote_api. Jeff On Sun, Oct 10, 2010 at 2:28 PM, Maxim Veksler ma...@vekslers.org wrote: Hello, The application we run is a backend online service and has no GUI. We some how need

Re: [appengine-java] protobuf storage with JDO

2010-10-15 Thread Jeff Schnitzer
I'm not entirely certain what you are asking, but while Objectify doesn't have a special annotation that will turn a field into a protobuf, you can pretty easily do this yourself with @PostLoad and @PrePersist lifecycle callbacks: class MyEntity { @Transient ComplexThing thing; byte[]

Re: [appengine-java] Servlet 3 support?

2010-07-28 Thread Jeff Schnitzer
Please star this issue: http://code.google.com/p/googleappengine/issues/detail?id=3091 I'd be happy with just the annotation-based servlet configuration. Enough with the tedious xml already! Jeff On Wed, Jul 28, 2010 at 6:34 AM, Guillaume Laforge glafo...@gmail.com wrote: Hi all, I'm curious

Re: [appengine-java] jdo custom fetch group

2010-06-17 Thread Jeff Schnitzer
The GAE datastore doesn't support fetch groups for entity properties. You get back all the properties whenever you load an entity. Jeff On Thu, Jun 17, 2010 at 3:32 PM, Owen Powell opow...@gmail.com wrote: Hello group, How do I write a custom fetch group for my GAE project? I have a class A

Re: [appengine-java] What is the best option for RPC (web services) on App engine?

2010-06-15 Thread Jeff Schnitzer
Perhaps try posting the stacktrace to the hessian-interest list? Someone (possibly me) might be able to fix this issue. Jeff On Thu, Jun 10, 2010 at 9:13 AM, dilbert dilbert.elbo...@gmail.com wrote: First I'd like to explain what I mean by RPC. I'd like to be able to write interfaces like this

Re: [appengine-java] Re: What is the best option for RPC (web services) on App engine?

2010-06-15 Thread Jeff Schnitzer
problems with it? Also, when could we expect to see a solution in Hessian? If You need any other information please ask. Thank You for Your time. D. On Jun 15, 7:34 pm, Jeff Schnitzer j...@infohazard.org wrote: Perhaps try posting the stacktrace to the hessian-interest list? Someone (possibly me

Re: [appengine-java] Re: What is the best option for RPC (web services) on App engine?

2010-06-15 Thread Jeff Schnitzer
with exceptions again on the Caucho bug tracker? If this issue is solved I would recommend Hessian as the best RPC mechanism for GAE at this time. Apologies to other readers for the offtopic with bugs. D. On Jun 15, 11:24 pm, Jeff Schnitzer j...@infohazard.org wrote: I think you did yourself

Re: [appengine-java] Re: MemCache expiring around once a day - Cache Flushing

2010-05-27 Thread Jeff Schnitzer
This is the nature of memcache; you're sharing it with all the other users of appengine. Memory pressure will eventually push your inactive values out of the cache. Jeff On Thu, May 27, 2010 at 1:17 PM, Rahul Juneja rahul.jun...@gmail.com wrote: It looks like it is removing the least recently

Re: [appengine-java] java.lang.IllegalArgumentException: can't operate on multiple entity groups in a single transaction

2010-05-19 Thread Jeff Schnitzer
You can't work with more than one entity group in a single transaction. This is a limitation of GAE, although other people have built distributed 2pc-style transactions on top of the datastore. This should help: http://code.google.com/p/objectify-appengine/wiki/Concepts#Transactions Jeff On

Re: [appengine-java] Re: Objectify is there NontransactionalWrite/Read setting?

2010-05-14 Thread Jeff Schnitzer
consistency. This might speed up things a bit? I use DAOBase, how would I need configure this? Thanks, Toby p.s. the consistency thing might be worth to add to the Best Practices page, which is excelent by the way! On May 10, 11:07 pm, Jeff Schnitzer j...@infohazard.org wrote: Objectifydoes

[appengine-java] Please star: Servlet 3.0

2010-05-13 Thread Jeff Schnitzer
Most web containers have support for the Servlet 3.0 spec now, and GAE is starting to look a little behind the times. Anyone else want to star this issue and maybe up the priority? http://code.google.com/p/googleappengine/issues/detail?id=3091 Jeff -- You received this message because you are

Re: [appengine-java] Billed CPU time by far too high

2010-05-12 Thread Jeff Schnitzer
Are you really getting upset over some arbitrary numbers on a service you aren't even paying for? Jeff On Wed, May 12, 2010 at 4:58 AM, Henning Dierolf henning2...@hotmail.de wrote: Hi Ikai, it's also possible that you were being *underbilled* previously and that we've corrected billing

Re: [appengine-java] Objectify is there NontransactionalWrite/Read setting?

2010-05-10 Thread Jeff Schnitzer
Objectify does not use the jdoconfig.xml, nor does NontransactionalWrite or NontransactionalRead make any sense in the context of Objectify because the transaction API is much simpler. You can create an Objectify instance with various transaction or consistency characteristics by calling

Re: [appengine-java] [JDO Paging] Getting a cursor BEFORE the end of results

2010-05-07 Thread Jeff Schnitzer
com.google.appengine.api.datastore.QueryResultIteratorT) is it true that each iterator.hasNext() will lazily load entity from the data store? My concern is it might cost me more time that way than using Query.getResultList(). Please advise. Thank you. On Fri, May 7, 2010 at 2:24 AM, Jeff Schnitzer j

Re: [appengine-java] [JDO Paging] Getting a cursor BEFORE the end of results

2010-05-06 Thread Jeff Schnitzer
I'm a little confused by this. Why doesn't the OP's approach work? 1) Create query, fetch with limit of 21 items 2) Iterate through 20 items 3) Get cursor to be used for next page (if necessary) 4) Iterate to 21st item just to check for existence Why won't this work? The documentation seems to

Re: [appengine-java] Re: Can't decide: JDO, Twig-Persist or Objectify?

2010-04-27 Thread Jeff Schnitzer
The advantage of Objectify's key management is the generified Key? class, which helps keep your code straight. Jeff On Mon, Apr 26, 2010 at 5:16 AM, Christian Goudreau goudreau.christ...@gmail.com wrote: I didn't try, but I'm sure that if you set a Key field that doesn't exist in the

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

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: [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] 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: 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: 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: 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: 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: 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: 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

[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: 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)

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: 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] 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] 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] 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] 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

<    1   2   3   >