Understanding Python from a PHP coder's perspective

Cameron Simpson cs at zip.com.au
Mon Dec 7 18:07:19 EST 2015


On 07Dec2015 14:27, villascape at gmail.com <villascape at gmail.com> wrote:
>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?

Plenty of things use sessions, and I suspect most frameworks provide handy 
mechanisms to make using them easier. I expect that normally, as with PHP, 
you'd pass a cookie back to the user to track them and store the session state 
either in an in memory data structure (loses state over an app or web server 
restart) or in some persistent storage, typically a database of some kind 
(which also allows another process implementing your app/site to handle the 
state even if it did not issue the original session).

Cannot address your websockets query.

Cheers,
Cameron Simpson <cs at zip.com.au>



More information about the Python-list mailing list