Understanding Python from a PHP coder's perspective

Ian Kelly ian.g.kelly at gmail.com
Mon Dec 7 18:10:31 EST 2015


On Mon, Dec 7, 2015 at 3:27 PM,  <villascape at gmail.com> wrote:
> Thank you all!
>
> Okay, the concept of a WSGI along with a framework provides insight on my main questions.
>
> In regards to Chris's statement: "It openly and honestly does NOT reset its state between page requests"
>
> With PHP, I have sessions to preserve state.  I have a feeling that this is significantly different.  Yes?  How?  Does this somehow relate to how websockets are implemented?

Session state is different from process state. Whether you start a new
process for each request or reuse an existing process has no bearing
on whether you're storing and reading data related to the user's
session (except that in the reuse case it's possible to cache the data
in-process, whereas an in-memory cache for a restarted process must be
in a separate process; but it's good practice to have your in-memory
cache in a separate process anyway).

I'm not sure where websockets come into this, as that's a completely
separate technology that is not used by most web apps.



More information about the Python-list mailing list