Re: [AOLSERVER] Mass Virtual Hosting system for AolServer 4.0.x?

2005-05-11 Thread Wojciech Kocjan
Xavier Beaudouin napisa(a):
This is exactly what I was looking for... I just need to adapt it for
LDAP and SQL... and add a callback to auto garbage collector old
database
stuff to get a TTL for cached hosts :)
Well why don't you just change the cache type to timing out, just switch
from Ns_CacheCreateSz() to Ns_CacheCreate() and it should work.
--
WK
--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] 
with the
body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: 
field of your email blank.


Re: [AOLSERVER] Mass Virtual Hosting system for AolServer 4.0.x?

2005-05-11 Thread Xavier Beaudouin
This is exactly what I was looking for... I just need to adapt it for
LDAP and SQL... and add a callback to auto garbage collector old
database
stuff to get a TTL for cached hosts :)
Well why don't you just change the cache type to timing out, just
switch
from Ns_CacheCreateSz() to Ns_CacheCreate() and it should work.
Thanks for the advice... :) Now I just need to code the ldap part :)
/Xavier
--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] 
with the
body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: 
field of your email blank.


Re: [AOLSERVER] Mass Virtual Hosting system for AolServer 4.0.x?

2005-05-11 Thread Wojciech Kocjan
Xavier Beaudouin napisa(a):
Well why don't you just change the cache type to timing out, just
switch
from Ns_CacheCreateSz() to Ns_CacheCreate() and it should work.
Thanks for the advice... :) Now I just need to code the ldap part :)
How did googling 'tcl ldap' end up? I remember there is an LDAP
interface, but not sure about one for AOLserver.
--
WK
--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] 
with the
body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: 
field of your email blank.


Re: [AOLSERVER] Mass Virtual Hosting system for AolServer 4.0.x?

2005-05-09 Thread Wojciech Kocjan
Xavier Beaudouin napisa(a):
Please tell me how http request is handled by aolserver, in which files
I have to dig
and how can I add it nicely to, I hope, integrate this functionality on
next aolserver
version if it is possible... ?
Well, you can have a look at nsdqe (not really sure where you'd find it
(www.zoro2.org/nsdqe-1.0.tar.gz is where I put it temporarily). This is
my module which does a pretty funky thing - it uses Tcl for fetching
virtualhost's root directory and then caches it. Once you update the
database all you do is 'dqe_vh flush' so that the cache is flushed.
I consider that quite effective and you can write any Tcl proc to do
massive vhosting.
--
WK
--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] 
with the
body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: 
field of your email blank.


Re: [AOLSERVER] Mass Virtual Hosting system for AolServer 4.0.x?

2005-05-09 Thread Xavier Beaudouin
Hi :)
Please tell me how http request is handled by aolserver, in which
files
I have to dig
and how can I add it nicely to, I hope, integrate this
functionality on
next aolserver
version if it is possible... ?
Well, you can have a look at nsdqe (not really sure where you'd
find it
(www.zoro2.org/nsdqe-1.0.tar.gz is where I put it temporarily).
This is
my module which does a pretty funky thing - it uses Tcl for fetching
virtualhost's root directory and then caches it. Once you update the
database all you do is 'dqe_vh flush' so that the cache is flushed.
I consider that quite effective and you can write any Tcl proc to do
massive vhosting.
This is exactly what I was looking for... I just need to adapt it for
LDAP and SQL... and add a callback to auto garbage collector old
database
stuff to get a TTL for cached hosts :)
/Xavier
--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] 
with the
body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: 
field of your email blank.


Re: [AOLSERVER] Mass Virtual Hosting system for AolServer 4.0.x?

2005-05-04 Thread Tom Jackson
On Tuesday 03 May 2005 08:21, Xavier Beaudouin wrote:

  tclvhr: http://zmbh.com/tcllvhr/

 This one seems to be now as 404... Anyone here have clues where I can
 find it ?

Sorry, typo: http://zmbh.com/tclvhr/, use for historical purposes only!

If I had to write it again, I would use ns_rewriteurl, ensuring that every
request gets rewritten to subdirectory of /, because note: ns_rewriteurl
cannot escape the pageroot directory, and you don't want pages from one host
showing up under another.


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] 
with the
body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: 
field of your email blank.


Re: [AOLSERVER] Mass Virtual Hosting system for AolServer 4.0.x?

2005-05-03 Thread Xavier Beaudouin
You will find this exceedingly easy in AOLserver. I have written
several
myself. You could check out VAT: http://zmbh.com/vat/,
Good
which expanded on
tclvhr: http://zmbh.com/tcllvhr/
This one seems to be now as 404... Anyone here have clues where I can
find it ?
or a very simple, file based system
described in: http://zmbh.com/nsrewrite/doc/nsrewriteurl.html.
Thanks :)
The first two use the config file, so you would have to restart the
server.
The last only requires the creation of the host directory, and the
ability to
set DNS entries correctly for the new domain. In every case, you
could easily
add database storage to allow 'no restart' configuration.
This is what I'd like to do, this is very interressing lecture and code.
Now I have to understand it, and adapt it for mod_vhs compatible
system :)
As a matter of fact, if you ever heard of MyDomain.com, this was a
perfect
example of mass(ive) virtual hosting using AOLserver. The virtual
hosting
software consisted of a single, very short page, which looked up the
configuration information. At one time they approached 500k domains
in the
system, which pushed AOLserver onto the Netcraft map. There were no
local
directories in the system, but it allowed users to redirect to
their own
website, or to wrap their page in a frame (done automatically) to
pull up
data stored anywhere on the internet. You could provide a home
page, which
was stored in the database.
;-) Good :)
Bottom line: AOLserver is great for mass virtual hosting of the
sort I have
described: static, database dynamic or offsite redirects. It is
less helpful
for file based dynamic sites since you will likely have to rely on
plain old
CGI. The built in Tcl scripting and adp (AOLserver Dynamic Pages)
share
memory between requests and over the life of the server and system
user/group. So you would need to carefully control what your users are
allowed to run, otherwise they could mess with each other and with
the server
operation. Using separate AOLserver virtual hosts will not work on
a massive
scale since each virtual host requires a lot of memory, and
requires time to
start up. It also requires a restart to add virtual hosts.
Yeah that's why I want to use it... and also to find a solution to
drop the
apache system needed for PHP... But this will be another story :)
/Xavier
--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] 
with the
body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: 
field of your email blank.


Re: [AOLSERVER] Mass Virtual Hosting system for AolServer 4.0.x?

2005-04-28 Thread Andrew Piskorski
On Thu, Apr 28, 2005 at 02:01:33PM +0200, Xavier Beaudouin wrote:

 I am Xavier Beaudouin, Caudium Webserver Maintainer. I'd like to
 port on AolServer a nice thing (or beast?) we did on Caudium : VHS.

 Now since I am new on Aolserver, I am trying to understand how I can
 add such nice functionality to get a system that works like caudium
 vhs or even mod_vhs for apache that I have made too :-)

I'm sure some folks will jump in with advice on where to look.  But
before they do that, I'm curious, why are you interested in doing this
work, and what led you to AOLserver?

--
Andrew Piskorski [EMAIL PROTECTED]
http://www.piskorski.com/


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] 
with the
body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: 
field of your email blank.


Re: [AOLSERVER] Mass Virtual Hosting system for AolServer 4.0.x?

2005-04-28 Thread Xavier Beaudouin
Hello,
I am Xavier Beaudouin, Caudium Webserver Maintainer. I'd like to
port on AolServer a nice thing (or beast?) we did on Caudium : VHS.

Now since I am new on Aolserver, I am trying to understand how I can
add such nice functionality to get a system that works like caudium
vhs or even mod_vhs for apache that I have made too :-)
I'm sure some folks will jump in with advice on where to look.  But
before they do that, I'm curious, why are you interested in doing this
work, and what led you to AOLserver?
Thanks :)
Simple, the Caudium seems to die, not because it is less and less used,
but because the language on which it is based (pike) is more and more
unstable, difficult to deal with and in general not very well
maintained.
Imagine a language that between 2 version is not compatible with
itself...
(Like a perl script that can work only on perl 4 because most of low
level
 call has changed names, place, or even way to call them).
AOLServer has same basis about technology : eg high level language, some
low level C modules, and threads as Caudium, so that's why I'd love to
understand how it is working, and make things I like on this server.
On other hands, I was very disspointed about Apache, that didn't changed
a lot its api and still stay on 1990's even if Apache 2.0 has
threads... but
you still cannot play with connection object as I do on Caudium to
make
some unique features.
Here is my 0,02c... :)
/Xavier
--
Xavier Beaudouin - Unix System Administrator  Projects Leader.
President of Kazar Organization : http://www.kazar.net/
Please visit http://caudium.net/, home of Caudium  Camas projects
--
AOLserver - http://www.aolserver.com/
To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] 
with the
body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: 
field of your email blank.


Re: [AOLSERVER] Mass Virtual Hosting system for AolServer 4.0.x?

2005-04-28 Thread Tom Jackson
On Thursday 28 April 2005 05:01, Xavier Beaudouin wrote:

 What is VHS ?
 It is a mass virtual hosting system that looks on a DB (mysql, psgsl,
 ...) or in
 an LDAP directory where is located the home directory of a host header
 named based
 webserver.

 It is 100% dynamic and allow handle a cluster and several webserver to
 be automagicaly
 configured without the need to update a conf file or even make special
 hashing system...

You will find this exceedingly easy in AOLserver. I have written several
myself. You could check out VAT: http://zmbh.com/vat/, which expanded on
tclvhr: http://zmbh.com/tcllvhr/ or a very simple, file based system
described in: http://zmbh.com/nsrewrite/doc/nsrewriteurl.html.

The first two use the config file, so you would have to restart the server.
The last only requires the creation of the host directory, and the ability to
set DNS entries correctly for the new domain. In every case, you could easily
add database storage to allow 'no restart' configuration.

As a matter of fact, if you ever heard of MyDomain.com, this was a perfect
example of mass(ive) virtual hosting using AOLserver. The virtual hosting
software consisted of a single, very short page, which looked up the
configuration information. At one time they approached 500k domains in the
system, which pushed AOLserver onto the Netcraft map. There were no local
directories in the system, but it allowed users to redirect to their own
website, or to wrap their page in a frame (done automatically) to pull up
data stored anywhere on the internet. You could provide a home page, which
was stored in the database.

Bottom line: AOLserver is great for mass virtual hosting of the sort I have
described: static, database dynamic or offsite redirects. It is less helpful
for file based dynamic sites since you will likely have to rely on plain old
CGI. The built in Tcl scripting and adp (AOLserver Dynamic Pages) share
memory between requests and over the life of the server and system
user/group. So you would need to carefully control what your users are
allowed to run, otherwise they could mess with each other and with the server
operation. Using separate AOLserver virtual hosts will not work on a massive
scale since each virtual host requires a lot of memory, and requires time to
start up. It also requires a restart to add virtual hosts.

tom jackson


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] 
with the
body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: 
field of your email blank.


Re: [AOLSERVER] Mass Virtual Hosting system for AolServer 4.0.x?

2005-04-28 Thread Andrew Piskorski
On Thu, Apr 28, 2005 at 07:54:29AM -0700, Tom Jackson wrote:

 Bottom line: AOLserver is great for mass virtual hosting of the sort I have
 described: static, database dynamic or offsite redirects. It is less helpful
 for file based dynamic sites since you will likely have to rely on plain old
 CGI. The built in Tcl scripting and adp (AOLserver Dynamic Pages) share
 memory between requests and over the life of the server and system
 user/group. So you would need to carefully control what your users are
 allowed to run, otherwise they could mess with each other and with the server
 operation. Using separate AOLserver virtual hosts will not work on a massive
 scale since each virtual host requires a lot of memory, and requires time to
 start up. It also requires a restart to add virtual hosts.

This sounds like a good argument for some form of FastCGI-like
solution.  One main AOLserver process, but then also give each user
his own FastCGI server process.

Possibly that FastCGI process could be just another AOLserver that's
been tweaked a bit differently for minimal footprint and low
concurrency.  E.g., turn of the memory-hungry threaded memory
allocator because you don't need its speed under high concurrency.  Or
possibly a specialized tclsh-based process would be better.

But either way, looks like with the proper work, you could set things
up so that the user's custom code needn't much are whether it's runnin
in the primary or the FastCGI AOLserver process.

Actually though, this FastCGI scenario sounds pretty similar to the
one process per user/site style of virtual hosting anyway.  How would
the two scenarios differ, exactly?

Ah, but either way even with Zoran's ttrace, the per-thread proc
memory overhead would still bite you hard, you'd need to do extra
hacking on AOLserver to drive that down much further for this
scenario.

You'd probably want to keep shared (non-user-custom) code in read-only
SysV shared memory so that ALL the AOLserver processes could see it.
In order to do that you'd probably want to also extend the nsv/tsv API
to transparently work in shared memory too, that part at least
probably isn't too hard.

User custom code, by definition, needs to be per-process, but ttrace
might not be good enough, you might need to get it down to really
genuinely only 1 copy of each Tcl proc process-wide for any number of
threads.  You'd need per-user memory usage tracking and limits of
course to make sure user's don't just go crazy defining all sorts of
procs on the fly per-thread even when they don't need to.

If you do all that, then I guess the only remaining problem might be
the size of all the per-thread C stacks used by the Tcl/AOLserver
process.  Say 1000 users, each with 4 threads, each with one thread
with a 0.5 MB C stack.  That 2 GB of RAM just for the C stacks.  Still
doable, but somewhat costly.  Hm, Linux has automatically re-sizing
stacks though, possibly all you need to do is make AOLserver and Tcl
use that (both growing and shrinking) rather than a fixed-size stack.
Anybody know what that would require?

--
Andrew Piskorski [EMAIL PROTECTED]
http://www.piskorski.com/


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to [EMAIL PROTECTED] 
with the
body of SIGNOFF AOLSERVER in the email message. You can leave the Subject: 
field of your email blank.