Dynamic Event Handler Mapping for Software Monitoring
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Reinstrumentation of software applications for monitoring purposes incurs computational overhead and performance delays, particularly in Java Virtual Machine environments where applications need to be stopped and restarted.
Innovation Solution
Inserting an event generator with an instrumentation identifier at an instrumentation point in a target program, registering it in instrumentation records, and dynamically linking it to a variable event handler, allowing for event callbacks and data collection without requiring reinstrumentation, enabling dynamic changes to data collection without restarting the application.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Adaptability or versatility
If reinstrumentation is performed to change monitoring aspects, then monitoring flexibility is improved, but computational overhead and performance delays increase
Solution Approach 1:
The system performs preliminary action by inserting event generators with instrumentation identifiers into the target program once, and registering them in instrumentation records before execution. This allows multiple monitoring changes to be made later by simply changing event handler mappings in the records, without needing to reinstrument the program each time, thus avoiding repeated computational overhead while maintaining monitoring flexibility.
Solution Approach 2:
The system implements dynamics by making the event handler mapping dynamically variable through the instrumentation records. The mapping between instrumentation identifiers and event handlers can be changed at runtime without stopping or reinstrumenting the application, allowing flexible monitoring adjustments while the program continues to execute with minimal performance impact.
2Adaptability or versatility
If reinstrumentation is performed to change monitoring aspects, then monitoring flexibility is improved, but performance delays occur due to application restart requirements
Solution Approach 1:
The system performs preliminary action by inserting event generators with instrumentation identifiers into the target program once, and registering them in instrumentation records before execution. This allows multiple monitoring changes to be made later by simply changing event handler mappings in the records, without needing to reinstrument the program each time, thus avoiding repeated computational overhead while maintaining monitoring flexibility.
Solution Approach 2:
The system implements dynamics by making the event handler mapping dynamically variable through the instrumentation records. The mapping between instrumentation identifiers and event handlers can be changed at runtime without stopping or reinstrumenting the application, allowing flexible monitoring adjustments while the program continues to execute with minimal performance impact.
3Productivity
If dynamic event handler mapping is implemented, then reinstrumentation requirements are eliminated, but system complexity increases
Solution Approach 1:
The system uses an intermediary approach by introducing instrumentation records as a mediator layer between the event generators (inserted in target program) and the event handlers. The records store mappings between instrumentation identifiers and event handler identifiers, allowing dynamic reconfiguration without direct modification of the target program. This intermediary structure adds some complexity but enables efficient reinstrumentation elimination.
Solution Approach 2:
The instrumentation records serve multiple functions: storing event generator mappings, enabling dynamic handler assignment, and facilitating callback routing. This multi-functionality consolidates what would otherwise require separate mechanisms, reducing overall system complexity while achieving the goal of eliminating reinstrumentation requirements.
Data Source
AI summary
In one embodiment, a method is performed on a computer system comprising computer hardware. The method includes inserting, at an instrumentation point of a target program, an event generator comprising an instrumentation identifier. The method further includes registering the instrumentation identifier in instrumentation records. The instrumentation records link the instrumentation identifier to a dynamically variable event handler. In addition, the method includes, responsive to an event generated by the event generator, receiving a callback comprising the instrumentation identifier. Further, the method includes, using the instrumentation identifier, identifying in the instrumentation records the dynamically variable event handler. Additionally, the method includes invoking the dynamically variable event handler. Also, the method includes collecting data related to execution of the target program using the invoked dynamically variable event handler.


