On Aug 8, 2:35 pm, walterbyrd <[EMAIL PROTECTED]> wrote:
> On Aug 8, 12:16 pm, Echo <[EMAIL PROTECTED]> wrote:
>
> > On 8/8/07, walterbyrd <[EMAIL PROTECTED]> wrote:
>
> > If you use the paste server, it can automatically reload on any change.
>
> Let's suppose I have a Pylons based site up and running, on shared
> hosting, using Apache. If I want to make a change to the code, what do
> I do?
>
If you have paster set to --reload, then it should just pick up your
changes.  If you're proxying requests back-and-forth then apache has
no reason to know that your back-end server has changed.  It's nice
and clean if you stop and think about it...

Request comes in
request --> apache -->  paster

Response goes out
response-from-your-pyons-app --> apache --> client

I think --reload is nice for development.  Heck, you could probably
get away with it on a light loaded server...

If you use mod_wsgi, like me, I'm not sure if you can get your changes
noticed without reloading apache.  Well, it is WSGI, maybe you could
plug something into the WSGI stack, to look for changed modules and
reload them on the fly...  But, this may really bork the innards if
you do it like this, I'm not sure.

> Will Paste work on shared hosting? If I make changes using Paste, with
> the Apache server pick up on those changes, or will the Apache server
> have to be restarted? Or will I have to touch all my files, or some of
> my files?
>

If you make changes to your files, and are using apache to proxy with
paster then it should automagically happen.

> It seems to me that the PHP frameworks only require me to edit the
> file and save the changes. Which seems much easier to me.

You have to realize that when your pylons app is up and running, it is
an actual running program.  There is a python interpreter working
magic, mapping requests to controllers.  When the interpreter cranks
up, it caches modules for performance reasons -- In a typical python
program there is no need to reload a module.  But webapps aren't
really typical apps.

I don't know enough about PHP to comment on it.  But I used to monkey
with it a long time ago and I did stay at a Holiday Inn, so I'll
recall my experiences.  From what I recall, apache pretty much mapped
requests to the .php files.  Once it noticed it was a .php file, it
sent it off to the php handler, which would *run* the php script, and
send the response back to the requesting client.

The difference in handling requests is obvious.  PHP files are sent to
the `php handler` each time they are requested, automagically by
apache.  This makes `seeing changes` very easy, because PHP knows
exactly which script is being executed.

For pylons, the request is simply forwarded from apache back to the
pylons back end.  Pylons has to decide what to do with it and send the
response back.  Usually `what to do` means routes finds the
appropriate controller based on the requested path.

Hope that helps some!
jw


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

Reply via email to