Home Help Center

[icePHP] 'persistence' question

g00fyg00fy Member SalvaniaOrganization: SalvaniaProject: Database systems ✭✭
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

  • mesmes CaliforniaAdministrators, ZeroC Staff Mark SpruiellOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff
    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
  • g00fyg00fy Member SalvaniaOrganization: SalvaniaProject: Database systems ✭✭
    Thanks for the pointers :) That helps a lot!;)
Sign In or Register to comment.