Archived

This forum has been archived. Please start a new discussion on GitHub.

[icePHP] 'persistence' question

Hi,


Basically what I have is the 'session' example provided with the latest Ice framework.
When someone connects to the backend, he will be getting a session, then do some stuff in the session and lastly destroy the session.

Now destroying and creating the sessions might become a little too resource expensive... So what I want to achieve is to "keep" this created session across php-sessions.

Is this actually possible? If so, how (storing the object in the $_SESSION?, other way?).


Thanks

Comments

  • mes
    mes California
    Hi,

    It really depends on the state you want to keep between sessions. You could easily stringify a proxy and store that in your session state, then convert it back to a proxy in the next request. It's not expensive to do something like that, as long as the connection from IcePHP to the back-end server is still alive. If you're concerned about performance, you definitely don't want to be creating a new Ice connection for each PHP request. You can tune Ice's active connection management (ACM) to avoid this situation.

    Hope that helps,
    - Mark
  • Thanks for the pointers :) That helps a lot!;)