Community
Participate
Working Groups
Google App Engine (GAE) is a popular deployment environment (http://code.google.com/appengine/), especially for individual developers and small shops. It provides a Java servlet container and supports a set of services for data access, security, etc. More info can be found here - http://code.google.com/appengine/docs/java/runtime.html I hacked around and was able to get a (non-database) RUI application to work. Here are the changes I had to make: 1) EGL JS runtime assumes the context root is some non-empty string, but GAE uses a "" for the context root. To fix, had to go into the generated HTML and set the egl__contextroot to "." 2) GAE does not support apps spawning their own threads (http://code.google.com/appengine/docs/java/runtime.html#The_Sandbox), which is something the EGL Proxy does in HttpServiceHandler. To fix, had to update invokeRestService method to use a standard reader to read from the connection. BufferedReader reader = new BufferedReader(new InputStreamReader((ByteArrayInputStream)content)); 3) ServiceServlet was expecting a non-null context root in its init() method, so had to add code to handle null appropriately: if (contextRoot == null || contextRoot.length() == 0) { System.out.print("setting context root to empty string"); contextRoot = ""; } else { while(contextRoot.charAt(0) == '/'){ contextRoot = contextRoot.substring(1); } } 3) I see this support happening in two stages: * Stage 1 - support for deploying EGL apps that do NOT need database access (i.e. just RUIs and simple services) * Stage 2 - support for deploying EGL apps that need database support (should use the data access/storage capabilities of GAE). The deployment operation should support deploying directly into a GAE 'web' project (which is not a standard Eclipse Dynamic web project).
This enhancement would be useful to us since we would have a good place to deploy sample apps to. I deployed 2 'sample' apps (with the hacks described in this bug description): http://egllbf.appspot.com/GoogleMapSample.html http://egllbf.appspot.com/LocalBusinessFinderView.html
Is GAE not allowing thread code to be deployed to it, or not allowing it to be running on it? If it is the later, maybe we can have a switch in web.xml to control how service call is executed.
The app can be deployed, but fails at runtime. A switch is an option, but it would be more ideal for the app to fail nicely over to the non-thread approach if the app's container does not support threads (there may be others besides GAE that have this restrictions). I would still like us to fully understand why spawning a thread is necessary and whether other proxies (like the WAS Web 2.0 proxy) spawn threads to handle requests. See Bug 368168 - JS runtime optimization: proxy optimization for more discussion on this topic.
This enhancement should be considered when developing extension points for deployment in the .8.1 release. We do not need to specifically support this type of deployment right now, but it should be considered.