Home of mod_example_ipc

Top
Download
Install
License
Contact

What is it?

The mod_example_ipc module showcases the use in an Apache 2.0 module of the Shared Memory and Mutex routines found in the Apache Portable Runtime. The module itself does nothing useful.

The Latest Version

Download the latest version here:

mod_example_ipc-1.0.tar.gz
MD5 (mod_example_ipc-1.0.tar.gz) = 7c5735e55d7b7a460d6d03a51b6be7d4
Details of the latest version can be found at http://www.temme.net/sander/mod_example_ipc/

Installation

There are two ways to install mod_example_ipc in your server: apxs and the build system integration using config.m4. Using apxs is the easiest. It requires perl to run the apxs script, and the same C compiler that you built Apache with. Simply run

$ /path/to/apache2/bin/apxs -c -i mod_example_ipc.c

from the module source directory. This compiles the source as a shared module and installs it under /path/to/apache2/modules.

To integrate the module, copy mod_example_ipc.c and config2.m4 to the modules/experimental directory under your Apache 2.0 source tree. Then run ./buildconf from the top of the source tree. You need to have GNU autoconf and libtool installed to do this. After this step, you can run configure and enable mod_example_ipc:

$ ./configure ... --enable-example_ipc ...

and build Apache as you normally would.

Once you build the module, you can activate it in the Apache configuration as follows:

# You only need this if you built the module as a shared library
LoadModule example_ipc_module modules/mod_example_ipc.so

<Location /example_ipc>
    SetHandler example_ipc
</Location>

Now, any call to http://yourserver/example_ipc will cause the module's handler to grab the lock, increment the shared memory counter and return a small HTML page. Run a benchmark tool with multiple parallel sessions (like ab which comes with Apache) against this URL to see the effect of the IPC.

Licensing

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Contact

This module is discussed on the Apache Modules API mailing list. You can subscribe to this list by sending e-mail to apache-modules-subscribe@covalent.net.


This page Copyright © 2004 Sander Temme