mod_example_ipc 1.0 review

Download
by rbytes.net on

mod_example_ipc is an Apache module that showcases the use in an Apache 2.0 module of the Shared Memory and Mutex routines found in t

License: The Apache License 2.0
File size: 5K
Developer: Sander Temme
0 stars award from rbytes.net

mod_example_ipc is an Apache module that 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.

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.

Requirements:
Apache 2.x

mod_example_ipc 1.0 keywords