On Mon, 2009-04-13 at 13:49 -0400, Jim Davidson wrote:
> 
> On Apr 3, 2009, at 11:45 PM, Tom Jackson wrote:
> >
> > * Filters seem uniquely superior when the url pattern determines which
> > code should run. Unfortunately filters are many times registered to / 
> > *,
> > the global pattern. This is not a filter in the typical sense. The  
> > only
> > benefit is the ability to stage code to run in a particular order at a
> > particular stage. The question is if there should be a separate stage
> > for global filters, or a separate mechanism to register global code
> > which runs at certain point, maybe conditioned on previous events.  
> > This
> > is a like a generalized ns_atclose.
> 
> 
> I think a good idea gets implemented, bad ideas linger to avoid  
> breaking things so that's why both exist.
> 
> BTW:  I remembered why the newer "connection cleanup" stuff was added  
> -- it was designed to interact with the "connection local storage API"  
> which can be accessed in the driver thread, ostensibly to fetch and  
> store network-related assets in an efficient manner.  The model is  
> similar to Pthreads local storage and thus needed non-conditional  
> cleanup callbacks.


I should point out a mistake I made in the above analysis. The access
logging filter is a global filter. It actually works exactly like I was
proposing. Until I actually looked at the nslog module, I assumed it was
registered as a "filter". It isn't. It is a "server trace" 

A server trace is identical to a "cleanup trace", it just runs at a
different point, and is based upon successfully sending a response to
the client. This "success" is indicated/protected by 
status = NS_OK||NS_FILTER_RETURN. 

I experimented with using a cleanup trace in nslog.c, and it worked
exactly the same. This required the following adjustment:

Ns_RegisterServerTrace(server, LogTrace, logPtr);
changed to:
Ns_RegisterConnCleanup(server, LogTrace, logPtr);

An important distinction between this API and the filter API is that an
interp is not required. You can run generic C code.

There is also no url pattern matching and all traces/cleanups run.

> 
> >
> > * The access logging module is ancient, simple and in desperate need  
> > of
> > professional help.
> 
> 
> Agreed.     And, google analytics and chartbeat.com are pretty cool :)

Anyone have ideas on using these?

> >
> > * The Internal redirecting functionality is poorly documented and
> > understood. These are configured as proxies or redirects.
> 
> 
> Yes -- it was always a great disappointment for me :(

Yeah, it seems like you could use it for lots of things, like a generic
FSM engine.

tom jackson 


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

To Remove yourself from this list, simply send an email to 
<lists...@listserv.aol.com> with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: 
field of your email blank.

Reply via email to