I've been a zone leader with DZone since 2008, and I'm crazy about community. Every day I get to work with the best that JavaScript, HTML5, Android and iOS has to offer, creating apps that truly make at difference, as principal front-end architect at Avego. James is a DZone Zone Leader and has posted 638 posts at DZone. You can read more from them at their website. View Full User Profile

Chronon 2.0: Pushing the Boundaries of Logging

09.14.2011
| 9723 views |
  • submit to reddit

Since Chronon Systems unveiled their time travelling debugger concept, I've been inspired by the innovations that the team are bringing to Java developers everywhere. The latest offering from Chronon will make you rethink logging, and could have a huge impact on your productivity. I met with Prashant Deva, Founder and CTO of Chronon Systems to find out more. 


DZone: What's new in Chronon 2.0?

Prashant Deva:
Well this is actually the 3rd milestone for our company. With Chronon 1.0 we reinvented the debugger to allow debugging complex, long running programs of 2011. With the Chronon Recording Server, we allowed the Chronon Recorder to be used and managed remotely, thus turning Chronon into a 'DVR for Java'.

This time we thought of tackling logging, which is a fundamentally broken but the only real way to debug long running programs right now (if you are not using Chronon, that is).

Its fundamentally broken because you are essentially trying to predict errors in advance, and as we all know errors occur where we least expect them, so they are usually never where we put a log statement. Not only that, logging clutters up your code and is a huge distraction from actual coding.

Continuing our tradition of breaking rules and creating mind boggling stuff, with Chronon 2.0 we are introducing a groundbreaking technology called 'Post Execution Logging'.

Post Execution Logging allows you to add logging after the execution of your program. Yes, you got that right. Now you can go ahead and remove all that logging code cluttering up your business logic. When you are done executing, you can open the recording in Chronon and add logging to any statement in the program anywhere. You can even access full state in those logging statements, like say 'print this.user.name'.

Then when you are ready you can tell Chronon to execute those statements and you will instantly see the results. All the logging statements will apper instantly in the correct order containing the value of the correct state, just like if you had put those logging statements in your program when it was actually running.

And of course, in true Chronon time travel fashion, clicking on a line of log output will take you instantly to the point in time when that statement would have executed and you can see the full state of your program and even step back/forward through execution to quickly find the root cause of your issue.


DZone: Can you share some secrets about how you add logging after execution? That sounds crazy!

Prashant Deva: You bet! If it wasn't crazy enough we wouldn't deem it worthy enough to put it in Chronon ;) Well the way to think about it is like this:

Since Chronon records the entire execution of your program and we have this very powerful 'query' engine on top of it, we know the exact state of your program at all points in time. We even know exactly which statements were executed and in which order they were executed.

If you combine those two facts, the order of execution of each statement and the knowledge of program state at all times, you will see that what we are essentially doing can be generalized as a form of a database query. A very complex and custom query but a query nonetheless.

DZone: Has it caused any major architectural changes? Have you have any challenges when developing it?

Prashant Deva: The recorder and thus the recordings remain unchanged, so this is fully compatible with recordings made from Chronon 1.x.

That said, a big challenge for us was getting the UI to be seamless and easy to use and making the functionality itself scalable. So if you have a really large recording and you put your logging statement in a method that is called  thousands of times, your UI wont freeze up. We also try and use all the cores in your system, to get you the log results instantly.

DZone: What has the feedback from Chronon users been like?

Prashant Deva: So far it's been phenomenal! Right after we released Chronon 1.0, we kept getting request from users for a good solution to record on remote machines. That's how the Chronon Recording Server was born, and it has seen bigger uptake than even the Time Travelling Debugger.

Since v1, we have made 9 updates to just Chronon itself, adding things like keyboard shortcuts, reflection support, dynamic proxy support, Solaris support and a whole bunch of other goodies based on user feedback.

So that's 2 products and 9 updates in 6 months! We want Chronon to be the most agile company out there.

DZone: What's coming up in the future?

Prashant Deva:  For one, we will continue pushing out rapid updates to Chronon, also you are going to see some major performance improvements to the Chronon Recorder.
As far as root cause detection and UIs go, as you yourself said, the things we have done so far are nothing short of mind boggling and sound downright crazy.  We think we are onto something huge here and what you see with the Time Travelling Debugger  and   Post Execution Logging is only scratching the surface of what we can do with all this runtime data.  Expect to see more crazy, never seen before things coming out of Chronon!

DZone: How can existing users or users who previously tried Chronon can get hands on the latest release.

Prashant Deva: For existing users with a subscription, they get the upgrade for free. They just need to update their Eclipse plug-ins.

For people who previously tried an evaluation of Chronon 1.x and your trial has expired, you can go and download the new Chronon 2.0 and you will get another 30 days of free trial!