Process Distribution
Grace Software
JavaLog

$Revision: 1.2 $
$Date: 1999/10/28 11:17:24 $




Introduction

JavaLog can be configured to run in different process models. This document describes three main process models that can be used in JavaLog.

Standalone

By default, JavaLog is configured to run in a single JVM and produce logging output on the standard output.

Centralized

This is also called the client/server configuration. This configuration is characterized by one ore more client applications sending their log events to a central server process that presumably combines all of the client log events into a single output. The advantage of this configuration is that the events of all of the virtual machines in the system are routed through a single application. This makes it much easier to diagnose problems and analyse an entire systems behavior.

All of the class necessary to demonstrate a simple client/server configuration are included in JavaLog. Of course, these classes can be modified or rewritten to suit the users needs. The following 3 classes implement the basic system:

Start the system like this:
$ rmiregistry &
$ java grace.log.test.centralized.Server
$ java grace.log.test.centralized.Receiver
$ java grace.log.test.centralized.Sender

In this system, the server registers itself in the rmiregistry, then the receiver looks up this server and adds itself as a Handler on the server. This makes it so the receiver will receive all events that are sent to the server. Finally, the sender looks up the server and installs a ProxyHandler to the server. This means all events logged by the sender will be automatically sent to the server. So, an event logged by the sender is first sent by the ProxyHandler to the server and then sent back to the receiver.

The Server Distributer registers itself in the rmiregistry under the name log.distributer.vmid. In fact any virtual machine where Javlog is running will register itself under this pattern if the -Dlog.server=true flag is set. The vmid is the id of the virtual machine and makes the entry in the rmiregistry unique. So, many servers in one virtual machine can register themselves in the local registry. This makes these virtual machines available so that another remote process can send events to or receive events from them.

Distributed

In this configuration, there are many logging virtual machines but no server. This is advantageous because it does not require the user to start and maintain a separatly running central server process. This system is comprised of a collection of virtual machines where each logs separately, as in the standalone case. Here, if one needs to look at the log of a particular virtual machine, one needs to either connect to that remote virtual machine with another process or save all of the log events to a file.