On Mon, Jul 23, 2012 at 10:32 AM, Per <per.fragem...@gmail.com> wrote:
>
> I doubt that Google will commit to any official statement. So here's my 2
> cents, from a low-usage, rather complex B2B application. "Frameworks are
> okay, to a certain degree, but be prepared to rework if you're successful"

While I certainly would not disagree with this, I think the important
discussion - the one relevant to the question of whether Google should
spend effort refining the scheduler - is "what kind of frameworks are
reasonable?"

Let's take persistence.  Does anyone honestly believe that it's
reasonable to write complicated applications using only the Java
low-level api?

So you pick a lightweight persistence framework like Objectify.  Great
choice!  ;-)  I'd like to think I've done a pretty good job of
optimizing Ofy, but there is a problem I do not have any way of
getting around:  In order to map POJOs to the datastore, Objectify has
to introspect the POJOs.  Because queries can return polymorphic
entities, this introspection has to happen up front.

Everything is great when your app has a handful of classes.  But you
add features and add features and now you have 30, 50, 100+ entity
classes.  My domain model currently has 56 classes and it takes
Objectify 4-5s to load and introspect them.  This isn't a classpath
scanning issue - the bottleneck seems to be the classloader itself.

My point:  The more complicated your application is, the more startup
time is going to be impacted by a framework like Objectify.  Also, the
more complicated your application is, the more you need a framework
like Objectify.  It's a catch-22.

So this 4-5s hit is just something I have to accept.  There's no magic
"optimization" I can do to make it go away - believe me, I'm in the
best position of anyone to do it, and I don't see any fixes for
Objectify that preserve important features like polymorphism.  This
hit is going to get worse when my domain model doubles, triples, etc
over the next few years.

If we say "all apps must start up in <5s" then we've basically said
that Brandon is right and we must stop using all frameworks, even at
the foundational level of persistence.  I certainly hope nobody takes
that seriously.

I'm not saying that it's a great idea to throw in frameworks that make
your app take 50s to start up... but I am saying that Java startup
latency is not a problem we can optimize away.  It's something we have
to deal with one way or another, and it would be best for everyone if
Google dealt with it at the scheduler.

Jeff

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en.

Reply via email to