]> granicus.if.org Git - apache/blob - docs/manual/new_features_2_2.xml
Add note on DBD APIs to Module Developer Changes in new_features.
[apache] / docs / manual / new_features_2_2.xml
1 <?xml version='1.0' encoding='UTF-8' ?>
2 <!DOCTYPE manualpage SYSTEM "./style/manualpage.dtd">
3 <?xml-stylesheet type="text/xsl" href="./style/manual.en.xsl"?>
4 <!-- $LastChangedRevision$ -->
5
6 <!--
7  Copyright 2004-2005 The Apache Software Foundation or its licensors, as
8  applicable.
9
10  Licensed under the Apache License, Version 2.0 (the "License");
11  you may not use this file except in compliance with the License.
12  You may obtain a copy of the License at
13
14      http://www.apache.org/licenses/LICENSE-2.0
15
16  Unless required by applicable law or agreed to in writing, software
17  distributed under the License is distributed on an "AS IS" BASIS,
18  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19  See the License for the specific language governing permissions and
20  limitations under the License.
21 -->
22
23 <manualpage metafile="new_features_2_2.xml.meta">
24
25 <title>Overview of new features in Apache 2.2</title>
26
27 <summary>
28   <p>This document describes some of the major changes between the
29      2.0 and 2.2 versions of the Apache HTTP Server. For new features since
30      version 1.3, see the <a href="new_features_2_0.html">2.0 new features</a>
31      document.</p>
32 </summary>
33
34   <section id="core">
35     <title>Core Enhancements</title>
36     <dl>
37
38       <dt>Authn/Authz</dt>
39       <dd>The bundled authentication and authorization modules have
40           been refactored.  There is a new authentication backend provider
41           scheme which greatly eases the construction of new authentication
42           backends.</dd>
43
44       <dt>Caching</dt>
45       <dd><module>mod_cache</module>, <module>mod_disk_cache</module>, and
46           <module>mod_mem_cache</module> have undergone a lot of changes
47           are now considered production-quality. <program>htcacheclean</program>
48           has been introduced to cleanup <module>mod_disk_cache</module>
49           setups.</dd>
50
51       <dt>Graceful stop</dt>
52       <dd>The <module>prefork</module>, <module>worker</module> and 
53           <module>event</module>  MPMs now allow <program>httpd</program> 
54           to be shutdown gracefully via the
55           <a href="stopping.html#gracefulstop"><code>graceful-stop</code></a> 
56           signal. The <directive 
57           module="mpm_common">GracefulShutdownTimeout</directive> directive
58           has been added to specify an optional timeout, after which
59           <program>httpd</program> will terminate regardless of the status
60           of any requests being served.</dd>
61
62       <dt>Proxying</dt>
63       <dd>The new <module>mod_proxy_balancer</module> module provides 
64           load balancing services for <module>mod_proxy</module>.
65           The new <module>mod_proxy_ajp</module> module adds support for the
66           <code>Apache JServ Protocol version 1.3</code> used by 
67           <a href="http://jakarta.apache.org/tomcat/">Apache Tomcat</a>.</dd>
68
69       <dt>Regular Expression Library Updated</dt>
70       <dd>Version 5.0 of the 
71           <a href="http://www.pcre.org/">Perl Compatible Regular Expression
72           Library</a> (PCRE) is now included.  <program>httpd</program> can be
73           configured to use a system installation of PCRE by passing the
74           <code>--with-pcre</code> flag to configure.</dd>
75
76       <dt>Smart Filtering</dt>
77       <dd><module>mod_filter</module> introduces dynamic configuration
78           to the output filter chain.  It enables filters to be conditionally
79           inserted, based on any Request or Response header or environment
80           variable, and dispenses with the more problematic dependencies and
81           ordering problems in the 2.0 architecture.</dd>
82
83       <dt>Large File Support</dt>
84
85       <dd>httpd is now built with support for files larger than 2Gb on
86           modern 32-bit Unix systems.  Support for handling &gt;2Gb request
87           bodies has also been added.</dd>
88
89       <dt>Event MPM</dt>
90       <dd>The <module>event</module> MPM uses a seperate thread to handle
91           Keep Alive requests and accepting connections.  Keep Alive requests
92           have traditionally required httpd to dedicate a worker to handle it.
93           This dedicated worker could not be used again until the Keep Alive 
94           timeout was reached.</dd>
95
96       <dt>SQL Database Support</dt>
97       <dd><module>mod_dbd</module>, together with the apr_dbd framework,
98           brings direct SQL support to modules that need it.  Supports
99           connection pooling in threaded MPMs.</dd>
100
101     </dl>
102   </section>
103
104   <section id="module">
105     <title>Module Enhancements</title>
106     <dl>
107       <dt><module>mod_authnz_ldap</module></dt>
108       <dd>This module is a port of the 2.0 
109           <code>mod_auth_ldap</code> module to the 2.2 <code>Authn/Authz</code> 
110           framework.  New features include using LDAP attribute values and 
111           complicated search filters in the 
112           <directive module="core">Require</directive> directive.</dd>
113
114       <dt><module>mod_info</module></dt>
115       <dd>Added a new <code>?config</code> argument which will show
116           the configuration directives as parsed by Apache, including
117           their file name and line number.  The module also 
118           shows the order of all request hooks and additional
119           build information, similar to <code>httpd -V</code>.</dd>
120
121       <dt><module>mod_ssl</module></dt>
122       <!-- Need Info on SSLEngine Support? -->
123       <dd>Added a support for 
124          <a href="http://www.ietf.org/rfc/rfc2817.txt">RFC 2817</a>, which 
125          allows connections to upgrade from clear text to TLS encryption.</dd>
126     </dl>
127   </section>
128
129   <section id="programs">
130     <title>Program Enhancements</title>
131     <dl>
132       <dt><program>httpd</program></dt>
133       <dd>A new command line option <code>-M</code> has been added that
134       lists all modules that are loaded based on the current
135       configuration. Unlike the <code>-l</code> option, this list
136       includes DSOs loaded via <module>mod_so</module>.</dd>
137     </dl>
138   </section>
139
140   <section id="developer">
141     <title>Module Developer Changes</title>
142     <dl>
143       <dt><glossary>APR</glossary> 1.0 API</dt>
144
145       <dd>Apache 2.2 uses the APR 1.0 API.  All deprecated functions and 
146           symbols have been removed from <code>APR</code> and 
147           <code>APR-Util</code>. For details, see the 
148           <a href="http://apr.apache.org/">APR Website</a>.</dd>
149
150       <dt>Connection Error Logging</dt>
151
152       <dd>A new function, <code>ap_log_cerror</code> has been added to log
153           errors that occure with the client's connection.  When logged, 
154           the message includes the client IP address.</dd>
155
156       <dt>Test Configuration Hook Added</dt>
157
158       <dd>A new hook, <code>test_config</code> has been added to aid
159           modules that want to execute special code only when the user passes
160           <code>-t</code> to <program>httpd</program>.</dd>
161
162       <dt>Set Threaded MPM's Stacksize</dt>
163
164       <dd>A new directive, <code>ThreadStackSize</code> has been added to 
165           set the stack size on all threaded MPMs.  This is required
166           for some third-party modules on platforms with small default
167           thread stack size.</dd>
168
169       <dt>Protocol handling for output filters</dt>
170
171       <dd>In the past, every filter has been responsible for ensuring 
172           that it generates the correct response headers where it affects
173           them.  Filters can now delegate common protocol management to
174           <module>mod_filter</module>, using the
175           <code>ap_register_output_filter_protocol</code> or
176           <code>ap_filter_protocol</code> calls.</dd>
177
178       <dt>Monitor hook added</dt>
179       <dd>Monitor hook enables modules to run regular/scheduled jobs
180           in the parent (root) process.</dd>
181           
182       <dt>Regular expression API changes</dt>
183
184       <dd>The <code>pcreposix.h</code> header is no longer available;
185       it is replaced by the new <code>ap_regex.h</code> header.  The
186       POSIX.2 <code>regex.h</code> implementation exposed by the old
187       header is now available under the <code>ap_</code> namespace
188       from <code>ap_regex.h</code>.  Calls to <code>regcomp</code>, 
189       <code>regexec</code> and so on can be replaced by calls to
190       <code>ap_regcomp</code>, <code>ap_regcomp</code>.</dd>
191
192       <dt>DBD Framework (SQL Database API)</dt>
193
194       <dd><p>With Apache 1.x and 2.0, modules requiring an SQL backend
195       had to take responsibility for managing it themselves.  Apart
196       from reinventing the wheel, this can be very inefficient, for
197       example when several modules each maintain their own connections.</p>
198       <p>Apache 2.1 and up provides the <code>ap_dbd</code> API for
199       managing database connections (including optimised strategies
200       for threaded and unthreaded MPMs), while APR 1.2 and up provides
201       the <code>apr_dbd</code> API for interacting with the database.</p>
202       <p>New modules SHOULD now use these APIs for all SQL database
203       operations.  Existing applications SHOULD be upgraded to use it
204       where feasible, either transparently or as a recommended option
205       to their users.</p></dd>
206     </dl>
207   </section>
208 </manualpage>