next up previous contents
Next: Redirection Policy Implementation Up: The Redirector as an Previous: The Redirector as an   Contents

Replica Database

Since Apache is a multithreaded server, any of its threads can access and modify the replica database. The problem is that the database content has to be consistent among all threads: changes made by one should be immediately visible for the others. Therefore, our database implementation should not only be accessible for multiple threads, but it should also properly synchronize all modifications of the content so to avoid race conditions. In our solution all the database structures are placed on shared memory chunks, provided by APR. In this way we ensure that it remains the same for all the threads, no matter which multithreading model is used - be it thread-based, or process-based. Access synchronization is done by means of mutual exclusion locks, also available in APR.



root 2002-08-27