Developer Notes

A discussion of various issues affecting developers

About Mutual Exclusions and Semaphores

What is needed is a set of mutual exlusions that work both across processes and across threads.

APR Mutexes
These are well suited for processes spawned by a parent, but don't work well when the processes are unrelated.
POSIX mutexes
Great on most platforms, but on some platforms the mutexes can't be shared across processes. Mac OS X is an example of this. Starting with release 0.2, the configure script checks that this feature works. This is our preferred locking mechanism.
UNIX System V semaphores
This is our fallback mechanism. Doesn't work well in that you can't have semaphores local to a process that only affect the processes threads.

To get the rwlock code to compile on RH Enterprise WS 4, I had to modify the CFLAGS and CPPFLAGS as follows:

setenv CFLAGS '-g -D_GNU_SOURCE'
setenv CPPFLAGS '-g -D_GNU_SOURCE'

I don't know why I needed this. It built fine on Fedora core 4 and SuSE 10.1 without it.

Message Queues

We currently use the UNIX System V style message queues as POSIX queues aren't available on all platforms.

Tests

There are a number of functional tests in the source tree, and this list will be expanded as time goes on.

Test Descriptions

Library Build Notes

Environment Variables

During development, all libraries are built in debugging versions. As such, optimization is minimized, and debugging symbols are always included. This is done by setting the compiler switches before running configure.

setenv CFLAGS '-g'
setenv CPPFLAGS '-g'

Berkeley DB

Version notes - current version is 4.5.20

This library is used to implement the primary data store for the ARM agent. Data is stored on each individual tier. When correlating transactions across tiers, the XMLRPC interface implemented in arm4_daemon is used to query the data store.

xmlrpc-c

Version notes - current version is xmlrpc-c-1.03

This library is used to implement an XMLRPC based reporting interface. This library isn't currently used.

APR 1.1.1

Website

As of release 0.3, this is no longer required.

APR-util 1.1.2

Website

As of release 0.3, this is no longer required.

Sqlite 3.5.9

Website

Most Linux versions will include this, and will have threading support enabled, but that isn't enough. You also need to use the configure option --enable-cross-thread-connections. Without this option, you'll get error messages indicating the library routines have been called out of sequence.