Saturday, February 02, 2008

Storing MIME email in JCR with James and Jackrabbit

I read a post on the James dev list that mentioned this blog posting which goes into some detail of the method Jukka Zitting used to create a JCR message repository (using Apache Jackrabbit) for Apache James in the James sandbox. I thought this would be a good excuse to mention that work here.

I find it an exciting idea because it takes the inherently richly structured MIME messages and stores them in a way that can cope with the full richness of the structure including the mixture of content types, the recursion of nesting, and the mixture of encodings and character sets supported very well by the totally fan-bloody-tastic MIME spec. In fact JCR is much more aptly suited to storing MIME structures than a traditional RDBMS or the filesystem because it is flexible in the right ways and can also manage the metadata.

The expensive act of parsing the MIME message is only carried out once, when the message is exploded into the store, and thereafter the whole message, or just specific parts of it, can be passed around as a serialisable reference to a location rather than as unserialisable streams, or big byte[]'s.

What's more any system that can manipulate the JCR repository can become involved in the life of the messages, for example web mail stops being a web interface for traditional mail protocols and becomes a first class citizen, web applications built straight ontop of the repository.

Add Web Services and the repository can participate in CRM systems which use WS to integrate channels and systems into a single Agent Desktop and a Single Customer View.

The fact that Jukka made the James JCR repository (with an html viewer as well) in a few hours at Apachecon EU is testament to the suitability of JCR, the extensibility of JAMES and the value of the Hackathon as a tool for innovation.

Have a look at the code here or subscribe to the list to discuss it.


blog comments powered by Disqus

I know nothing, I'm not a fortune teller, and you'd be insane to think that I am. This disclaimer was cribbed from an email footer I once received. It is so ridiculous I had to have it for myself.

Statements in this blog that are not purely historical are forward-looking statements including, without limitation, statements regarding my expectations, objectives, anticipations, plans, hopes, beliefs, intentions or strategies regarding the future. Factors that could cause actual results to differ materially from the forward looking statements include risks and uncertainties such as any unforeseen event or any unforeseen system failures, and other risks. It is important to note that actual outcomes could differ materially from those in such forward-looking statements.

Danny Angus Copyright © 2006-2013 (OMG that's seven years of this nonsense)