Download presentation
Presentation is loading. Please wait.
Published byKayli Nott Modified over 9 years ago
1
Distributed Logging in Java with Constrained Resource Usage Sunil Brown Varghese, Daniel Andresen Dept. of Computing and Information Sciences Kansas State University
2
Overview Introduction to Logging Distributed Logging Distributed Logging with RMI Conclusions
3
Introduction Everyone logs in one way or other… print(), out, System.out.print() are examples of console logging Large systems like aircraft monitoring systems, transaction–based financial processes may log into multiple targets
4
Advantages of Logging Feedback to developers during development cycles Provide system diagnostic alerts from production systems Provide information for statistical analysis of working of a system Delivery based on levels of importance could improve efficiency in development cycle
5
Logging options The Log4J Project Logging Toolkit for Java from IBM Java 2 Standard Edition (v1.4.0 onward)
6
Distributed Logging
7
Log4j has good support for sending log messages to multiple log servers by TCP/IP socket connections J2SE provides the Java Logging framework by default and supports distribution of log messages by socket connections (though listeners are left to the developer)
8
Java Logging Framework
9
Observation effects the Observed If generated at a high rate, distributed log messages may swamp the processor and the network connections whereby decreasing system performance and the accuracy of the log analysis Solution: Limit the use of distributed log messages to critical and non-repetitive sections of code and buffer messages
10
Distributed Logging with RMI Transmission of Log messages with RMI calls allows the log objects to be recorded at remote sites as is Log messages may be modified easily ( say based on network load, exception objects may be removed from log)
11
Representation
12
Extending the Java Logging Framework RMI Handler extended from Handler class ensuring compatibility with Logger and security in-built into Java Logging The logging levels may be varied dynamically against bandwidth usage by providing level information in an XML file
13
Class View – Client Side
14
Class View – Server Side
15
Sample Levels.xml file 1600 1400 1200 1000 800 600 500
16
RMI Log Server Instantiates a logger and assigns the RMI Handler and other Handlers based on an XML file Server binds to the specified machine and port (binding data from input XML file) This framework allows a chain of RMI Servers to be formed connected by RMI Handlers in a tree fashion
17
Bandwidth Computation TCP/IP based weighted average method is used to update bandwidth Bandwidth is sampled for a Sampling Time and it is reset for a fresh start If there is no bandwidth updates for an Inactivity Tolerance period, the Bandwidth is reset
18
RMI Log Buffer The RMI Handler may buffer the log messages so as to reduce the number of RMI calls needed. This could dramatically raise the efficiency of transmission The RMI Buffer ensures message transmission under normal RMI Handler operation and abnormal termination
19
RMI Log Server GUI The GUI connects to RMI Log Server and provides time graphs of bandwidth statistics The cutoffs along with bandwidth variance are shown
20
RMI Log Server GUI
21
RMI Log Server GUI Connection As there isn’t a unique naming scheme for RMI Handlers connected to a logger, the URL and port information is used as RMI Handler identifier
22
RMI Log Server GUI Connection
23
Limitations / Assumptions Leveling thresholds at the RMI Handler level are to be set intuitively by the user Log message sizes were taken as constants for testing purposes The overhead of making an RMI call is heavier than sending data through TCP/IP sockets
24
Conclusions RMI Logging allows the recreation of log messages in remote sites as long as all sub-components are serializable Allows the exception objects to be stored in remote repositories RMI Handler can monitor its bandwidth usage and discard log messages of low level
25
Future work RMI Handler may maintain a server list so that if one RMI Log Server fails, it retransmits to secondary servers The GUI interface can be developed further to remotely control RMI Log Servers
26
Questions ?
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.