I’ve separated my Google App Engine app into a small version (regularly used bits – the user interface, etc.) and a big version (all of the small version plus admin screens, cron workers, etc.)
The plan is that GAE should be able to load my small versions very quickly and serve lots of requests from each instance because the memory requirement is tiny. The big version would be loaded for the admin screens and the cron work and requires Guice, a template library, apache-commons, etc.
The problem is that when the user clicks on the “Admin” tab, they need to be automatically transferred to the big version – how can I generate this link? I was hoping to version my application as follows:
small-1.myapp.appspot.com
big-1.myapp.appspot.com
small-2.myapp.appspot.com
big-2.myapp.appspot.com
etc. and for the user to be redirected from small-1 to big-1 when they request a page not available in the small code.
I’ve tried using SystemProperty.applicationVersion but it doesn’t seem to contain the application version string.
Are you sure that
does not yield your application’s ID (
myappin your case), or thatdoes not yield your running application’s major version (for example:
small-1 [timestamp]) (you will have to strip a timestamp out)?Failing that, since you know your app ID and version numbers already, could you not declare new system properties in your
appengine-web.xmland use these values instead?Despite the above, you might want to consider a cleaner alternative: have just the one app (so much less work to maintain and upload to GAE), and either perform lazy initialisation for your admin part or do what I do and put initialisation into an enqueued task upon app launch.