Tom,

Storing messages in an XML backend is pretty easy actually.  We have an
interface called a MailRepository (and SpoolRepository) with 2
implementations right now ... one to the file system and one to a very
simple database table.  You could write your own implementation of
MailRepository (and maybe SpoolRepository) and store your messages in XML
however you like.  Maybe MailRepository is an abstract class you extend... I
forget now, but basically you just mimic the 2 implementations we have now
with your own implementation.  In your JAMES.conf.xml file, you would then
map xml:// to your XMLMailRepository, just like town:// is mapped to the
database one and file:// is mapped to the file one.

The multi-user issue shouldn't be very difficult... nobody has started
implementing the NNTP protocol, but I don't think this would be very hard.
The MailRepositories are already very thread-safe... people smarter than I
worked out a great key-lock system so multiple threads can't modify the same
message simultaneously.  Also there already is a simple mailing list
implementation, but this uses the user manager rather than the mail
repository (we're not storing the messages just yet... that'd be a nice
feature to add though).

Serge Knystautas
Loki Technologies
http://www.lokitech.com/

----- Original Message -----
From: "Thomas Rynne" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, November 02, 2000 8:18 AM
Subject: XML backend


> Hello,
> I've jsut come across JAMES and am thinking of using it in
> a project. I'm trying to create a server for hosting online discussion
which
> supports many protocols (web based, mailing lists, NNTP ...) but it also
> needs to store its messages as XML.
>
> I suppose I have two questions.
> How much work would be required to make JAMES store messages
> as XML files?
> Can james be setup for multi user use? ie. mailing lists, NNTP rather than
> individuals mail boxes.
>
> I have included more details if anyone is intertested.
>
> Tom
> --
> I've just graduated (Computer Science) and enjoyed my 3rd year
> project so much that i want to continue it. My project essentially solved
> two problems:
> - The archive created once a discussion forum (mailing list,...)
> has existed for a while becomes a mass of messages,
> which are largely quotes and difficult to navigate
> through.
>
> - Discussion forums are often fragmented by protocol which seems
> an odd way to separate people with common interests.
>
> I implimented a discussion server in java. Think of it like a
> news server. However, it was protocol independent. I wrote a
> different class for each protocol but all classes used the same
> class to store there messages. I only actually implimented NNTP
> and HTTP. So there was a server you could connect to and browse
> with your news reader or web browser. This solved the second
> problem.
>
> The class which stored the messages actually stored them as XML.
> As messages came in they would be parsed and converted to a
> simple MessageDTD I wrote. The parser also looked for lines
> beginning with '>'s and tried to store these fragments of the
> message as quotes, referencing the source message.
> eg.
> blah blah blah here is some text
> <quote level="1" src="[EMAIL PROTECTED]#paragraph(2)">
> this is a quote from a message
> </quote>
>
> The XML messages were converted to the format required by the
> protocol using XSLT and in the case of the HTTP interface quotes
> would be marked up with HTML as links to their source document.
> Thus, the mess of messages was given a more meaningfull
> structure (the first problem).
>
> The next step in terms of functionallity is adding more protcols (IMAP,
POP)
> and better parsing to improve the quote finding success.
>
> However, my project was unreliable and didn't scale. I've realised I
should
> have built on existing systems. This is what
> I'm trying to do now. I want to know if I can use james as the
> presentation layer. I can then get on with parsing messages
> trying to find good ways to mark up the messages.
>
> I'm also interesed in using cocoon to convert the messages
> from XML to rfc822 and other formats. using cocoon would speed
> up browsing the archive over the web because of its caching.
> This was one of the big problems I encountered
>
>
> ______________________________________________
> FREE Personalized Email at Mail.com
> Sign up at http://www.mail.com/?sr=signup
>
>
> ------------------------------------------------------------
> To subscribe:        [EMAIL PROTECTED]
> To unsubscribe:      [EMAIL PROTECTED]
> Archives:  <http://www.mail-archive.com/james%40list.working-dogs.com/>
> Problems?:           [EMAIL PROTECTED]
>
>



------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Archives:  <http://www.mail-archive.com/james%40list.working-dogs.com/>
Problems?:           [EMAIL PROTECTED]

Reply via email to