This page describes all problems, tasks and solution approaches regarding tracing of method invocations that can span over multiple JVMs.
Main topics
- How to tell the method who is its caller or parent on the previous JVM.
- What should be transmitted to other agents, whole trace or just IDs?
- How to Transmit the context information?
- How can i manipulate the communication of between JVM(RPC). Is there a solution that works for every RMI implementation or even for every communication protocol?
Current solution (state)
(Previous solution approaches regarding this topic were already discussed in the master thesis.)
Currently no solution for this is in use.
New approaches / ideas
Potential solution approach for topic 3:
- Create a hash-value of the message before sending. (On which point has to be find out)
- Send the hash-value to CMR.
- On the receiving side also a hash value of the message is created and send to CMR.
- The two hash-values can be compared and when they match, the association caller-callee is created.
(Analysis)
Idea:
Place the information even before the message gets to the sending unit.
E.g.
(Probably the method signature has to be changed. Research)
Idea 2:
Sending the ID of the transaction context parallel to the communication of the monitored application.
For example use ssh tunneling to send a preparing message to the other agent. This way the receiving agent would know, that the next incoming message is in context of a particular transaction.
Maybe its possible to use the ssh tunneling to synchronize the messages and make sure, that no message goes between the "heads-up" and the actual message from the application.
(Analysis)
Idea 3:
To put a additional communication layer under all application layers to realize the inter-JVM tracking.
Could be combined with idea1. (Wrapping interface)
Questions / Possible Problems
- How can i recognize method invocations that are initiated from outside? What to do with the received transaction ID?
- How can i identify the source of a method invocation?
- How can i achieve that an caller and be uniquely recognized?
- Which communication protocols should be supported?
Is there a way, to protocol / log the serialized data transfered with RMI so that it can be used to solve problems with Data Transfer Objects?
- How to instrument classes used by the agent itself (RMI)?
- Is it possible to keep track on a transaction with JVMs that are not instrumented?
Notes:
Braindumb:
General thoughts about tracking:
- An ID can be transmitted parallel to the transaction execution.
- The inter-JVM tracing could be done without tagging, but trough characteristics (attributes) recognition.
The idea is to trace the messages between JVMs without modifying the messages themselves.
For this, each message has to be unique and recognizable. Each side would log their outgoing and incoming messages.
The trace could be then created from the logs.
(Maybe the communication protocols are already using some kind of IDs. Research if it is so and how this can be used.)
Either the caller (thread) knows who he is calling
Or the called thread knows his caller.
Or the call itself is recognized(e.g. ID).
The first point cannot be realized, since its not possible to remotely address a specific thread on a server.