The Artima Developer Community
Jiniology | Jini Books | Discuss | Print | Email | First Page | Previous | Next
Sponsored Link

Observing JavaSpace-Based Systems, Part II
How to Log and Analyze a Space-Based Distributed System
by Philip Bishop & Nigel Warren
October 14, 2002

Page 1 of 6  >>

Advertisement

Summary
This article, the second of a two-part series, describes the challenge of understanding and debugging JavaSpace-based systems, and presents a logging service architecture that allows you to record and analyze the behavior of such systems.

In Part I of this series of two articles, we examined how to build a simple Jini logging proxy for a JavaSpace. This technique let us log method level information to an output stream allowing us debug and get a better understanding of the flow of objects in and out of the space. For example, if a read operation had been performed where a take was expected, viewing the logging information could make finding these bugs simpler.

The simple Jini logging proxy we developed is a good starting point, but the approach is only viable for testing a single space client.

In this concluding part, we will examine how to build a full-blown Jini service to act as a centralized repository for the logging information, letting us examine method level data from multiple space clients.

JavaSpace Logging Service

In our second model, we retain the LoggingSpace interface (introduced in Part I), but we reimplement the proxy to provide its information to a remote service. To implement this we are going to design the logging service as a Jini Service.

The logging service is going to store the SpaceOperation information in a centralized repository. The repository could be a database, a file, or even another space. For simplicity, we will write the data to a CSV (comma- separated variable) file.

Figure 1 shows the overall structure of the architecture that uses the logging service.


Figure 1. A JavaSpace Logging Service Architecture.

In this second model, the logging proxy will perform two remote calls per JavaSpace method; one to the delegate space and one to the logging service. Obviously making two remote calls will slow down your system's overall performance. However, we only envisage the logging service being used for debugging or during development; that is, the service is not being used on a production system so overhead is acceptable.

Page 1 of 6  >>

Jiniology | Jini Books | Discuss | Print | Email | First Page | Previous | Next

Sponsored Links



Google
  Web Artima.com   
Copyright © 1996-2014 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us