On Sun, Feb 15, 2009 at 6:55 PM, Ian Harding <harding....@gmail.com> wrote:
> Hello,
>
> I am migrating to Naviserver from AOLServer mostly because of the
> excellent nsdbi module.
>
> My existing code is depended on the nssession module
> http://bas.scheffers.net/aolserver/ .   It doesn't compile and run
> unmodified under Naviserver, but before I start hacking on it, is
> there an existing session module or a tcl solution that someone else
> has already written?
>


I'm not sure that it's worth porting that module. The cache locking is
broken, the file handling looks dodgy, and in general it has some odd
ideas about configuration and string handling.

If all you need to do is replicate some ns_session Tcl commands so
your existing code works then the easiest way would be to create a
work-alike using the existing naviserver Tcl commands:

  * cookie handling: naviserver has this built in:
        http://naviserver.sourceforge.net/n/naviserver/files/ns_cookie.html

  * caching: also now built in:
        http://naviserver.sourceforge.net/n/naviserver/files/ns_cache.html

  * persisting the session: just use nsdbi, if you're already using
it. If you really want
    to use the file system, use ns_hashpath in nsd/pathname.c to
prevent enormous
    directories from bogging down the server.

  * ns_rand: already exposed.


It will be more robust than than the C nssession module, and almost
certainly faster too.


If you want to create something fancier as a C module, I'd be
interested in helping.

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel

Reply via email to