You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by "Roy T. Fielding" <fi...@kiwi.ics.uci.edu> on 1999/03/24 07:15:11 UTC
Re: am I dreaming?
>After a more diligent scanning I noticed that the
>MODULE_MAGIC_NUMBER_MAJOR was changed because METHODS and M_INVALID
>were redefined. Maybe these changes were important bug fixes but they
>seem to just be cosmetic to me, in which case I feel like they could
>have been deferred to a later Apache version.
They were not cosmetic.
>Is backwards compatibility of precompiled DSO modules not something
>that Apache aims to maintain?
No. The Apache API is source-based. To get binary backwards compatibility
you need to add a layer of indirection, like fastcgi or a servlet engine,
that would buffer third-party modules from core changes.
Given the choice between forward progress or maintaining compatibility
with old binaries, we choose forward progress. Our releases are not
frequent enough to restrict those changes to the second version number.
....Roy
Re: am I dreaming?
Posted by Dean Gaudet <dg...@arctic.org>.
On 24 Mar 1999, Thomas Reilly wrote:
> Is something like this in the works for 2.0?
If someone works on it, it will be included.
Dean
Re: am I dreaming?
Posted by Thomas Reilly <tr...@livesoftware.com>.
"Roy T. Fielding" <fi...@kiwi.ics.uci.edu> writes:
> No. The Apache API is source-based. To get binary backwards compatibility
> you need to add a layer of indirection, like fastcgi or a servlet engine,
> that would buffer third-party modules from core changes.
With the advent of DSO you it seems silly to say that the Apache API
is only source-based. We have one DSO that we ship with our product
that works for Apache 1.3.1 through 1.3.4 (a little trickery was
required for 1.3.4).
We don't need a buffer against core changes because we're real careful
about tying our DSO to any compile time Apache core features (like
preprocessor definitions). But all our effort is for naught when the
MODULE_MAGIC_NUMBER_MAJOR is changed.
Seems to me the whole DSO architecture is problematic because it is
basd on Apache modules which are too closely tied to the core Apache.
LoadModule allows one to load a module at runtime and is a real
powerful feature but its power is lost at the hands of these
compatibility breaks.
A cleaner abstraction seems to be necessary. Something lean that has
its own set of include files. It would also be nice if any
pre-processor defines that modules need from Apache core (if any) be
made available as runtime globals for modules that desire to be used
across Apache versions.
Is something like this in the works for 2.0?
--
Tom Reilly
Live Software, Inc
http://www.livesoftware.com
Re: Module Server Project?
Posted by Ben Hyde <bh...@pobox.com>.
These are all fine ideas. The "getting it to work" is hard.
Some examples of places were it gets hard.
- you need to have a protocol from Apache child to backend
the temptation is for both mmap and TCP/IP.
- memory management, connection maintance, data
serialization, etc. - just work.
- you have copy "enough" of the state: request, connection,
configuration state to the backend at approprate times.
- there is a distributed database problem between the
backend and the Apache child with all the usual
distributed database sync problems.
- it's tempting to skimp on processes so you only have
backends proportional to backend load, not apache children.
Dive in, it's interesting work.
- ben
Ryan Mooney wrote:
>
> Hi:
>
> I have an idea for writing a module server whereby you could optionally
> decouple modules from the main web server into other processes, on either
> the local or a remote machine. Basically I was looking at ways of decoupling
> the module registration logic so that it could be more dynamic, and then
> have a module that could register other modules, either locally or remotely
> (probabley connected via either shared mem, or sockets respectively). Once
> that was in place, put together another lightweight app (basically a stripped
> apache re-using 99% apache code) that links in something closely approximating
> the current module interface (presumabley the new extended version), and
> registers it with the main server(s) and proxies requests to some pre forked
> backends.
>
> This would give Apache some more scalability by allowing you to distribute
> the processing load in more interesting ways, while still offering the
> traditional interface/implementation. Additionally, as sort of a side
> benefit, it would allow easier testing of unstable/potentially insecure
> modules as they could dynamically be loaded/killed and if nessecary be run
> on a different machine. If anyone else is doing something like this, let me
> know & I won't bother :) If not, does it sound usefull/interesting, and
> if so I'll spend some time working on it.
>
> Obviously some of the details are still fuzzy, I'd have to spend a week or
> two playing code monkey, but a lot of you guys are intimately familiar
> with the current gritty details, so I was sort of hoping for a good idea/bad
> idea initial response before spending immense amounts of time on it.
>
> Ryan M.
>
Re: Module Server Project?
Posted by Greg Stein <gs...@lyra.org>.
Ryan Mooney wrote:
> ...
> Obviously some of the details are still fuzzy, I'd have to spend a week or
> two playing code monkey, but a lot of you guys are intimately familiar
> with the current gritty details, so I was sort of hoping for a good idea/bad
> idea initial response before spending immense amounts of time on it.
Passing control to an external module isn't the difficult part. It is
providing an interface for that module to use, which calls back into the
myriad of Apache functions. The Apache API has dozens of public
functions to use. Each function that an external module may need to use
would require remoting.
In all cases where somebody has written something to shift functionality
to another process (CGI, ILU/CORBA connectors, FastCGI, etc), the target
process had a very narrow view of information from Apache (everything is
packaged and delivered, rather than allowing callbacks).
Good luck with this, but I'd warn you that those callbacks are going to
be the stickler.
Cheers,
-g
--
Greg Stein, http://www.lyra.org/
Module Server Project?
Posted by Ryan Mooney <ry...@area51.verge.net>.
Hi:
I have an idea for writing a module server whereby you could optionally
decouple modules from the main web server into other processes, on either
the local or a remote machine. Basically I was looking at ways of decoupling
the module registration logic so that it could be more dynamic, and then
have a module that could register other modules, either locally or remotely
(probabley connected via either shared mem, or sockets respectively). Once
that was in place, put together another lightweight app (basically a stripped
apache re-using 99% apache code) that links in something closely approximating
the current module interface (presumabley the new extended version), and
registers it with the main server(s) and proxies requests to some pre forked
backends.
This would give Apache some more scalability by allowing you to distribute
the processing load in more interesting ways, while still offering the
traditional interface/implementation. Additionally, as sort of a side
benefit, it would allow easier testing of unstable/potentially insecure
modules as they could dynamically be loaded/killed and if nessecary be run
on a different machine. If anyone else is doing something like this, let me
know & I won't bother :) If not, does it sound usefull/interesting, and
if so I'll spend some time working on it.
Obviously some of the details are still fuzzy, I'd have to spend a week or
two playing code monkey, but a lot of you guys are intimately familiar
with the current gritty details, so I was sort of hoping for a good idea/bad
idea initial response before spending immense amounts of time on it.
Ryan M.
Re: am I dreaming?
Posted by Ben Laurie <be...@algroup.co.uk>.
Alexei Kosut wrote:
> This is one of the reasons I like Java. Source and binary compatibility
> are one and the same.
What a shame we don't get either, then (e.g., try using anything based
on the old JSDK with the new one).
Cheers,
Ben.
--
http://www.apache-ssl.org/ben.html
"My grandfather once told me that there are two kinds of people: those
who work and those who take the credit. He told me to try to be in the
first group; there was less competition there."
- Indira Gandhi
RE: am I dreaming?
Posted by Alexei Kosut <ak...@leland.Stanford.EDU>.
On Thu, 25 Mar 1999, Dean Gaudet wrote:
> On Thu, 25 Mar 1999, Alexei Kosut wrote:
>
> > Yep... but that isn't necessarily a bad thing. So long as it's done right,
>
> Dude, we're talking about code here. The "dreaming" word in the subject
> applies pretty heavily whenever you talk about "doing something right" :)
Oh, sorry. I thought I was agreeing with you :)
> > This is one of the reasons I like Java. Source and binary compatibility
> > are one and the same. A native Java interface to the Apache API might not
> > be a bad idea, even if just for this reason. Of course, it might be a bad
> > idea for other reasons :)
>
> Stop dreaming :)
>
> Even if we were using java and we changed the equivalent of M_INVALID it
> wouldn't have changed one damn thing. It's not a language problem at all!
Actually, Java does get this right. If I make a reference to a static
final variable (as close as Java gets to any sort of constant - it
certainly doesn't have a preprocessor) in another class, and that value
changes, my class picks up the new value without trying.
(of course, some people might claim that the fact that Java does not have
a preprocessor or any better form of a constant than a variable that
you're not allowed to change is a language problem in and of itself.)
-- Alexei Kosut <ak...@stanford.edu> <http://www.stanford.edu/~akosut/>
Stanford University, Class of 2001 * Apache <http://www.apache.org> *
RE: am I dreaming?
Posted by Dean Gaudet <dg...@arctic.org>.
On Thu, 25 Mar 1999, Alexei Kosut wrote:
> Yep... but that isn't necessarily a bad thing. So long as it's done right,
Dude, we're talking about code here. The "dreaming" word in the subject
applies pretty heavily whenever you talk about "doing something right" :)
> I certainly think binary modules are a good thing. Not so much so people
> can ship proprietary modules but so people can ship easy-to-install
> modules. Especially on systems like NT where installing a source-only
> module requires the purchase (and installation) of a compiler.
Then they can wait the extra day after release for folks to build the new
modules. That's what we're talking about here, a day or two -- the
changes we make are generally easy to recover at the source level (in fact
no changes except a recompile are typically required).
> This is one of the reasons I like Java. Source and binary compatibility
> are one and the same. A native Java interface to the Apache API might not
> be a bad idea, even if just for this reason. Of course, it might be a bad
> idea for other reasons :)
Stop dreaming :)
Even if we were using java and we changed the equivalent of M_INVALID it
wouldn't have changed one damn thing. It's not a language problem at all!
Dean
RE: am I dreaming?
Posted by Alexei Kosut <ak...@leland.Stanford.EDU>.
On Thu, 25 Mar 1999, Dean Gaudet wrote:
> BTW, I'd like to suggest that people should be very concerned about tying
> themselves to a binary module for apache... because even with such an
> interface there's no guarantee that it will work across an upgrade. And
> you won't have source, so how will you fix the bugs? You know, the
> standard arguments for having source. As soon as you introduce one binary
> module into the mix you're tying your hands behind your back.
Yep... but that isn't necessarily a bad thing. So long as it's done right,
I certainly think binary modules are a good thing. Not so much so people
can ship proprietary modules but so people can ship easy-to-install
modules. Especially on systems like NT where installing a source-only
module requires the purchase (and installation) of a compiler.
However, it is true that Apache doesn't release all that often. I
certainly have little problem with 1.2 modules being incompatible with
1.3, although it irks me when we have to break binary compatibility for
minor releases. But *shrug*
This is one of the reasons I like Java. Source and binary compatibility
are one and the same. A native Java interface to the Apache API might not
be a bad idea, even if just for this reason. Of course, it might be a bad
idea for other reasons :)
> For another similar example read the linux-kernel archives around the time
> 2.2.0 was released, there was a nice huge thread on pretty much the same
> topic: binary-only linux kernel modules. Linus strives for source
> compatibility, cares not about binary compatibility, but never holds back
> the progress of the kernel just to keep the binary folks happy.
I was about to make a very silly comment about how with Linux you can
compile the kernel so it will let you load the modules anyway, before I
remembered that Apache ships with source also...
-- Alexei Kosut <ak...@stanford.edu> <http://www.stanford.edu/~akosut/>
Stanford University, Class of 2001 * Apache <http://www.apache.org> *
RE: am I dreaming?
Posted by Dean Gaudet <dg...@arctic.org>.
On Thu, 25 Mar 1999, Randy Terbush wrote:
> It is also important that the binary module vendors who are screaming
> about this problem offer a solution back to this project instead of
> making demands that it be changed.
Yup -- but not only must they offer an initial solution, they must also
maintain it. Otherwise it'll only last for one rev of the magic number,
defeating its usefulness. As an open source developer, I don't personally
want to expend any effort catering to the binary-only crowd.
In order to assess the possibility of such an interface, someone needs to
do extensive research of all the previous magic number changes (focus on
the ones for minor releases, we don't put much thought into changes during
betas). Until someone has done this we're all just blowing hot air.
BTW, I'd like to suggest that people should be very concerned about tying
themselves to a binary module for apache... because even with such an
interface there's no guarantee that it will work across an upgrade. And
you won't have source, so how will you fix the bugs? You know, the
standard arguments for having source. As soon as you introduce one binary
module into the mix you're tying your hands behind your back.
For another similar example read the linux-kernel archives around the time
2.2.0 was released, there was a nice huge thread on pretty much the same
topic: binary-only linux kernel modules. Linus strives for source
compatibility, cares not about binary compatibility, but never holds back
the progress of the kernel just to keep the binary folks happy.
Dean
RE: am I dreaming?
Posted by Randy Terbush <ra...@covalent.net>.
> >After a more diligent scanning I noticed that the
> >MODULE_MAGIC_NUMBER_MAJOR was changed because METHODS and M_INVALID
> >were redefined. Maybe these changes were important bug
> fixes but they
> >seem to just be cosmetic to me, in which case I feel like
> they could
> >have been deferred to a later Apache version.
>
> They were not cosmetic.
>
> >Is backwards compatibility of precompiled DSO modules not something
> >that Apache aims to maintain?
>
> No. The Apache API is source-based. To get binary
> backwards compatibility
> you need to add a layer of indirection, like fastcgi or a
> servlet engine,
> that would buffer third-party modules from core changes.
>
> Given the choice between forward progress or maintaining
> compatibility
> with old binaries, we choose forward progress. Our releases are not
> frequent enough to restrict those changes to the second
> version number.
>
> ....Roy
>
Roy,
I must disagree and hope that the goal of the group is different than
you describe.
If our goal is to see that Apache is the most widely used platform for
HTTP services, being mindful of changes that affect binary
compatibility issues for binary module vendors is important. It is
these 3rd party add-ons that make Apache a more desireable and
competitive option for businesses, when choosing between an MS or
Netscape solution and Apache.
It is also important that the binary module vendors who are screaming
about this problem offer a solution back to this project instead of
making demands that it be changed.
-Randy