Server Mode in the Chronon Recorder
This week we released Chronon 1.5. The big feature of this release is the inclusion of 'Server Mode' in the Chronon Recorder.
What is the Server Mode?
The Server Mode is designed to allow the Chronon Recorder to be controlled through the Chronon Recording Server.
It includes features such as:
- Ability to do dynamic start/stop of the recorder in a running program
The recorder can stay dormant in your program unless explicitly started from the Recording Server UI. - Ability to record long running programs.
- Ability to split a recording based at a time interval or when the physical size of the recording gets too large.
- Ability to dynamically modify the set of classes that are being recorded in a running program.
Thus, you can start recording with say include=com.package1.** and later decide to recorder com.package2.**. All this without the need to stop the program.
Future directions
With the addition of the Server mode in the recorder, we now have 2 distinct modes for the Recorder:
- Developer Mode
- Server Mode
The developer mode is the one you are probably familiar with as that is what is used when you record using the Chronon Eclipse plugin. It records the entire program from beginning to end and is meant for short running programs, as is common in development scenarios.
Moving forward we will probably have each of these 2 modes optimized for their specific use cases. There are a lot of optimizations that we want to put in the Recorder that will add a bit of overheard to the instrumentation time. While this is acceptable for long running server programs, it is not as useful if you are going to run your program for only a few minutes from within eclipse.
A good analogy is the server and client jvms. While the client jvm is optimized for quick startup and does less optimization, the server jvm is meant for long running programs and does a lot more aggressive optimization.
We will keep you posted on the specifics of how we proceed with putting optimizations/features in each of these modes of the Chronon Recorder.
Choosing what to record - Part 2: Configuration
As described in the previous post, the Chronon recorder allows you to choose what to include and exclude from recording. We really wanted to keep any sort of configuration required to use Chronon to an absolute minimum. After all who likes to go through boring manuals reading about all the various configuration parameters.
Even though the recorder and debugger allow and fully support method level selection of code, for the sake of simplicity of configuration we decided to allow only class level granularity for choosing which code to include/exclude from recording. We have seen that this suffices for almost all situations. If this does become an issue and lots of people do need method level granularity we will allow config file support for it in the future. You can read more about configuration details here.
All that said, as far the Eclipse plugin is concerned we really wanted people to just install Chronon and hit the 'blue' record button without worrying about any kind of configuration details. To achieve this, the eclipse plugin needs to select the right set of classes to include/exclude so that the debugger works as the user expects, right off the bat. The eclipse plugin makes the selection of classes to include/exclude by default as follows:
- All classes in the src folders of the project being run and its dependent projects are included.
- Classes in libraries of the projects, including JDK classes are not included.
Thus the plugin will include all the classes in 'your' code however it will exclude all the classes in 3rd party libraries. This way we achieve the initial goal of the include/exclude mechanism in the first place which is to record only relevant pieces of code and leave out all the code that you dont care about, which usually resides in 3rd party libraries.
However we knew that default mechanism wouldnt work for everyone and some people might want to include some libraries to record or might want to exclude some of their own code from recording. So we put in UI mechanisms while allow you to easily choose what to include/exclude from recording.
The include/exclude of classes can be configured in 2 places:
- Launch Configuration
- Project Configuration
Launch Configuration
You can choose the include/exclude classes per launch configuration. Note that if you choose to configure include/exclude here, it will override any similar setting in project configuration.
That is, the include/exclude config, if defined in the launch config, will be the only one used for that launch.
Project Configuration
We even allow configuration per project. The automatic tab allows you to visually select which classes to include/exclude. Note that this tab doesnt show any libraries your project uses. This is intentional since this tab really is all about 'simplicity'. If you want to include libraries or some weird pattern, you can click on the 'manual' tab and specify the exact patterns to include/exclude whatever you want.