Failsafe mechanism for dynamic instrumentation of software using callbacks
First Claim
1. A computer-implemented method, comprising:
- at an application server, establishing a persistent connection between a socket of the application server and a socket of a computing device;
receiving a request at the application server to add temporary dynamic instrumentation to an application at the application server, the request is received from a computing device via the respective connection;
with the request to add the temporary dynamic instrumentation, receiving a request to establish a callback to the computing device;
in response to the request to add the temporary dynamic instrumentation, adding the temporary dynamic instrumentation to the application during a runtime of the application;
in response to the request to establish the callback, monitoring the socket of the application server to determine if the persistent connection is unexpectedly lost, the monitoring is performed by code at the application server; and
if the callback determines that the persistent connection is unexpectedly lost, restoring the application to a state which does not comprise the temporary dynamic instrumentation, wherein the callback determines that the persistent connection is unexpectedly lost by determining that the socket of the application server generates an event indicating that the persistent connection is unexpectedly lost.
2 Assignments
0 Petitions
Accused Products
Abstract
A failsafe mechanism for installing and removing temporary instrumentation during a runtime of an application. Initially, an application is configured with a baseline set of instrumented components such as methods. Additional instrumentation is then deployed in the application, such as to diagnose a performance problem. The failsafe mechanism ensures that the additional instrumentation is automatically removed, even when there is an interruption in a communication link to the application, a computing device failure, a software failure, or some other type of failure, which renders it impossible to manually roll back the instrumentation from a remote user interface. The failsafe mechanism can be provided using callbacks between the computing devices which detect when a connection is unexpectedly lost or closed. Termination of one callback can cascade to one or more other callbacks. The instrumentation rollback can involve reloading un-instrumented byte code of the application.
64 Citations
17 Claims
-
1. A computer-implemented method, comprising:
-
at an application server, establishing a persistent connection between a socket of the application server and a socket of a computing device; receiving a request at the application server to add temporary dynamic instrumentation to an application at the application server, the request is received from a computing device via the respective connection; with the request to add the temporary dynamic instrumentation, receiving a request to establish a callback to the computing device; in response to the request to add the temporary dynamic instrumentation, adding the temporary dynamic instrumentation to the application during a runtime of the application; in response to the request to establish the callback, monitoring the socket of the application server to determine if the persistent connection is unexpectedly lost, the monitoring is performed by code at the application server; and if the callback determines that the persistent connection is unexpectedly lost, restoring the application to a state which does not comprise the temporary dynamic instrumentation, wherein the callback determines that the persistent connection is unexpectedly lost by determining that the socket of the application server generates an event indicating that the persistent connection is unexpectedly lost. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10)
-
-
11. A computer-implemented method, comprising:
-
receiving a request at a first computing device from a second computing device, the request identifies an application server and comprises a directive for adding temporary dynamic instrumentation to an application at the application server; in response to the request, implementing a timer, establishing a first persistent connection, which is between a socket of the first computing device and a socket of the application server, and providing, from the first computing device to the application server via the first persistent connection, the directive to add the temporary dynamic instrumentation to the application, and a request to implement a callback to the first computing device, the callback monitors the socket of the application server to determine if the first persistent connection is unexpectedly lost, wherein the callback determines if the first persistent connection is unexpectedly lost by determining if the socket of the application server generates an event indicating that the persistent connection is unexpectedly lost; and upon expiration of the timer, if the first persistent connection is not unexpectedly lost, providing a request to the application server via the first persistent connection to restore the application to a state which existed before the temporary dynamic instrumentation was added. - View Dependent Claims (12, 13, 14)
-
-
15. A computer-implemented method, comprising:
-
receiving one request at an application server to add temporary dynamic instrumentation to an application at the application server, the one request is received from a computing device via one connection between the computing device and the application server; in response to the one request, adding the temporary dynamic instrumentation to the application during a runtime of the application, and implementing one callback to the computing device via the one connection, the one callback determines if the one connection is unexpectedly lost using code which monitors the one connection; after the temporary dynamic instrumentation is added to the application, receiving an additional request to add additional temporary dynamic instrumentation to the application, the additional request is received at the application server from the computing device via another connection between the computing device and the application server; in response to the additional request, adding the additional temporary dynamic instrumentation to the application during the runtime of the application, and implementing another callback to the computing device, the another callback determines if the another connection is unexpectedly lost; and in response to the another callback determining that the another connection is unexpectedly lost, and the one callback determining that the one connection is not unexpectedly lost, restoring the application to a state which does not comprise the additional temporary dynamic instrumentation, but which does comprise the temporary dynamic instrumentation of the one request. - View Dependent Claims (16, 17)
-
Specification