Skip to content
leithaus edited this page Sep 13, 2010 · 3 revisions

Welcome to the XTrace wiki!

Motivation

Message-passing concurrency is actually quite hard. It’s very easy to get into race conditions and deadlocks. One approach to this problem is to analyze traces for properties. How to do this in today’s ecosystem of tools and technologies?

Approach

It turns out that XML validation is a poor man’s model checker. With this idea in mind then a property (or collection of properties) that might be used to probe a trace is a(n XSD) schema and a trace is an XML document. So, what we build is

  • a trace monitor
    > message-passing components log messages with the trace monitor
    > the interface to the trace monitor is functional (really it should be transactional, but that’s a longer story)
  • a trace validator
    > the trace validator is given an XSD schema with which to probe a given trace
    > it will return true or false and display an explication of why the trace does not exhibit the property

Caveats

This is a toy. It is not production code. It’s just a sketch of an idea that might be fun for someone to play with and make into something more real. The pom.xml currently uses a privately held snapshot of Scala 2.8. However, there should be no reason why this won’t compile on Scala 2.75 – 2.77. If you roll back the scala version be sure the remove the delimited continuations dependency in the pom.xml file.

A trace of XTrace

Another kind of trace: a chat with Tony Garnock-Jones (of RabbitMQ fame) about intended use of XTrace