Passing session information?

What is the best way to pass session properties from one web application to another one that is opening? The session properties. I know url parameter and it would be way to much to pass in that. Any other ways to do this? Im currently using a database to pass information and I seemed to have overcomplicated when I think it could be easier.

You could use a HTTPSecureSocket.

How would that work? As soon as I redirect to the new app my session properties is dead in the old app.[quote=484485:@Barney Hyde]

How would that work? As soon as I redirect to the new app my session properties is dead in the closed app. Is it something you are using? [/quote]

There’s no built-in way to do this at this time.

Could you describe why you need this feature though? Maybe there’s another solution you haven’t thought of.

You can pass all your properties to your new session using the HTTPSocket in the same way URL parameters would work. Also your old session actually hangs around for a bit if the App your leaving doesn’t quit and you still need to get to it. Why can’t you pass them in a URL, how many are you dealing with ?

[quote=484513:@Greg O’Lone]There’s no built-in way to do this at this time.

Could you describe why you need this feature though? Maybe there’s another solution you haven’t thought of.[/quote]

Well currently we have fund accounting software in schools in our state. The program is massive. Its a memory hog. Real basic is having a problem handing it and crashes often. So now I’min the process of rewriting it into something more modern. The program will run only on the website. It will be the original program split up and linked by a database, essentially creating our own session system.

The problem I’m currently having is deleting this database when a user abandons their session improperly. I handled timeout and a normal logout. I cant figure out how to handle killing the session by closing the tab or closing the browser. Tried everything to overcome but think I am over complicating things with this database. If I could just pass the information along between programs it would be so much easier. If there is a way to do that already, thats all im searching for. I only have a few months experience with web applications and hardly any experience with http sockets and the web side of stuff because the old software doesnt do much online. Any help appreciated.

Currently about 30 properties but Im not even into the major part of our app rewrite yet. So I know there are going to be more.

I’ve looked through the LR. There’s so much stuff on HTTPSecureSocket, even one saying to use URL Connection instead because HTTPSecureSocket is deprecated. . Is there anywhere I can see an example project or some example code on what all needs to be set up?

I haven’t tried that myself, but here is an idea. Record the session identifier together with your user’s session data in the database. At application level, run a timer and periodically check whether there is an active session with each of the identifiers that are currently recorded. When that session does not exist, delete the data. I would run the cleanup method every hour or so, depending on the number of users and the volume of data to cleanse. Now, if you use load leveling across multiple instances of the application, you may have to record some kind of application identifier as well in order to not delete sessions handled by the other instances.

It is fairly straighforward ligic and should not be too difficult to implement (other than updating every database call in the application…)

[quote=484919:@Louis Desjardins]I haven’t tried that myself, but here is an idea. Record the session identifier together with your user’s session data in the database. At application level, run a timer and periodically check whether there is an active session with each of the identifiers that are currently recorded. When that session does not exist, delete the data. I would run the cleanup method every hour or so, depending on the number of users and the volume of data to cleanse. Now, if you use load leveling across multiple instances of the application, you may have to record some kind of application identifier as well in order to not delete sessions handled by the other instances.

It is fairly straighforward ligic and should not be too difficult to implement (other than updating every database call in the application…)[/quote]

I might give this a shot if I cant get it to work properly. Would like to do it how it should be done. When the session is closing, delete the session database for the user. Shouldnt be that hard because I know the session closes. I know you can do stuff when the session closes. I know what I want to do when the session closes. No matter where I put the call to what I want done, it doesnt execute.

A simpler way to do is is to implement some kind of Finite-state machine. As you finish the processing of each request, server side, you save the state of the machine. And before processing a request, you load the sate machine. Share this state between your applications and then you avoid the whole issue of having to pass stuff around between you web apps.