cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dan Diephouse" <>
Subject [slightly offtopic] SXC - simple xml compiler
Date Sat, 24 Mar 2007 21:06:41 GMT

Since we're talking about service routing currently, I thought I would bring
up SXC - which is a project I started recently.  From my blog entry:

The core of SXC is an API which allows you to declaritively say what type of
XML you're expecting to be parsing or writing. You can then attach actions
to perform when you encounter/write that xml. For instance, you can say I'm
expecting the "customer" element and I want to do "new Customer()" when I
get there. It will then compile an optimized XML parser for you.

SXC includes 3 frontends in addition to its core APIs, and these are
probably what you really care about:

   - JAXB <>: SXC uses the JAXB annotations
   to drive compilation of an optimized parser/writer for you *at
   runtime. * Why would you do this? It is 2-3x faster on the reading
   side, and about 20-90% faster on the writing side of things. (See below for
   more important details). We do not claim JAXB compliance yet, but we support
   most common JAXB functionality. It has been tested with both
   XFire <>. Note: we aren't trying to replace
   the JAXB RI here, we're augmenting it. You still need to use XJC to compile
   your schemas and keep the RI around at runtime.
   - XPath <>: SXC can compile down XPath
   expressions and build an *optimized streaming xpath parser* for them.
   Through an XPath event API, you can listen for multiple events as you scan a
   document. Currently we only support a vey limited subset of XPath
   expressions, but my hope is it will grow significantly as time goes on. On a
   VERY ROUGH test (did I mention this was very rough?) it performed about 100x
   faster than Jaxen for repeated evaluations on a DOM with expressions like
   - Drools <>: Now that we have a
   streaming XPath parser, whats the next logical step? Efficient content based
   message routing using rules! Through Drools and SXC you can create a very
   efficient XPath based message router. Rules will fire as your XPath criteria
   are met and you can take action. I'm sure there are many other uses for
   Drools+XPath, but this is one at the forefront of my mind.


Some links:

My goals in relation to CXF are:
a) Allow use of the JAXB runtime for even faster services
b) Allow the streaming XPath compiler for service routing

- Dan

Dan Diephouse
Envoi Solutions |

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message