--
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-appengi...@googlegroups.com.
To post to this group, send email to google-a...@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.
How much of this issue is endemic to Java's design, and therefore would require significant engineering on Google's part to fix? They seem to have determined the ROI isn't high enough for them to invest here.Is it just fundamental to the way that Java must unpack jars, and JIT the bytecode, and ... ???Isn't Python's by-line "batteries included", indicating that the standard runtime contains the kitchen sink? Is the Python environment richer out-of-the-box than Java's, so you don't need to doctor it with Guice, Objectify, Guava, etc.?This is partly an academic question, since I suspect the only people who really know work at Google and aren't talking. But it's partly a learning exercise; I like the idea of leveraging a PaaS environment like GAE. I've been productive making use of Guice and Objectify (Thanks, Jeff!), but in the future it seems that selecting the right programming environment and language may be a key success factor in leveraging a PaaS application delivery environment if other languages start out with significant disadvantages in that environment.
--
No, I'm not "overrating" with my subject.
The apparent reasoning behind those points is that Google still thinks "startup time is your problem", and routes user requests to cold starts. This works in Go but it will never work in Java. The last time I made a Hello, World app with JPA it took 4-5 seconds to startup in production. Somewhere around 5 seconds is where the user thinks your app is broken and hits the reload button. If Google Search pages took 5 seconds to load for a significant percentage of users, heads would roll.If your app actually _does something_ it's going to take more than 5s to load. Maybe you can make it 10s instead of 30s by adopting 2000s-era programming practices, but it doesn't matter because the user has already considered your app broken.And don't get me started on the frequent "sick periods" where startup time goes up by 3X...Jeff
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 GAEyou 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.
First of all, thanks for attending the Google I/O talk, we got great feedback, both positive and constructive. It was a great I/O and very nice to hang out with many of the developers at the event.
This talk is based on my previous experience where I have worked with and promoted the use of Spring, Guice, AspectJ, and many other great java technologies. I in fact mentioned my favorite configuration for restful services during my talk, which includes Guice.
Many things were taken out of context in this thread from the talk I gave. In particular the fact that you shouldn't use DI. I think DI works great, and I was merely giving people tips on getting fast startup for a java app. I do still have my Rod Johnson bobblehead from when I attended The Spring Experience in 2007 on my desk. It's a strong reminder of where we started with Spring 1.0 and where we're at with new DI like Dagger.
On the orthogonal issue of cold start requests, we're certainly doing things to make sure that requests go to warm instances whenever possible. Whatever we do to improve this behaviour will be much simpler if your application starts up quickly.
Shaving 2 seconds of boot time off your application has a significant positive impact on billing and reliability when booting a large amount of instances needed to scale your application. There are actions that you can take on the application level to improve this, and internally we are also working hard on improving scheduling and boot time.
If your application is seeing tons of cold starts, let us know, and we are happy to look in depth as to what is going on in our infrastructure. The vast majority of Java apps on App Engine boot very fast, and we are willing to spend time now to improve the few apps experiencing high variation of time during startup.
Recently we added dynamic loading requests to the administrative dashboard graphs. Hopefully this can help with identification of when changes to the application impact performance.
Would it be easier if we offered the minimum idle instances tuning parameter via an API? That way you could actually do your own prediction and adjust the min idle instances programmatically. That actually sounds very reasonable to do, but I'm just throwing ideas out now. We’re very open to any ideas that would make this simpler.
In my Google I/O talk my goal was to show that if you do use certain facilities in common java frameworks, you need to optimize a few specific points around them.
Matt (always reachable via irc : mattstep on irc.freenode.net in #appengine)
First of all, thanks for attending the Google I/O talk, we got great feedback, both positive and constructive. It was a great I/O and very nice to hang out with many of the developers at the event.
This talk is based on my previous experience where I have worked with and promoted the use of Spring, Guice, AspectJ, and many other great java technologies. I in fact mentioned my favorite configuration for restful services during my talk, which includes Guice.
Many things were taken out of context in this thread from the talk I gave. In particular the fact that you shouldn't use DI. I think DI works great, and I was merely giving people tips on getting fast startup for a java app. I do still have my Rod Johnson bobblehead from when I attended The Spring Experience in 2007 on my desk. It's a strong reminder of where we started with Spring 1.0 and where we're at with new DI like Dagger.
On the orthogonal issue of cold start requests, we're certainly doing things to make sure that requests go to warm instances whenever possible. Whatever we do to improve this behaviour will be much simpler if your application starts up quickly.
Shaving 2 seconds of boot time off your application has a significant positive impact on billing and reliability when booting a large amount of instances needed to scale your application. There are actions that you can take on the application level to improve this, and internally we are also working hard on improving scheduling and boot time.
If your application is seeing tons of cold starts, let us know, and we are happy to look in depth as to what is going on in our infrastructure. The vast majority of Java apps on App Engine boot very fast, and we are willing to spend time now to improve the few apps experiencing high variation of time during startup.
Recently we added dynamic loading requests to the administrative dashboard graphs. Hopefully this can help with identification of when changes to the application impact performance.
Would it be easier if we offered the minimum idle instances tuning parameter via an API? That way you could actually do your own prediction and adjust the min idle instances programmatically. That actually sounds very reasonable to do, but I'm just throwing ideas out now. We’re very open to any ideas that would make this simpler.
In my Google I/O talk my goal was to show that if you do use certain facilities in common java frameworks, you need to optimize a few specific points around them.
Matt (always reachable via irc : mattstep on irc.freenode.net in #appengine)
On Monday, May 20, 2013 11:29:46 AM UTC-7, Marcel Manz wrote:
Would it be easier if we offered the minimum idle instances tuning parameter via an API? That way you could actually do your own prediction and adjust the min idle instances programmatically. That actually sounds very reasonable to do, but I'm just throwing ideas out now. We’re very open to any ideas that would make this simpler.
First of all, thanks for attending the Google I/O talk, we got great feedback, both positive and constructive. It was a great I/O and very nice to hang out with many of the developers at the event.
This talk is based on my previous experience where I have worked with and promoted the use of Spring, Guice, AspectJ, and many other great java technologies. I in fact mentioned my favorite configuration for restful services during my talk, which includes Guice.
Many things were taken out of context in this thread from the talk I gave. In particular the fact that you shouldn't use DI. I think DI works great, and I was merely giving people tips on getting fast startup for a java app. I do still have my Rod Johnson bobblehead from when I attended The Spring Experience in 2007 on my desk. It's a strong reminder of where we started with Spring 1.0 and where we're at with new DI like Dagger.
On the orthogonal issue of cold start requests, we're certainly doing things to make sure that requests go to warm instances whenever possible. Whatever we do to improve this behaviour will be much simpler if your application starts up quickly.
Shaving 2 seconds of boot time off your application has a significant positive impact on billing and reliability when booting a large amount of instances needed to scale your application. There are actions that you can take on the application level to improve this, and internally we are also working hard on improving scheduling and boot time.
If your application is seeing tons of cold starts, let us know, and we are happy to look in depth as to what is going on in our infrastructure. The vast majority of Java apps on App Engine boot very fast, and we are willing to spend time now to improve the few apps experiencing high variation of time during startup.
Recently we added dynamic loading requests to the administrative dashboard graphs. Hopefully this can help with identification of when changes to the application impact performance.
Would it be easier if we offered the minimum idle instances tuning parameter via an API? That way you could actually do your own prediction and adjust the min idle instances programmatically. That actually sounds very reasonable to do, but I'm just throwing ideas out now. We’re very open to any ideas that would make this simpler.
In my Google I/O talk my goal was to show that if you do use certain facilities in common java frameworks, you need to optimize a few specific points around them.
Matt (always reachable via irc : mattstep on irc.freenode.net in #appengine)
On Monday, May 20, 2013 11:29:46 AM UTC-7, Marcel Manz wrote:
Feature Request: Can you guys put up an automatic "Loading.../Redirecting..." page when requests are routed to cold instance starts? The major problem here really isn't the loading time, it's that there's no user-facing acknowledgement that something is going on. When a user clicks a link and gets directed to a cold-start instance they only see a blank page - they don't know if the page is loading, if their browser crashed, if the site broke down, etc. Have GAE offer an option where if an instance is cold started, and the loading is taking more than x seconds, the user is shown a "LOADING..." graphic, then is redirected to the page they requested when the instance is finished loading. This isn't new technology for Google - Gmail does the same thing if email loading is slow.
...many of our apps serve other machines in M2M (machine 2 machine) communication and I certainly don't want to output any 'Come back later' page to a remote API expecting a different input.
Hence all the discussion about using standard frontend instances that can handle and scale with load
So our Airlift application framework starts up pretty much immediately on App Engine for Java.It runs on the Java runtime, but developers write request handlers in JavaScript via Rhino. Even though it is production ready (we do have several customers using it already) it is not ready for public consumption (we are looking to release it at the end the summer).
I am not mentioning this as an alternative to what you are doing. Instead, I want to make the point that it is possible to create a framework in Java that plays well with App Engine.Bediako
--You received this message because you are subscribed to a topic in the Google Groups "Google App Engine" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-appengine/Nz4Yt8V6PB0/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to google-appengi...@googlegroups.com.
--
You received this message because you are subscribed to a topic in the Google Groups "Google App Engine" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/google-appengine/Nz4Yt8V6PB0/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to google-appengi...@googlegroups.com.
To post to this group, send email to google-a...@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.
By that definition there are no frameworks which work on GAE.
Persistence? You you're stuck with the low-level API. Everything else (including Objectify) requires some amount of classloading and introspection at startup. You just blew the 5s limit.
With all due respect to the Thundr developers - I'm sure it's a lovely framework, but it requires defining all your endpoints in a JSON file. I have hundreds of endpoints; if I wanted the "big chunk of XML" approach I'd use http://mav.sf.net/ which I wrote back in 2001. Also, the API requires returning things like JspView, which complicates testing. JAX-RS (which requires classloading and introspection) allows us to make clean, testable business methods... it's one of the few standards that came out of the JCP that didn't suck in the first iteration.
GAE can't expect us to roll back java development to 2001. Applications have gotten a lot more complicated since then. And even if we did, how much are we *really* going to improve startup time? Remember, cutting 30s down to 10s is irrelevant - the user still abandoned our site at 5s.
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-appengi...@googlegroups.com.
Regarding configuring routes in one location (in this case JSON, but Java is also possible, and more testable). In the context of a web application, having all the endpoint mappings in one location can really help with discoverability and maintenance. With restful services, there is a much more logical place to home things (usually around the entity), so having the endpoint definitions scattered around code is less problematic. If you have an application developed by many people, which is iterating quickly it can be very useful to see and update all endpoints in one spot. We chose this pattern because our experience on large apps before has shown that little used endpoints (for admin functions, rarely used user features, etc) are much more vulnerable to bitrot.
Regarding returning concrete view types, like JspView, rather than domain models:
I think you can split the needs of a framework right down the middle - data views and template views. Data views usually expose some sort of API model (which you back with a java model), and consumers need to understand the available Apis. Most people do this restfully these days, get put post delete.
Then there are template views. Rendering the template (usually to HTML, but emails, messages etc) fold together a couple of concepts.
1) screen flow - any post (or put or delete) will have a paired get request simply to show a page with a form and probably some JavaScript. Usually it goes further with input validation, redirect on post etc
2) supplementary/reference data - every drop down needs possible options, usernames are displayed, carousel widgets, navigation elements etc.
Specific view types allow the explicit definition of the required data. For example, a jsp requires a view name (the jsp file), and model data. Once it's concretely defined, it becomes easy to test.
There are other advantages, for example a unified output engine means you can reuse views, such as jsps for rendering emails or mms, rather than a different templating language.
Tl;dr
Testability, maintainability and discoverability trumps saving yourself typing 'new JspView(' or 'new Js<ctrl><space><enter>'