]> granicus.if.org Git - apache/blob - ROADMAP
7ef84a348eaea7b5e807f365176065b37e666899
[apache] / ROADMAP
1 APACHE 2.x ROADMAP
2 ==================
3 Last modified at [$Date: 2002/10/28 04:16:40 $]
4
5
6 WORKS IN PROGRESS
7 -----------------
8
9     * Source code should follow style guidelines.
10       OK, we all agree pretty code is good.  Probably best to clean this
11       up by hand immediately upon branching a 2.1 tree.
12       Status: Justin volunteers to hand-edit the entire source tree ;)
13
14       Justin says:
15         Recall when the release plan for 2.0 was written:
16             Absolute Enforcement of an "Apache Style" for code.
17         Watch this slip into 3.0.
18
19       David says:
20         The style guide needs to be reviewed before this can be done.
21         http://httpd.apache.org/dev/styleguide.html
22         The current file is dated April 20th 1998!
23
24         OtherBill offers:
25           It's survived since '98 because it's welldone :-)  Suggest we
26           simply follow whatever is documented in styleguide.html as we
27           branch the next tree.  Really sort of straightforward, if you
28           dislike a bit within that doc, bring it up on the dev@httpd
29           list prior to the next branch.
30
31       So Bill sums up ... let's get the code cleaned up in CVS head.
32       Remember, it just takes cvs diff -b (that is, --ignore-space-change)
33       to see the code changes and ignore that cruft.  Get editing Justin :)
34
35     * revamp the input filter syntax to provide for ordering of
36       filters created with the Set{Input|Output}Filter and the
37       Add{Input|Output}Filter directives.  A 'relative to filterx' 
38       syntax is definately preferable.
39
40     * Platforms that do not support fork (primarily Win32 and AS/400)
41       Architect start-up code that avoids initializing all the modules 
42       in the parent process on platforms that do not support fork.
43
44     . Better yet - not only inform the startup of which phase it's in,
45       but allow the parent 'process' to initialize shared memory, etc,
46       and create a module-by-module stream to pass to the child, so the
47       parent can actually arbitrate the important stuff.
48
49     * Replace stat [deferred open] with open/fstat in directory_walk.
50       Justin, Ian, OtherBill all interested in this.  Implies setting up
51       the apr_file_t member in request_rec, and having all modules use
52       that file, and allow the cleanup to close it [if it isn't a shared,
53       cached file handle.]
54
55     * The Async Apache Server implemented in terms of APR.
56       [Bill Stoddard's pet project.]
57       Message-ID: <008301c17d42$9b446970$01000100@sashimi> (dev@apr)
58
59         OtherBill notes that this can proceed in two parts...
60
61            Async accept, setup, and tear-down of the request 
62            e.g. dealing with the incoming request headers, prior to
63            dispatching the request to a thread for processing.
64            This doesn't need to wait for a 2.x/3.0 bump.
65
66            Async delegation of the entire request processing chain
67            Too many handlers use stack storage and presume it is 
68            available for the life of the request, so a complete 
69            async implementation would need to happen 3.0 release.
70
71     * Add a string "class" that combines a char* with a length
72       and a reference count.  This will help reduce the number
73       of strlen and strdup operations during request processing.
74       Including both the length and allocation will save us a ton 
75       of reallocation we do today, in terms of string manipulation.
76
77         OtherBill asks if this is really an APR issue, not an HTTPD issue?
78
79
80 MAKING APACHE REPOSITORY-AGNOSTIC
81 (or: remove knowledge of the filesystem)
82
83 [ 2002/10/01: discussion in progress on items below; this isn't
84   planned yet ]
85
86     * dav_resource concept for an HTTP resource ("ap_resource")
87
88     * r->filename, r->canonical_filename, r->finfo need to
89       disappear. All users need to use new APIs on the ap_resource
90       object.
91       
92       (backwards compat: today, when this occurs with mod_dav and a
93        custom backend, the above items refer to the topmost directory
94        mapped by a location; e.g. docroot)
95
96       Need to preserve a 'filename'-like string for mime-by-name
97       sorts of operations.  But this only needs to be the name itself
98       and not a full path.
99
100       Justin: Can we leverage the path info, or do we not trust the
101               user?
102
103       gstein: well, it isn't the "path info", but the actual URI of
104               the resource. And of course we trust the user... that is
105               the resource they requested.
106               
107               dav_resource->uri is the field you want. path_info might
108               still exist, but that portion might be related to the
109               CGI concept of "path translated" or some other further
110               resolution.
111               
112               To continue, I would suggest that "path translated" and
113               having *any* path info is Badness. It means that you did
114               not fully resolve a resource for the given URI. The
115               "abs_path" in a URI identifies a resource, and that
116               should get fully resolved. None of this "resolve to
117               <here> and then we have a magical second resolution
118               (inside the CGI script)" or somesuch.
119    
120       Justin: Well, let's consider mod_mbox for a second.  It is sort of
121               a virtual filesystem in its own right - as it introduces
122               it's own notion of a URI space, but it is intrinsically
123               tied to the filesystem to do the lookups.  But, for the
124               portion that isn't resolved on the file system, it has
125               its own addressing scheme.  Do we need the ability to
126               layer resolution?
127
128     * The translate_name hook goes away
129
130       Wrowe altogether disagrees.  translate_name today even operates
131       on URIs ... this mechansim needs to be preserved.
132     
133     * The doc for map_to_storage is totally opaque to me. It has
134       something to do with filesystems, but it also talks about
135       security and per_dir_config and other stuff. I presume something
136       needs to happen there -- at least better doc.
137
138       Wrowe agrees and will write it up.
139
140     * The directory_walk concept disappears. All configuration is
141       tagged to Locations. The "mod_filesystem" module might have some
142       internal concept of the same config appearing in multiple
143       places, but that is handled internally rather than by Apache
144       core.
145
146       Wrowe suggests this is wrong, instead it's private to filesystem
147       requests, and is already invoked from map_to_storage, not the core
148       handler.  <Directory > and <Files > blocks are preserved as-is,
149       but <Directory > sections become specific to the filesystem handler
150       alone.  Because alternate filesystem schemes could be loaded, this
151       should be exposed, from the core, for other file-based stores to 
152       share. Consider an archive store where the layers become 
153       <Directory path> -> <Archive store> -> <File name>
154    
155       Justin: How do we map Directory entries to Locations?
156  
157     * The "Location tree" is an in-memory representation of the URL
158       namespace. Nodes of the tree have configuration specific to that
159       location in the namespace.
160       
161       Something like:
162       
163       typedef struct {
164           const char *name;  /* name of this node relative to parent */
165
166           struct ap_conf_vector_t *locn_config;
167
168           apr_hash_t *children; /* NULL if no child configs */
169       } ap_locn_node;
170
171       The following config:
172       
173       <Location /server-status>
174           SetHandler server-status
175           Order deny,allow
176           Deny from all
177           Allow from 127.0.0.1
178       </Location>
179       
180       Creates a node with name=="server_status", and the node is a
181       child of the "/" node. (hmm. node->name is redundant with the
182       hash key; maybe drop node->name)
183       
184       In the config vector, mod_access has stored its Order, Deny, and
185       Allow configs. mod_core has stored the SetHandler.
186       
187       During the Location walk, we merge the config vectors normally.
188       
189       Note that an Alias simply associates a filesystem path (in
190       mod_filesystem) with that Location in the tree. Merging
191       continues with child locations, but a merge is never done
192       through filesystem locations. Config on a specific subdir needs
193       to be mapped back into the corresponding point in the Location
194       tree for proper merging.
195
196     * Config is parsed into a tree, as we did for the 2.0 timeframe,
197       but that tree is just a representation of the config (for
198       multiple runs and for in-memory manipulation and usage). It is
199       unrelated to the "Location tree".
200
201     * Calls to apr_file_io functions generally need to be replaced
202       with operations against the ap_resource. For example, rather
203       than calling apr_dir_open/read/close(), a caller uses
204       resource->repos->get_children() or somesuch.
205
206       Note that things like mod_dir, mod_autoindex, and mod_negotation
207       need to be converted to use these mechanisms so that their
208       functions will work on logical repositories rather than just
209       filesystems.
210
211     * How do we handle CGI scripts?  Especially when the resource may
212       not be backed by a file?  Ideally, we should be able to come up
213       with some mechanism to allow CGIs to work in a
214       repository-independent manner.
215
216       - Writing the virtual data as a file and then executing it?
217       - Can a shell be executed in a streamy manner?  (Portably?)
218       - Have an 'execute_resource' hook/func that allows the
219         repository to choose its manner - be it exec() or whatever.
220         - Won't this approach lead to duplication of code?  Helper fns?
221
222       gstein: PHP, Perl, and Python scripts are nominally executed by
223               a filter inserted by mod_php/perl/python. I'd suggest
224               that shell/batch scripts are similar.
225
226               But to ask further: what if it is an executable
227               *program* rather than just a script? Do we yank that out
228               of the repository, drop it onto the filesystem, and run
229               it? eeewwwww...
230               
231               I'll vote -0.9 for CGIs as a filter. Keep 'em handlers.
232
233       Justin: So, do we give up executing CGIs from virtual repositories?
234               That seems like a sad tradeoff to make.  I'd like to have
235               my CGI scripts under DAV (SVN) control.
236
237     * How do we handle overlaying of Location and Directory entries?
238       Right now, we have a problem when /cgi-bin/ is ScriptAlias'd and
239       mod_dav has control over /.  Some people believe that /cgi-bin/
240       shouldn't be under DAV control, while others do believe it
241       should be.  What's the right strategy?