pbreit- Yeah I thought about letting apache handle the public part, but
that still leaves me in the lurch because I can't use web2py to determine
whether the user is logged in, which is how we decide whether to deliver
the public or private portion to begin with. So the only practical course
is to optimize within the same app, in web2py...
I think a combo of lazy tables and moving models into modules is where
we'll end up.
Thanks for all the suggestions--
On Wednesday, August 29, 2012 12:14:21 AM UTC-4, pbreit wrote:
>
> Fair enough. If there's no processing at all, best to serve the static
> site direct through Nginx/Apache. Otherwise, as you note, conditional
> models may not work so waiting for "lazy tables" might be best (should be
> any day now in 2.0).
>
> On Tuesday, August 28, 2012 8:55:35 PM UTC-7, Yarin wrote:
>>
>> Who said anything about premature? We want our app to run faster, and we
>> are gonna worry about it.
>>
>> On Tuesday, August 28, 2012 11:49:22 PM UTC-4, pbreit wrote:
>>>
>>> If you haven't determined a performance issue, best to not worry about
>>> it ("premature optimization -> evil").
>>>
>>>
>>> On Tuesday, August 28, 2012 6:52:12 PM UTC-7, Yarin wrote:
>>>>
>>>> A basic architecture question:
>>>>
>>>> We're putting together a typical web app where non-logged in users
>>>> reach a public-facing basic 'brochure' site, and then log in to reach the
>>>> 'real' application. With such a setup, it makes no sense to be loading
>>>> models for the public portion of the site, as it's just some semi-static
>>>> pages and a login form. So I'm wondering
>>>>
>>>> - a) Is there a way to prevent models loading at the request or
>>>> controller level?
>>>> - b) Should the 'public' site be part of the same application at
>>>> all, or should it be a separate light-weight application with a login
>>>> form
>>>> that then points to the 'real' application?
>>>>
>>>>
--