[newbie] Equivalent to PHP?

Chris Angelico rosuav at gmail.com
Tue Jun 12 20:19:29 EDT 2012


On Wed, Jun 13, 2012 at 9:59 AM, Gilles <nospam at nospam.com> wrote:
> On Tue, 12 Jun 2012 20:18:21 +1000, Chris Angelico <rosuav at gmail.com>
> wrote:
>>Think of it as Apache + PHP versus Python. Apache keeps running, it's
>>only your PHP script that starts and stops. With a long-running
>>process, you keep everything all in together, which IMHO is simpler
>>and better.
>
> Why is a long-running process better?

It's far simpler to manage, it retains running state, and is easily
enough encapsulated. It's the non-magic way of doing things. Also, it
plays very nicely with the MUD style of process, which is something I
do a lot with Pike. Plus, if you manage it right, you have a guarantee
that you can never be in a half-updated state - that's somewhat tricky
when you have inter-dependencies in PHP code and the file system
itself manages things. What happens if a request comes in while you're
half-way through uploading new code to the server? By default, you
could use half old code and half new code. Keeping everything in
memory makes it easier to prevent that.

ChrisA



More information about the Python-list mailing list