DI, AOP are trivially scalable - the solution is simply "don't route
requests to instances until they are ready". Every other PaaS that I am
aware of follows this approach. Elastic Beanstalk supports autoscaling too.

Furthermore, this is not strictly a DI/AOP issue. Any request >5s might as
well never complete; the user has already deemed your app broken and hit
the reload button. Last time I tried, Hello, World with JPA takes ~4s to
start. If you have a few entity classes and JAX-RS resources, you will
easily hit 10s - even without Guice or Spring. The difference between 10s
and 30s is immaterial from the user's perspective.

As someone who has done it both ways, the only thing more monstrous than
Spring is trying to maintain a large, complicated application without DI or
AOP. This is sufficiently conventional wisdom that the JavaEE group saw fit
to add CDI to the official specification.

Jeff


On Sat, May 18, 2013 at 7:32 AM, Moshe Shaham <ishe...@gmail.com> wrote:

> I wonder, why is it hard to accept the fact that DI, AOP are not easily
> scalable, the same way you accept the fact the relational databases are?
> for a long time, if you wanted relational databases - that's fine but not
> on GAE
> you want the magic of spring or guice? great, but GAE will not provide you
> with shortcuts...
>
> GAE is still useful without those (monstrous, at least spring, IMO)
> frameworks.
>
> having said that, I completely agree that cold starts should not happen.
>
>
> On Thursday, May 16, 2013 2:52:51 AM UTC+3, Jeff Schnitzer wrote:
>>
>> I attended the "Autoscaling Java" session at Google I/O. In summary, the
>> advice is:
>>
>>  * Don't use dependency injection.
>>  * Don't use AOP.
>>  * Hardcode configuration values as much as possible.
>>
>> In other words, go back to Java circa 2002. There was no discussion of
>> changing routing so that user requests don't see cold starts. I asked about
>> this in person - apparently they're still "talking about it" and nothing
>> has been done about it.
>>
>> I am sad.
>>
>> Jeff
>>
>

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


Reply via email to