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 "GoMp @ tcl.no" <Go...@tcl.no> on 2004/09/29 17:55:22 UTC

Sessions

Any examples on using sessions? Like earlier stated, I need it for a login
form, and it using flatfile databases. No *SQL databases, which are
mentioned in the manpages for sessions. If someone has some concrete
examples, I would be very thankful.

Sincerely
    GoMp
    www.tcl.no
    www.g0mp.org


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


Re: Sessions

Posted by "David N. Welton" <da...@dedasys.com>.
Karl Lehenbauer <ka...@sc.com> writes:

> David or someone also requested sessions that work with flat files,
> but they're not on my radar at this time.  We (the Rivet dweebs),
> have had some conversation about supporting a super-simple SQL
> database like Metakit,

SQLite - Metakit isn't SQL.

It would require a DIO backend, I guess.  I took a stab at it but
didn't have much luck.

I'm beginning to wonder if maybe it isn't time to have a look at using
nstcl.  It supports:

ns_db (Oracle)		Oratcl 3.x/4.x	http://oratcl.sf.net
ns_db (Postgres)	libpgtcl.so	http://ftp.postgresql.org
ns_db (Solid)		Soltcl 0.2.1	http://bolts.guam.net/soltcl
ns_db (Sybase)		Sybtcl 3.x	http://sybtcl.sf.net
ns_db (SQLite)		tclsqlite.so	http://www.hwaci.com/sw/sqlite
ns_db (MySQL)		mysqltcl	http://www.xdobry.de/mysqltcl
ns_db (ODBC)

and seems to have a greater demand-side economy of scale... more
users, more backends = positive feedback.

-- 
David N. Welton
Personal:                   http://www.dedasys.com/davidw/
Apache Tcl:                 http://tcl.apache.org/
Free Software:              http://www.dedasys.com/freesoftware/
Linux Incompatibility List: http://www.leenooks.com/

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


Re: Sessions

Posted by Tom Krehbiel <to...@freescale.com>.
Karl,

...snip...
> David or someone also requested sessions that work with flat files, but
> they're not on my radar at this time.  We (the Rivet dweebs), have had 
> some conversation about supporting a super-simple SQL database like 
> Metakit,
...snip...

I'm the person that asked for flat file support for sessions. However I 
would consider a Metakit interface an even better interface particularly if 
it enabled the distribution of a single shared object as the Rivet module.

Tom K.

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


Re: Sessions

Posted by Karl Lehenbauer <ka...@sc.com>.
On Sep 29, 2004, at 10:55 AM, GoMp @ tcl.no wrote:

> Any examples on using sessions? Like earlier stated, I need it for a 
> login
> form, and it using flatfile databases. No *SQL databases, which are
> mentioned in the manpages for sessions. If someone has some concrete
> examples, I would be very thankful.
>
I apologize for the delay in responding.

The session package does require a SQL database.  It has two tables, 
rivet_session, and rivet_session_cache.

Rivet_session is indexed by session_id and IP address.  
rivet_session_cache is indexed by session_id, package
and key.

The fanciest bit of SQL is...

delete from $sessionTable where timestamp 'now' - session_update_time > 
interval '$gcMaxLifetime seconds';

Anyway the existing session package does require SQL as of right now, 
and has only actually been tested with PostgreSQL, as far as I know.

David or someone also requested sessions that work with flat files, but 
they're not on my radar at this time.  We (the Rivet dweebs), have had 
some conversation about supporting a super-simple SQL database like 
Metakit,

Adding usage examples to the documentation is a really good idea.

If you're willing to keep going with PostgreSQL, I'll help you along in 
getting sessions up.