Hi Robert,

Good point on the caching, I almost forgot about it.

Unfortunately I can't really do the separation in app.yaml because the
path overlap between the backend and frontend. Thinking about using
the URL prefix (e.g. 'www' vs 'service') to dispatch differently.
What's your thoughts?

Cheers,

Mars

On May 3, 2:17 pm, Robert Kluin <robert.kl...@gmail.com> wrote:
> Hey Mars,
>   If you define the application at the modules level (ie outside of
> main) it will be cached between requests.  So even if it does add a
> little overhead due to more rules, it probably won't matter much
> across requests.  If you want your stuff isolated, just use two
> mappings in app.yaml.
>
> Robert
>
>
>
>
>
>
>
> On Tue, May 3, 2011 at 15:29, Mars <mars...@askmymob.com> wrote:
> > Good point Robert. In fact this is exactly what I'm pondering now.
>
> > I have two apps, one for backend and one for frontend. I like the
> > clean cut but the extra network latency between the two introduces
> > 100~200ms delay for my page load. Want to combine the two together but
> > doesn't want to lose the nice isolation. So one idea I came up with is
> > to have a very simple app.yaml and leave the dispatch smarts in
> > Python. Just want to make sure that the dispatch code in Python is not
> > going to introduce too much overhead to defeat the purpose.
>
> > Cheers,
>
> > Mars
>
> > On May 3, 7:47 am, Robert Kluin <robert.kl...@gmail.com> wrote:
> >> Hi Mars,
> >>   One possibly important difference is that items in app.yaml are
> >> separate WSGI apps.  So if you have distinct sections of your
> >> application, such as backend services and frontend views, that don't
> >> share a lot of code between them, a loading request will only need to
> >> load the modules used by the WSGI app the url that got hit maps to in
> >> app.yaml.  This could have an impact if you're loading a lot of
> >> unneeded modules, or you if you've got some very rarely used modules.
> >> This difference is probably less important now with warming requests;
> >> recently there seem to be far fewer issues with corrupted instances on
> >> spinup.
>
> >>   Personally, if I have something that is logically a separate
> >> component that is very 'modular' I often define it in app.yaml.  Also,
> >> I often define components that are relatively infrequently used (like
> >> dev / admin stuff) as a separate apps, since there is not much point
> >> in loading that stuff most of the time.
>
> >> Robert
>
> >> On Mon, May 2, 2011 at 23:37, Mars <mars...@askmymob.com> wrote:
> >> > If I have a large number of url patterns to match, is it more
> >> > efficient, in terms of performance, to do it in app.yaml or passing
> >> > them as arguments to WSGIApplication constructor?
>
> >> > p.s. I'm using Python, but I'd imagine similar question applies to
> >> > Java?
>
> >> > Cheers,
>
> >> > Mars
>
> >> > --
> >> > 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 
> >> > athttp://groups.google.com/group/google-appengine?hl=en.
>
> > --
> > 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 
> > athttp://groups.google.com/group/google-appengine?hl=en.

-- 
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.

Reply via email to