Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

AOLserver and TclHttpd

3 views
Skip to first unread message

Wojciech Kocjan

unread,
Oct 26, 2002, 3:54:25 AM10/26/02
to
Hello.

I've just started a project on AOLserver layer emulation for TclHttpd -
that is, it will emulate things not already present in nstcl, mostly for
handling HTTP related stuff (which is server specific).

I'm hoping to find some people interested in getting the similar thing
done and/or knowing nstcl better than me. I know the ns_* API, but not
nstcl itself and don't know a bit about ad_proc, which may be quite
useful to emulate switches in commands.

--
WK (written at Stardate 56819.3)

"Data typing is an illusion. Everything is a sequence of bytes."
-Todd Coram

Wojciech Kocjan

unread,
Oct 26, 2002, 3:55:34 AM10/26/02
to
First of all - I started it on SF - it will hopefully work on monday.

Second of all - I'm looking for people interested in participation. If
anybody's interested, email me.

Wojciech Kocjan wrote:
> Hello.
>
> I've just started a project on AOLserver layer emulation for TclHttpd -
> that is, it will emulate things not already present in nstcl, mostly for
> handling HTTP related stuff (which is server specific).
>
> I'm hoping to find some people interested in getting the similar thing
> done and/or knowing nstcl better than me. I know the ns_* API, but not
> nstcl itself and don't know a bit about ad_proc, which may be quite
> useful to emulate switches in commands.
>


--
WK (written at Stardate 56819.4)

JGDavidson

unread,
Oct 27, 2002, 6:28:57 PM10/27/02
to
<< I've just started a project on AOLserver layer emulation for TclHttpd -
that is, it will emulate things not already present in nstcl, mostly for
handling HTTP related stuff (which is server specific).
>>


Hello,

Instead of emulation, perhaps you can just use AOLserver as a library. The
libnsd.so built as part of AOLserver 4.0 now includes an Nsd_Init entry point.
This means you can do something like:

% tclsh8.4 (must be built with --enable-threads)
% load libnsd.so

and get a bunch (but not all) of the AOLserver commands (ns_cache, ns_set,
etc.).

-Jim

David N. Welton

unread,
Oct 28, 2002, 1:09:58 AM10/28/02
to
jgdav...@aol.com (JGDavidson) writes:

> << I've just started a project on AOLserver layer emulation for TclHttpd -
> that is, it will emulate things not already present in nstcl, mostly for
> handling HTTP related stuff (which is server specific).
> >>

> Instead of emulation, perhaps you can just use AOLserver as a


> library. The libnsd.so built as part of AOLserver 4.0 now includes
> an Nsd_Init entry point. This means you can do something like:
>
> % tclsh8.4 (must be built with --enable-threads)
> % load libnsd.so
>
> and get a bunch (but not all) of the AOLserver commands (ns_cache,
> ns_set, etc.).

Very interesting! I wonder if something like this would be
easy/possible to fold into Apache...

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

Wojciech Kocjan

unread,
Oct 28, 2002, 2:19:19 AM10/28/02
to
JGDavidson wrote:
> << I've just started a project on AOLserver layer emulation for TclHttpd -
> that is, it will emulate things not already present in nstcl, mostly for
> handling HTTP related stuff (which is server specific).
> >>
> Instead of emulation, perhaps you can just use AOLserver as a library. The
> libnsd.so built as part of AOLserver 4.0 now includes an Nsd_Init entry point.
> This means you can do something like:

First of all, I was hoping to build a pure Tcl solution. I managed to
emulate parts of AOLserver, enough to parse ADP, set/get cookies using
[ns_conn]. It was enough to and serve my company's website offline.

However, I decided to rewrite it from scratch, since the code was a real
mess.

Also, it will be easier to run pure Tcl than a C extension built against
threads, so it needs thread enabled TclKit (I want to run it using
starpacks).

ps. Does AOLserver 4 build on Windows+mingw? Since it will have to run
on windows as well.

--
WK (written at Stardate 56824.3)

Zoran Vasiljevic

unread,
Oct 28, 2002, 10:48:55 AM10/28/02
to
jgdav...@aol.com (JGDavidson) wrote:

> Instead of emulation, perhaps you can just use AOLserver as a library. The
> libnsd.so built as part of AOLserver 4.0 now includes an Nsd_Init entry point.
> This means you can do something like:
>
> % tclsh8.4 (must be built with --enable-threads)
> % load libnsd.so

Jim, this is realy very good news, indeed.
I'd like to ask, how much of the libnsd.so code is realy
Unix-specific? Is there a room for making it somewhat
Windows-aware so one can load the library in win tclsh?

Thanks,
Zoran Vasiljevic

John Sequeira

unread,
Oct 29, 2002, 8:02:27 AM10/29/02
to
In trying to get OpenACS to run outside of AOLServer (see
http://www.pobox.com/~johnseq/projects/portable.nsd/), I've written
some AOLServer ns* commands not found in nstcl. For example, I had
to use tdom to implement nsxml (so I guess it's not yet *pure* tcl)
because it seemed a lot easier than tcldom and an easier bootstrap
path. I've implemented ns_cache as a simple lookup table in postgres.

I haven't gotten to too much of the AOLServer web-specific commands,
but I have stubbed in commands for where it's accessed in OpenACS.
Most of what I've done is reconnect OpenACS's TCL source code to
nstcl, in the cases where it was trying to overload or enhance basic
AOLServer functionality.

My first web serving target is tclhttpd, but I hope to enable
CGI,FastCGI,mod_dtcl and potentially ASP/TCLScript at some point. I
expect the bindings to be pretty lightweight, so targeting these
deployment options shouldn't be too bad (Python-based WebWare does
this).


People also directed me to consider AOLServer's newly debundled
libraries, but I'm skeptical of future Windows support given the
team's past track record and current focus. (Please let me know that
this isn't the case Jim.) Jamie Rasmussan (
http://empoweringminds.mle.ie/documents/serve-version?id=1 ) is
committed to getting AOLServer 4.x up and running on Windows, so I
imagine you'll be able to use this library on Windows regardless of
official support, but I decided that the benefits of going pure TCL
or at the least with cross-platform libraries. This, combined with the
fact that I didn't want to wait for an AOLServer release, meant that
it made sense for me to fork out on my own.

Wojciech Kocjan <wojc...@n0spam-kocjan.org> wrote in message news:<apdho5$13e$2...@news2.tpi.pl>...

David N. Welton

unread,
Oct 30, 2002, 12:20:17 AM10/30/02
to
john...@hotmail.com (John Sequeira) writes:

> My first web serving target is tclhttpd, but I hope to enable
> CGI,FastCGI,mod_dtcl and potentially ASP/TCLScript at some point. I
> expect the bindings to be pretty lightweight, so targeting these
> deployment options shouldn't be too bad (Python-based WebWare does
> this).

A project like this might be able to find a home at tcl.apache.org, if
there aren't problems with licensing.

Jamie Rasmussen

unread,
Oct 30, 2002, 1:18:56 PM10/30/02
to
I'm able to load AOLserver 4's nsd library in tclsh84 on Windows,
though I haven't tested it much. I am using the win32 port of
AOLserver 4 that I've been working on. I am still planning on
releasing the port shortly after 4 final is released, and I encourage
anyone who is interested in it to email me.
http://empoweringminds.mle.ie/openacs/ will have up-to-date
information.

john...@hotmail.com (John Sequeira) wrote in message news:<94aaee82.0210...@posting.google.com>...

Michael A. Cleverly

unread,
Oct 31, 2002, 12:39:38 AM10/31/02
to
On Mon, 28 Oct 2002, Wojciech Kocjan wrote:

> JGDavidson wrote:
> > Instead of emulation, perhaps you can just use AOLserver as a library. The
> > libnsd.so built as part of AOLserver 4.0 now includes an Nsd_Init entry point.
> > This means you can do something like:
>
> First of all, I was hoping to build a pure Tcl solution. I managed to
> emulate parts of AOLserver, enough to parse ADP, set/get cookies using
> [ns_conn]. It was enough to and serve my company's website offline.
>

> [...]


>
> Also, it will be easier to run pure Tcl than a C extension built against
> threads, so it needs thread enabled TclKit (I want to run it using
> starpacks).

Of course, the emulation layer could check and see if libnsd was
available, and use it when possible, falling back to the pure Tcl
implementation (like the md5 package in tcllib).

Michael

Michael A. Cleverly

unread,
Oct 31, 2002, 12:58:00 AM10/31/02
to JGDavidson
On 27 Oct 2002, JGDavidson wrote:

> Instead of emulation, perhaps you can just use AOLserver as a library.
> The libnsd.so built as part of AOLserver 4.0 now includes an Nsd_Init
> entry point. This means you can do something like:
>
> % tclsh8.4 (must be built with --enable-threads)
> % load libnsd.so
>
> and get a bunch (but not all) of the AOLserver commands (ns_cache, ns_set,
> etc.).

Jim,

I compiled AOLserver 4 from cvs, and compiled Tcl 8.4.1 with threads
enabled. Loaded libnsd.so and, viola, llength [info commands ns_*] == 90.
Very nice. :-) I ran a couple interactively.

Then, on a whim, I fired up tclsh 8.3.4 (w/o threads) and loaded libnsd.so
and expected it to raise an error. It didn't, and the handful of commands
I ran worked. Now, I didn't try anything thread related (just the likes
of ns_sleep, ns_rand, ns_jpegsize, ns_mktemp, ns_tmpnam, etc.). Is it
only a matter of time before things core dump, or if I stay away from
thread-specific functions (ns_mutex, etc.) will the rest work?

Michael

0 new messages