Connecting Tech Pros Worldwide Forums | Help | Site Map

java apps and php apps sharing sessions

Terence
Guest
 
Posts: n/a
#1: Jul 17 '05
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
Guest
 
Posts: n/a
#2: Jul 17 '05

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
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 "Requirements".

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]

Terence
Guest
 
Posts: n/a
#3: Jul 17 '05

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 "Requirements".
>
> 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]
Closed Thread