I still don't really understand what you are trying to do so it's hard to 
make suggestions.

I think there could be problems either way if you are effectively switching 
apps while users are using the site.

I think what might be important to what you are doing is that web2py looks 
at the "applications" directory *at startup* to see what apps are present. 
So, for example, if you changed a directory name in the "applications" 
directory, you would need to restart web2py (or reload routes). But if you 
have a symlink in there pointing to an app (located anywhere), as long as 
you keep the same symlink name, you can make it point to any other app 
without needing to restart web2py or reload routes. It does not matter if 
the new app has different controllers/models/views since those are 
recognized dynamically.

But I think if you have users in mid-session and you switch apps on them, 
it could present problems no matter how you try to solve it.


On Sunday, June 10, 2012 9:07:22 AM UTC-7, Anthony wrote:
>
> > No, admin (including reloading routes) can be made available on a 
>> production 
>> > server -- you just have to access it via HTTPS. This should be fine for 
>> > production. 
>>
>> That's one way to go, but I was following the example from 
>> http://web2py.com/books/default/chapter/29/13 
>>
>
> That section starts with the following:
>
> It is very dangerous to publicly expose the *admin* application and the *
> appadmin* controllers unless they run over HTTPS. 
>
>
> I have no idea from reading the docs if it should be safe, or not. 
>> For all I know if I happen to change the symbolic link at the wrong 
>> time, web2py will traverse the path 'in the middle of something 
>> important' and end up in a different application than it was before 
>> (projectX links to projectX2011 and I get "luck" and switch the link 
>> to projectX2012 at just the wrong moment).
>>
>
> Yes, good point -- that's an issue with how symbolic links work. During a 
> given request, web2py will read (and possibly write) several files from the 
> filesystem within the application's folder -- if the symbolic link changes 
> mid-request, I suppose it could read/write files from two different 
> applications. So it probably would be a good idea to temporarily disable 
> the application (which can be done via admin) when changing the symbolic 
> link. Actually, I think using routes.py might be a better way to go anyway.
>
> Anthony
>

On Sunday, June 10, 2012 9:07:22 AM UTC-7, Anthony wrote:
>
> > No, admin (including reloading routes) can be made available on a 
>> production 
>> > server -- you just have to access it via HTTPS. This should be fine for 
>> > production. 
>>
>> That's one way to go, but I was following the example from 
>> http://web2py.com/books/default/chapter/29/13 
>>
>
> That section starts with the following:
>
> It is very dangerous to publicly expose the *admin* application and the *
> appadmin* controllers unless they run over HTTPS. 
>
>
> I have no idea from reading the docs if it should be safe, or not. 
>> For all I know if I happen to change the symbolic link at the wrong 
>> time, web2py will traverse the path 'in the middle of something 
>> important' and end up in a different application than it was before 
>> (projectX links to projectX2011 and I get "luck" and switch the link 
>> to projectX2012 at just the wrong moment).
>>
>
> Yes, good point -- that's an issue with how symbolic links work. During a 
> given request, web2py will read (and possibly write) several files from the 
> filesystem within the application's folder -- if the symbolic link changes 
> mid-request, I suppose it could read/write files from two different 
> applications. So it probably would be a good idea to temporarily disable 
> the application (which can be done via admin) when changing the symbolic 
> link. Actually, I think using routes.py might be a better way to go anyway.
>
> Anthony
>

On Sunday, June 10, 2012 9:07:22 AM UTC-7, Anthony wrote:
>
> > No, admin (including reloading routes) can be made available on a 
>> production 
>> > server -- you just have to access it via HTTPS. This should be fine for 
>> > production. 
>>
>> That's one way to go, but I was following the example from 
>> http://web2py.com/books/default/chapter/29/13 
>>
>
> That section starts with the following:
>
> It is very dangerous to publicly expose the *admin* application and the *
> appadmin* controllers unless they run over HTTPS. 
>
>
> I have no idea from reading the docs if it should be safe, or not. 
>> For all I know if I happen to change the symbolic link at the wrong 
>> time, web2py will traverse the path 'in the middle of something 
>> important' and end up in a different application than it was before 
>> (projectX links to projectX2011 and I get "luck" and switch the link 
>> to projectX2012 at just the wrong moment).
>>
>
> Yes, good point -- that's an issue with how symbolic links work. During a 
> given request, web2py will read (and possibly write) several files from the 
> filesystem within the application's folder -- if the symbolic link changes 
> mid-request, I suppose it could read/write files from two different 
> applications. So it probably would be a good idea to temporarily disable 
> the application (which can be done via admin) when changing the symbolic 
> link. Actually, I think using routes.py might be a better way to go anyway.
>
> Anthony
>

On Sunday, June 10, 2012 9:07:22 AM UTC-7, Anthony wrote:
>
> > No, admin (including reloading routes) can be made available on a 
>> production 
>> > server -- you just have to access it via HTTPS. This should be fine for 
>> > production. 
>>
>> That's one way to go, but I was following the example from 
>> http://web2py.com/books/default/chapter/29/13 
>>
>
> That section starts with the following:
>
> It is very dangerous to publicly expose the *admin* application and the *
> appadmin* controllers unless they run over HTTPS. 
>
>
> I have no idea from reading the docs if it should be safe, or not. 
>> For all I know if I happen to change the symbolic link at the wrong 
>> time, web2py will traverse the path 'in the middle of something 
>> important' and end up in a different application than it was before 
>> (projectX links to projectX2011 and I get "luck" and switch the link 
>> to projectX2012 at just the wrong moment).
>>
>
> Yes, good point -- that's an issue with how symbolic links work. During a 
> given request, web2py will read (and possibly write) several files from the 
> filesystem within the application's folder -- if the symbolic link changes 
> mid-request, I suppose it could read/write files from two different 
> applications. So it probably would be a good idea to temporarily disable 
> the application (which can be done via admin) when changing the symbolic 
> link. Actually, I think using routes.py might be a better way to go anyway.
>
> Anthony
>

Reply via email to