ROADMAP 9.9 KB

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