[google-appengine] Re: Somewhat Disappointed.
http://code.google.com/p/pyjamas/ Pyjamas is a cross-browser Web App development API that allows you to write your client side functionality in Python. While it looks like a desktop API, Pyjamas is a stand alone Python to JavaScript compiler, an AJAX framework / library and a comprehensive widget set API. On Mar 9, 12:12 am, Owen wrote: > OK, I *love* GAE getting outa beta and charging. Yup, I *wanna* pay, > so that I can get what I'd like. > > BUT: the downside is that they haven't offered me what I want. Django > templates are fine, as is Python. But on the client side I still have > to wrestle with Javascript .. which is also a fine language. > > So what's my beef? That I gotta use *two* languages. Wimp that I am, > I'm sorta getting tired of this. I've written a fairly complicated > GAE app, with Google Maps (and lately a few JS libraries), and I still > get the two wonderful languages mixed up. > > So if I'm going to start paying, I want some love. Either: > > 1 - A Python environment that emits Javascript for the browser (think > GWT) > .. or > 2 - A server-side Javascript solution, like Aptana & Jaxer . > > After looking at the *huge* advances in Javascript code, I'm tempted > to move from 1 to 2. Lively Kernel is really nice, as is the JS > version of Processing.org's graphics. > > But Google, as much as I love ya, you're still in beta. I like your > approach much more than Amazon's, and I think your getting there, but > you're puzzling a lot of us who see you using GWT for high end apps, > but not giving us GAE folks the full Monty. > > So what's your next move? > > -- Owen --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[google-appengine] Re: Application instances seem to be too aggressively recycled
On Mar 11, 12:28 pm, johnP wrote: > I've been tracking (and seeing) this for a while already. Besides the > latency that occurs each time Django gets re-zipimported, what is > concerning is the thought of paying for CPUs to constantly reload the > cache. My app's not live yet - so there is some time before this > becomes a $$$ problem for me, but... > But how can you reach your billing limit if the issue is that you get low traffic in the first place? other than that, I agree, it would be great if this 2-sec limit was increased. > I remain forever hopeful that it will be solved by then. :) > > On Mar 11, 4:26 am, Antonin Hildebrand > wrote: > > > I can also confirm this behavior with my app, recycling takes place > > after about 2 seconds of inactivity. I also guess, that this recycling > > timeout had to be lowered by GAE team during last week, because I had > > running and working application on appspot. I did no updates to it and > > the app did break because of this change. > > > On Mar 10, 6:22 pm, Jason C wrote: > > > > We have a new application that receives _very_ little load. So little, > > > in fact, that each request spins up a new application instance. We are > > > using Django trunk and the import overhead is high. All of this yields > > > a long request (e.g., 8802ms) using a lot of CPU (e.g., 3247ms-cpu). > > > > With very little load, it makes sense that instances are recycled. On > > > that assumption, we've started applying some primer load against a > > > couple of uris in an attempt to keep some instances hot. We're > > > applying around 1 request/second across 2 uris. > > > > When we hit a hot instance, we get blazing speed (e.g., url_1: 73ms > > > 91ms-cpu, url_2: 368ms 615ms-cpu - these values are pulled from the > > > App Engine console Logs tool and I'm not completely sure if this > > > represents Runtime, or combined Runtime/API - I believe the latter). > > > > Under this 1 request/second load, we are still seeing lots of instance > > > startup - even after 40-50 minutes of sustained load. Subjectively, > > > the instance startups seem to come in bursts, though we've done no > > > formal analysis around this. > > > > Does anyone else see this behavior? It _really_ kills our application > > > performance - so much so, that we're considering moving away from > > > Django in an effort to minimize the start-up pain. > > > > Any info or war stories would be appreciated. --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[google-appengine] Re: jinja2 environment loading on each request to /
this is what i use: === from jinja2 import Environment, FunctionLoader , TemplateNotFound from google.appengine.api import memcache import os,logging VERSION = os.environ['CURRENT_VERSION_ID'] logging.warn ("COLD START") def jinja2_template_loader(templatename): templatepath = os.path.abspath(os.curdir+'/ template/'+templatename) template = memcache.get(templatepath+VERSION) logging.debug( "..INSIDE JINJA") if template is None: try: logging.debug( "..READ") template = file(templatepath).read() memcache.set(templatepath+VERSION,template,time=500) except: template = None return template SERVER = os.environ.get('SERVER_SOFTWARE','').lower() if SERVER.startswith('devel'): logging.debug("...DEVEL JINJA") load_this = Environment(cache_size=0,loader = FunctionLoader (jinja2_template_loader)) else: load_this = Environment(loader= FunctionLoader (jinja2_template_loader)) def render(template_name,context): template = load_this.get_template(template_name) content = template.render(context) return content = if your app handlers are cached (ie via "if __name__ == '__main__':main ()") this should be imported only once per server instance. It also caches templates both in memcache (for 8 minutes) and in instance memory (in case of local testing, templates are not cached in memory, so you can make changes and see the changes immediately) HTH Peter On Mar 13, 7:34 am, Jarek Zgoda wrote: > If you move Environment creation routine to another module it will be > cached by Google, but only for few seconds (2-3?), so if your > application does not get enough traffic you'd gain nothing from this. > > In my attempts to speedup things I discovered that only loader can be > cached, but it has to be invalidated upon each new deployment so its > key has to have application version added (this is how I did key > versioning in my caching tools). Unfortunately, the gain from this > caching approaches 0. > > And the last thing: Armin Ronacher, the guy behind Jinja, is aware of > the problem and has some ideas on how to improve things on GAE, > hopefully including template bytecode caching (this would be really > super-nice!). > > On 13 Mar, 00:38, pedepy wrote: > > > hey so i use jinja2 templates because they are better [no citation > > needed], but from what i understand, loading the jinja2 environment > > can be quite an expensive task. Through logging, I have found out that > > each request to / loads the environment over and over.. I have those > > routines in a seperate python script (not the one that app.yaml > > fowards requests to for /). > > > anything im missing here ? I think this could be adding also an extra > > 1000 cpu ms on every requests ... > > > (by the way, i have tried the cookbook's memcache technique and it > > only works locally, it fails on the google servers..) --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---