3 Last modified at [$Date: 2002/10/18 01:08:38 $]
8 The Apache HTTP Server project must balance two competing and disjoint
9 objectives: maintain stable code for third party authors, distributors and
10 most importantly users so that bug and security fixes can be quickly adopted
11 without significant hardship due to API changes; and continue the development
12 process that requires ongoing redesign to work around earlier oversights in
13 the implementation of a fluid and flexible API.
15 The Apache HTTP Server versions, through 2.0, used the Module Magic Number
16 to reflect the relatively frequent API changes. This had the shortcoming
17 of often leaving binary download users hunting to replace their loaded third
18 party modules. This left the third party module authors searching through
19 the API change histories to determine the new declarations, APIs and side
20 effects of making the necessary code changes.
22 With the simultaneous release of Apache 2.2-stable and Apache 2.3-development,
23 the Apache HTTP Server project is moving to a more predictable stable code
24 branch, while opening the development to forward progress without concern
25 for breaking the stable branch. This document explains the rationale between
26 the two versions and their behavior, going forward.
29 STABLE RELEASES, 2.{even}.{revision}
30 ------------------------------------
32 All even numbered releases will be considered stable revisions.
34 Stable revisions will retain forward compatiblity to the maximum
35 possible extent. Features may be added during minor revisions, and
36 features may be deprecated by making appropriate notations in the
37 documentation, but no features may be removed.
39 In essence, that implies that you can upgrade from one minor revision
40 to the next with a minimum of trouble. In particular, this means:
42 * The Module API will retain forward compatibility.
43 It will not be necessary to update modules to work with new
44 revisions of the stable tree.
46 * The run-time configuration will be forward compatible.
47 No configuration changes will be necessary to work with new
48 revisions of the stable tree.
50 * Compile-time configuration will be forward compatible.
51 The configure command line options that work in one release
52 of the stable tree will also work in the next release.
54 As always, it will be necessary to test any new release to assure
55 that it works correctly with a particular configuration and a
56 particular set of modules, but every effort will be made to assure
57 that upgrades are as smooth as possible.
59 In addition, the following development restrictions will aid in
60 keeping the stable tree as safe as possible:
62 * No 'Experimental' modules; while it may be possible (based on API changes
63 required to support a given module) to load a 2.3-development module into
64 a 2.2-stable build of Apache, there are no guarantees. Experimental
65 modules will be introduced to the 2.3-development versions and either
66 added to 2.2-stable once they are proven and compatible, or deferred
67 to the 2.4-stable release if they cannot be incorporated in the current
68 stable release due to API change requirements.
70 * The stable CVS tree should not remain unstable at any time. Atomic commits
71 aught be used to introduce code from the development version to the stable
72 tree. At any given time a security release may be in preparation,
73 unbeknownst to other contributors. At any given time, testers may be
74 checking out CVS head to confirm that a bug has been corrected. And as
75 all code was well-tested in development prior to committing to the stable
76 tree, there is really no reason for this tree to be broken for more than
77 a few minutes during a lengthy commit.
80 DEVELOPMENT RELEASES, 2.{odd}.{revision}
81 -----------------------------------------
82 All odd numbered releases designate the 'next' possible stable release,
83 therefore the current development version will always be one greater than
84 the stable release. Work proceeds on development releases, permitting
85 the modification of the MMN at any time in order to correct deficiencies
86 or shortcomings in the API. This means that third party modules from one
87 revision to another may not be binary compatible, and may not successfully
88 compile without modification to accomodate the API changes.
90 The only 'supported' development release at any time will be the most
91 recently released version. Developers will not be answering bug reports
92 of older development releases once a new release is available, it becomes
93 the resposibility of the reporter to use the latest development version
94 to confirm that the bug still exists.
96 Any new code, new API features or new ('experimental') modules may be
97 promoted at any time to the next stable release, by a vote of the project
98 contributors. This vote is based on the technical stability of the new
99 code and the stability of the interface. Once moved to stable, that feature
100 cannot change for the remainder of that lifetime of that stable verions,
101 so the vote must reflect that the final decisions on the behavior and naming
102 of that new feature were reached. Vetos continue to apply to this choice
103 of introducing the new work to the stable version.
105 At any given time, when the quality of changes to the development branch
106 is considered release quality, that version may become a candidate for the
107 next stable release. This includes some or all of the API changes, promoting
108 experimental modules to stable or deprecating and eliminating older modules
109 from the last stable release. All of these choices are considered by the
110 project as a group in the interests of promoting the stable release, so that
111 any given change may be 'deferred' for a future release by the group, rather
112 than introduce unacceptable risks to adopting the next stable release.
114 Third party module authors are strongly encouraged to test with the latest
115 development version. This assures that the module will be ready for the next
116 stable release, but more importantly, the author can react to shortcomings
117 in the API early enough to warn the dev@httpd.apache.org community of the
118 shortcomings so that they can be addressed before the stable release. The
119 entire onus is on the third party module author to anticipate the needs of
120 their module before the stable release is created, once it has been released
121 they will be stuck with that API for the lifetime of that stable release.
126 In order to avoid 'skipped' release numbers, the Release Manager will generally
127 roll a release candidate (APACHE_#_#_#_RC#) tag. This is true of both the
128 stable as well as the development tree. Release Candidate tarballs will be
129 announced to the stable-testers@httpd.apache.org for the stable tree, or to
130 the current-testers@httpd.apache.org list for the development tree.
132 The final APACHE_#_#_# tag will not exist until the APACHE_#_#_#_RC# candidate
133 has passed the usual votes to release that version. Only then is the final
134 tarball packaged, removing all -rc# designations from the version number, and
135 tagging the tree with the release number.
141 * Source code should follow style guidelines.
142 OK, we all agree pretty code is good. Probably best to clean this
143 up by hand immediately upon branching a 2.1 tree.
144 Status: Justin volunteers to hand-edit the entire source tree ;)
147 Recall when the release plan for 2.0 was written:
148 Absolute Enforcement of an "Apache Style" for code.
149 Watch this slip into 3.0.
152 The style guide needs to be reviewed before this can be done.
153 http://httpd.apache.org/dev/styleguide.html
154 The current file is dated April 20th 1998!
157 It's survived since '98 because it's welldone :-) Suggest we
158 simply follow whatever is documented in styleguide.html as we
159 branch the next tree. Really sort of straightforward, if you
160 dislike a bit within that doc, bring it up on the dev@httpd
161 list prior to the next branch.
163 So Bill sums up ... let's get the code cleaned up in CVS head.
164 Remember, it just takes cvs diff -b (that is, --ignore-space-change)
165 to see the code changes and ignore that cruft. Get editing Justin :)
167 * revamp the input filter syntax to provide for ordering of
168 filters created with the Set{Input|Output}Filter and the
169 Add{Input|Output}Filter directives. A 'relative to filterx'
170 syntax is definately preferable.
172 * Platforms that do not support fork (primarily Win32 and AS/400)
173 Architect start-up code that avoids initializing all the modules
174 in the parent process on platforms that do not support fork.
176 . Better yet - not only inform the startup of which phase it's in,
177 but allow the parent 'process' to initialize shared memory, etc,
178 and create a module-by-module stream to pass to the child, so the
179 parent can actually arbitrate the important stuff.
181 * Replace stat [deferred open] with open/fstat in directory_walk.
182 Justin, Ian, OtherBill all interested in this. Implies setting up
183 the apr_file_t member in request_rec, and having all modules use
184 that file, and allow the cleanup to close it [if it isn't a shared,
187 * The Async Apache Server implemented in terms of APR.
188 [Bill Stoddard's pet project.]
189 Message-ID: <008301c17d42$9b446970$01000100@sashimi> (dev@apr)
191 OtherBill notes that this can proceed in two parts...
193 Async accept, setup, and tear-down of the request
194 e.g. dealing with the incoming request headers, prior to
195 dispatching the request to a thread for processing.
196 This doesn't need to wait for a 2.x/3.0 bump.
198 Async delegation of the entire request processing chain
199 Too many handlers use stack storage and presume it is
200 available for the life of the request, so a complete
201 async implementation would need to happen 3.0 release.
203 * Add a string "class" that combines a char* with a length
204 and a reference count. This will help reduce the number
205 of strlen and strdup operations during request processing.
206 Including both the length and allocation will save us a ton
207 of reallocation we do today, in terms of string manipulation.
209 OtherBill asks if this is really an APR issue, not an HTTPD issue?
212 MAKING APACHE REPOSITORY-AGNOSTIC
213 (or: remove knowledge of the filesystem)
215 [ 2002/10/01: discussion in progress on items below; this isn't
218 * dav_resource concept for an HTTP resource ("ap_resource")
220 * r->filename, r->canonical_filename, r->finfo need to
221 disappear. All users need to use new APIs on the ap_resource
224 (backwards compat: today, when this occurs with mod_dav and a
225 custom backend, the above items refer to the topmost directory
226 mapped by a location; e.g. docroot)
228 Need to preserve a 'filename'-like string for mime-by-name
229 sorts of operations. But this only needs to be the name itself
232 Justin: Can we leverage the path info, or do we not trust the
235 gstein: well, it isn't the "path info", but the actual URI of
236 the resource. And of course we trust the user... that is
237 the resource they requested.
239 dav_resource->uri is the field you want. path_info might
240 still exist, but that portion might be related to the
241 CGI concept of "path translated" or some other further
244 To continue, I would suggest that "path translated" and
245 having *any* path info is Badness. It means that you did
246 not fully resolve a resource for the given URI. The
247 "abs_path" in a URI identifies a resource, and that
248 should get fully resolved. None of this "resolve to
249 <here> and then we have a magical second resolution
250 (inside the CGI script)" or somesuch.
252 Justin: Well, let's consider mod_mbox for a second. It is sort of
253 a virtual filesystem in its own right - as it introduces
254 it's own notion of a URI space, but it is intrinsically
255 tied to the filesystem to do the lookups. But, for the
256 portion that isn't resolved on the file system, it has
257 its own addressing scheme. Do we need the ability to
260 * The translate_name hook goes away
262 Wrowe altogether disagrees. translate_name today even operates
263 on URIs ... this mechansim needs to be preserved.
265 * The doc for map_to_storage is totally opaque to me. It has
266 something to do with filesystems, but it also talks about
267 security and per_dir_config and other stuff. I presume something
268 needs to happen there -- at least better doc.
270 Wrowe agrees and will write it up.
272 * The directory_walk concept disappears. All configuration is
273 tagged to Locations. The "mod_filesystem" module might have some
274 internal concept of the same config appearing in multiple
275 places, but that is handled internally rather than by Apache
278 Wrowe suggests this is wrong, instead it's private to filesystem
279 requests, and is already invoked from map_to_storage, not the core
280 handler. <Directory > and <Files > blocks are preserved as-is,
281 but <Directory > sections become specific to the filesystem handler
282 alone. Because alternate filesystem schemes could be loaded, this
283 should be exposed, from the core, for other file-based stores to
284 share. Consider an archive store where the layers become
285 <Directory path> -> <Archive store> -> <File name>
287 Justin: How do we map Directory entries to Locations?
289 * The "Location tree" is an in-memory representation of the URL
290 namespace. Nodes of the tree have configuration specific to that
291 location in the namespace.
296 const char *name; /* name of this node relative to parent */
298 struct ap_conf_vector_t *locn_config;
300 apr_hash_t *children; /* NULL if no child configs */
303 The following config:
305 <Location /server-status>
306 SetHandler server-status
312 Creates a node with name=="server_status", and the node is a
313 child of the "/" node. (hmm. node->name is redundant with the
314 hash key; maybe drop node->name)
316 In the config vector, mod_access has stored its Order, Deny, and
317 Allow configs. mod_core has stored the SetHandler.
319 During the Location walk, we merge the config vectors normally.
321 Note that an Alias simply associates a filesystem path (in
322 mod_filesystem) with that Location in the tree. Merging
323 continues with child locations, but a merge is never done
324 through filesystem locations. Config on a specific subdir needs
325 to be mapped back into the corresponding point in the Location
326 tree for proper merging.
328 * Config is parsed into a tree, as we did for the 2.0 timeframe,
329 but that tree is just a representation of the config (for
330 multiple runs and for in-memory manipulation and usage). It is
331 unrelated to the "Location tree".
333 * Calls to apr_file_io functions generally need to be replaced
334 with operations against the ap_resource. For example, rather
335 than calling apr_dir_open/read/close(), a caller uses
336 resource->repos->get_children() or somesuch.
338 Note that things like mod_dir, mod_autoindex, and mod_negotation
339 need to be converted to use these mechanisms so that their
340 functions will work on logical repositories rather than just
343 * How do we handle CGI scripts? Especially when the resource may
344 not be backed by a file? Ideally, we should be able to come up
345 with some mechanism to allow CGIs to work in a
346 repository-independent manner.
348 - Writing the virtual data as a file and then executing it?
349 - Can a shell be executed in a streamy manner? (Portably?)
350 - Have an 'execute_resource' hook/func that allows the
351 repository to choose its manner - be it exec() or whatever.
352 - Won't this approach lead to duplication of code? Helper fns?
354 gstein: PHP, Perl, and Python scripts are nominally executed by
355 a filter inserted by mod_php/perl/python. I'd suggest
356 that shell/batch scripts are similar.
358 But to ask further: what if it is an executable
359 *program* rather than just a script? Do we yank that out
360 of the repository, drop it onto the filesystem, and run
363 I'll vote -0.9 for CGIs as a filter. Keep 'em handlers.
365 Justin: So, do we give up executing CGIs from virtual repositories?
366 That seems like a sad tradeoff to make. I'd like to have
367 my CGI scripts under DAV (SVN) control.
369 * How do we handle overlaying of Location and Directory entries?
370 Right now, we have a problem when /cgi-bin/ is ScriptAlias'd and
371 mod_dav has control over /. Some people believe that /cgi-bin/
372 shouldn't be under DAV control, while others do believe it
373 should be. What's the right strategy?