You are viewing a plain text version of this content. The canonical link for it is here.
Posted to rivet-dev@tcl.apache.org by Thomas Lloyd <th...@yahoo.com> on 2010/03/13 19:24:10 UTC

Session Database

Hi Massimo,

Again your right about mysqltcl. I am working on two systems one at work
and one at home testing my set-up in both locations. I thought I had
installed mysqltcl at both locations. I had not at home where I was
getting this error message. Not knowing how DIO works also threw me. So
I now have Rivet, DIO, Session and mysqltcl all working together. 

My next question  comes about the database that DIO/Sessions uses.

Do I have to create a database in mysql to hold the session data?

Do I have to define the structure of the tables and database?

If I have to define the structure then is there a template or a minimum
structure to work from? 

Or does Session create the data fields as required in the named database
on the fly?

Does session clean up the old data from the database? 

Thanks again,

Tom  








---------------------------------------------------------------------
To unsubscribe, e-mail: rivet-dev-unsubscribe@tcl.apache.org
For additional commands, e-mail: rivet-dev-help@tcl.apache.org


Re: Session Database

Posted by Massimo Manghi <ma...@unipr.it>.
Hi Tom

Thomas Lloyd wrote:
> Hi Massimo,
>
> Again your right about mysqltcl. I am working on two systems one at work
> and one at home testing my set-up in both locations. I thought I had
> installed mysqltcl at both locations. I had not at home where I was
> getting this error message. Not knowing how DIO works also threw me. So
> I now have Rivet, DIO, Session and mysqltcl all working together. 
>
> My next question  comes about the database that DIO/Sessions uses.
>
> Do I have to create a database in mysql to hold the session data?
>
>   

yes, the Session package won't create the database structure, but if you 
look at

trunk/rivet/packages/session/

you'll find sql scripts for each backend supported by DIO. If you have 
mysql I recommend you have mysql-server 5.1 installed.
> Do I have to define the structure of the tables and database?
>
>   
You certainly have to create a database with authorization privileges 
that grant to your scripts adequate rights for the session tables (at 
least privilege to insert, delete and update rows)

> If I have to define the structure then is there a template or a minimum
> structure to work from? 
>
>   
I think this question basically got answered already. 'Session' has 
already methods for storing your application data represented as 
strings. Needless to say the whole point about sessions is that you want 
a method for associating client and application state. The session class 
instance has the methods for doing it, understanding what data and in 
which form is up to your design.

> Or does Session create the data fields as required in the named database
> on the fly?
>
>   
again I think I answered

> Does session clean up the old data from the database? 
>
>   
yes, every page of your application should call the method 'activate' in 
order to refresh the session status. Within this method a clean up of 
expired sessions data is carried out randomly.

> Thanks again,
>
> Tom  
>   

hope I understood your problems.

 -- Massimo

---------------------------------------------------------------------
To unsubscribe, e-mail: rivet-dev-unsubscribe@tcl.apache.org
For additional commands, e-mail: rivet-dev-help@tcl.apache.org