Bytecode Instrumentation for Remote Method Invocation Monitoring

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing methods for monitoring and diagnosing remote method invocations in networked software applications are inadequate, as they lack application context information, cannot alter remote method invocation messages, and require access to source code or modifications, leading to poor performance and scalability issues.

Innovation Solution

A system and method for programmatically instrumenting bytecode to capture performance metrics of remote method invocations by intercepting and altering bytecode at runtime, inserting sensors to collect metrics such as bytes sent, response times, and serialization information, without requiring access to source code, and storing these metrics in thread-local storage for analysis.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If network sniffing is used to monitor remote method invocations, then performance monitoring is enabled, but application context information is lost and no trace tags can be added

Engineering Contradiction:
Improveperformance monitoring capabilityVSAvoidapplication context information
Core Design Contradiction:
Measurement precisionVSLoss of information

Solution Approach 1:

The patent introduces bytecode instrumentation as an intermediary mechanism that operates between the remote method invocation framework and the monitoring system. By inserting instrumentation code at specific bytecode locations, the system gains both performance monitoring capability and application context information simultaneously, resolving the contradiction between these two requirements.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The patent creates a copy of the bytecode with additional instrumentation instructions embedded. This instrumented bytecode copy maintains the original application functionality while adding monitoring capabilities, allowing the system to capture both performance metrics and application context without disrupting normal operation.

Inventive Principle:
Principle #26Copying

2Measurement precision

If remote management protocols are used to query performance information, then aggregated performance metrics are obtained, but source code modifications are required and metrics cannot be associated with particular transactions

Engineering Contradiction:
Improveperformance metrics aggregationVSAvoidsource code modification requirement
Core Design Contradiction:
Measurement precisionVSEase of manufacture

Solution Approach 1:

The instrumentation code is automatically injected by a bytecode instrumentation tool without requiring manual source code modifications. The system self-configures by intercepting bytecode during loading and injecting monitoring instructions at appropriate locations, eliminating the need for developers to modify source code while maintaining the ability to associate metrics with specific transactions.

Inventive Principle:
Principle #25Self-service

3Measurement precision

If manual source code modification is used to add performance monitoring, then detailed performance information is captured, but source code access is required and application downtime may increase

Engineering Contradiction:
Improveperformance information detailVSAvoidapplication downtime
Core Design Contradiction:
Measurement precisionVSLoss of time

Solution Approach 1:

The bytecode instrumentation is performed in advance by injecting instrumentation code into the bytecode before the application runs. This preliminary action allows detailed performance monitoring to be enabled without requiring source code access or modification during operation, and avoids application downtime by using pre-compiled instrumented bytecode.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent replaces the mechanical process of manual source code editing and compilation with an automated bytecode instrumentation system. This substitution eliminates the need for source code access and manual intervention, allowing performance monitoring to be enabled through automated bytecode transformation without causing application downtime.

Inventive Principle:
Principle #28Mechanics substitution (Replace mechanical system)

4Ease of operation

If remote method invocation frameworks are used, then programming complexity is reduced, but costly usage of remote invocations is not detected

Engineering Contradiction:
Improveprogramming complexityVSAvoidcostly usage detection
Core Design Contradiction:
Ease of operationVSLoss of information

Solution Approach 1:

The bytecode instrumentation acts as an intermediary layer that transparently monitors remote method invocations without affecting the simplified programming interface. The instrumentation code intercepts bytecode instructions at appropriate locations to detect and measure the cost of remote invocations while preserving the ease of use provided by the framework.

Inventive Principle:
Principle #24Intermediary (Mediator)

Data Source

PatentUS8402443B2Method and system for automated analysis of the performance of remote method invocations in multi-tier applications using bytecode instrumentation
Publication Date: 2013.03.19 DYNATRACE LLC
  • US8402443B2 patent drawing
  • US8402443B2 patent drawing
  • US8402443B2 patent drawing

AI summary

A method and system monitor and diagnose the performance of remote method invocations using bytecode instrumentation in distributed multi-tier applications. The method and system use automated instrumentation of client application bytecode and server application bytecode with sensors to measure performance of remote method invocations and operations performed during remote method invocations. Performance information is captured for each remote method invocation separately, allowing performance diagnosis of multithreaded execution of remote method invocations, so that throughput and response time information are accurate even when other threads perform remote method invocations concurrently. The captured performance metrics include throughput and response time of remote method invocation, object serialization, and transport. The performance metrics are captured per remote method invocation. Performance metrics may be sent to a processing unit for storage, analysis, and correlation.