Tomasz Kosiak wrote:
Few days ago there was a post from Jerry Asher titled "[AOLSERVER]
virtual hosting options and a fantasy ...." mentioning my proposals. I
would like to present them fully to the public.

This indeed is a big problem, even bigger since from what I see every company using AOLserver for multiple websites is using custom solutions. I'll investigate your patches later and see what I think of those. For now, here's my story :-)

I also came upon such problems, however I've decided not to patch the
core in any way (at least not for these problems :).

I've came up with a couple of solutions, that really make my life easier:

1/ virtualhosting (some of you may know my module called nssmartvh):

I've worked out some C code that calls Tcl for host->docroot conversion
(so that writing custom schemes is not hard at all).
This allows me to do simple mappings like:

www.mobile-netsport.pl -> /var/www/stable/mobile-netsport
www.dq-e.com -> /var/www/stable/dq-e

I've also done an external config file which holds all the rules of
host->docroot conversion.

This allows me to work on *.dqe/*.adp files and static files.

2/ custom urlspace and mod_rewrite like module

This one is coded in C, and works in two parts:
2.1/ url_rewrite:

This part allows me to rewrite paths to files (in url2file) based on uri
and host.

For example I can do this:
test.mobile-netsport.pl/  -> /var/www/stable/mobile-netsport/test.adp
test.mobile-netsport.pl/* -> /var/www/stable/mobile-netsport/*

2.2/ url_filter redirect

This one is the trickiest part. It allows me to redirect requests based
on host and uri:

For example for dq-e.com /test can be rewritten to /test/index.adp

It can also be used a substitute to 'index.php/1'-like urls.

2.3/ tcl_obj aware cache'ing

Since my company uses db caching extensively, I've decided to write
nscache-clone, which would allow storing lists in some tcl-neutral way
(similar to tsv in thread extension) so that it can be shared between
threads and not stored as a string.

It uses two-level cache - one global which stores data in a custom way
and thread-local caches which store data s Tcl_Objs with refcount=1
(Tcl_DecrRefCount() is done when an entry is flushed so it does not leak
memory).

2.4/ session support

C+Tcl code for storing sessions with built-in authentication and user
related code.

All of this is available at www.dq-e.com/nsdqe/nsdqe1.0.tar.gz



2.1 and 2.2 all consider the same problem as Tomasz mentioned -
AOLserver does not handle real vhosting well.

I agree that his improvements should be done - though I think they
should be done as other commands and work on domain groups - something
similar to tags in Tk's canvas/text.

I also think that some standard modules should be bundled with AOLserver
- session management, rewrites (those can be quite easily be written in
Tcl, but it all takes time :).

I also think that AOLserver should include some code to manage multiple
code bases - something between package require and modules/tcl/; a code
that can be "dropped" when idle to save memory.

--
WK
(written at Stardate 57189.5)

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



I. To remove yourself from this list:

Send a message to "[EMAIL PROTECTED]"  with the following text in
the BODY of your message:

signoff aolserver

II. For a complete list of listserv options please visit:

http://listserv.aol.com/

III. For more AOLserver information please visit:

http://www.aolserver.com/

Reply via email to