Re: snapshot available

From: Dancer <dancer@dont-contact.us>
Date: Mon, 31 May 1999 06:48:05 +1000

Alex Rousskov wrote:
>
> On Mon, 31 May 1999, Dancer wrote:
>
> > Curious: Have we thought about dynamic shared objects (ala apache)?
>
> I see no big value in dynamic modules. Why would I want to constantly add
> and delete modules run-time?

I wouldn't think of it as 'constantly', but I take your point. I see it
as a benefit largely for the assorted binary distributions. You know how
many folks out there get it as an RPM and don't have a clue what options
it was compiled with or how to go about compiling a copy of their own.

> Instead, link-time static loading seems to offer almost the same benefits
> without being too complex or system dependent. In a modern language like
> C++ that could be done without any ./configure help whatsoever.

Indeed.

> Since we are stuck with good old C, a --with_module "name" configure option

Q: Are we stuck with it by policy, or just because of size and
complexity? If it's the latter it's actually far simpler to migrate than
it would at first appear. My take would be portability being the big
barrier, since C++ has been quite poorly implemented on assorted
platforms until very recently.

> seems to be required. Each option would simply translate into
> "initModuleName();/clearModuleName();" calls in main() or similar. All
> compiled modules must appear in some well-known directory, like
> "src/plugins".
>
> For example, if I have module called MySFS, I put MySFS.o into
> "src/plugins" and configure with --with_module "MySFS". Configure script
> adds "initModuleMySFS();" and "clearModuleMySFS();" calls to main().
> Makefile can link Squid with all *.[oa] in "src/plugins". It is up to me
> what to write in "void initModuleMySFS() {}" and "void clearModuleMySFS()
> {}", but the idea is that I would hook into Squid's known interfaces to do
> whatever is needed.
>
> This is just a sketch, of course.

But sounds quite workable nonetheless. Over a period of time, you could
simply abstract default squid behaviour into replaceable plugins, if you
were of a mind to do so.

D
Received on Tue Jul 29 2003 - 13:15:58 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:12:08 MST