java apps and php apps sharing sessions

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Terence

    java apps and php apps sharing sessions

    Does anyone have any experiences to share regarding this?

    we run a ColdFusion/PHP/Java(cocoon) environment and I'll probably
    figure out a way for all apps to be able to share sessions. I wanted to
    see if there are already some solutions out there before I tackle this.

    obviously performance is a major factor (which rules out using a
    database). At the moment, I'm thinking along the lines of using the
    servlet container's session management... meaning I write a wrapper
    servlet which can be called by PHP and ColdFusion.
  • Henk Verhoeven

    #2
    Re: java apps and php apps sharing sessions

    Hi Terence,

    JIC you must tackle this yourself: I guess the easy part will be to make
    php and java to use the same session ids. The hard part will be to share
    the data in the session. It seems to me that

    may be usefull for this. You may save the data in XML if you need
    flexibility, or csv if the data's structure is simple. But shared memory
    will definetly be faster - see
    http://www.php.net/manual/en/ref.session.php, note under "Requiremen ts".

    Greetings,
    Henk Verhoeven.

    Terence wrote:
    [color=blue]
    > Does anyone have any experiences to share regarding this?
    >
    > we run a ColdFusion/PHP/Java(cocoon) environment and I'll probably
    > figure out a way for all apps to be able to share sessions. I wanted to
    > see if there are already some solutions out there before I tackle this.
    >
    > obviously performance is a major factor (which rules out using a
    > database). At the moment, I'm thinking along the lines of using the
    > servlet container's session management... meaning I write a wrapper
    > servlet which can be called by PHP and ColdFusion.[/color]

    Comment

    • Terence

      #3
      Re: java apps and php apps sharing sessions

      Thanks for the info.

      session-set-save-handler() is a good place to start.

      Henk Verhoeven wrote:
      [color=blue]
      > Hi Terence,
      >
      > JIC you must tackle this yourself: I guess the easy part will be to make
      > php and java to use the same session ids. The hard part will be to share
      > the data in the session. It seems to me that
      > http://www.php.net/manual/en/functio...ve-handler.php
      > may be usefull for this. You may save the data in XML if you need
      > flexibility, or csv if the data's structure is simple. But shared memory
      > will definetly be faster - see
      > http://www.php.net/manual/en/ref.session.php, note under "Requiremen ts".
      >
      > Greetings,
      > Henk Verhoeven.
      >
      > Terence wrote:
      >[color=green]
      >> Does anyone have any experiences to share regarding this?
      >>
      >> we run a ColdFusion/PHP/Java(cocoon) environment and I'll probably
      >> figure out a way for all apps to be able to share sessions. I wanted
      >> to see if there are already some solutions out there before I tackle
      >> this.
      >>
      >> obviously performance is a major factor (which rules out using a
      >> database). At the moment, I'm thinking along the lines of using the
      >> servlet container's session management... meaning I write a wrapper
      >> servlet which can be called by PHP and ColdFusion.[/color]
      >
      >[/color]

      Comment

      Working...