This sound really promising.

On Sat, Oct 10, 2009 at 9:15 PM, Jason S. <jas...@tuffmail.com> wrote:

>
> I just got a hello-world Pylons app running on GAE without using the
> appengine-monkey/homedir scripts and using the stock paster template
> (and an INI file). I'm not sure if I'm going to use GAE seriously, but
> it's an interesting problem to work on. If I am, then personally, I
> would rather not use an entirely different app template and config
> system.
>

I absolutely agree. GAE is slowing me down: I can't debug, can't do print
statements, and can't tell when things go wrong. It would be much preferable
to keep things as stock Pylons as possible.



> 1. Wrangle all the dependencies together into a 'lib' directory and
> set up sys.path in my main .py file. This was the easy part. I did
> have to yank the simplejson out of Django to replace the simplejson
> that Pylons depends on, which is partly in C.
>

I think that you can simply delete the speedups file from the simplejson
module.



> 2. Patch Paste Deploy with a new loader class, to load a function spec
> instead of an egg spec, without changing anything else about the INI
> file format. In other words, my app:main looks like this:
>
> [app:main]
> use = func:myhello.config.middleware:make_app
> full_stack = true
>

I'm not following completely. Does this make the GAE SDK http/app server
become aware of your ini file somehow? If not, the func: you made seems to
have the exact same effect as the normal pylons behavior; it still runs
make_app... that's the WSGI starting point, right? (Also,
middleware:make_app is the "entry point" for a pylons app).



> 3. Hack on Mako/the render function a bit. I'm still not done with
> this one. Mako's TemplateLookup uses various non-supported functions
> such as os.makedirs and tempfile.mkstmp. The Template class works
> fine, of course, but TemplateLookup is rather critical for any serious
> usage. Has this been addressed elsewhere?


Yep, I think that Mako can live happily on GAE. I think that commenting out
cache_dir line in environment basically accomplishes what you're working on.



> I'm sure there will be more problems down the line, but if anyone else
> is interested in this approach I will write up some docs and submit
> the Paste Deploy patch.
>

I'm interested.



> BTW, the performance I'm getting when hitting it with apache bench
> (ab) is kind of awful. Haven't profiled yet.
>

If you mean on the SDK, yeah, I think that's pretty standard. Hopefully in
the cloud it will be good.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to pylons-discuss@googlegroups.com
To unsubscribe from this group, send email to 
pylons-discuss+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to