Archive of UserLand's first discussion group, started October 5, 1998.

Re: XML-RPC Interface for Email

Author:Dave Polaschek
Posted:10/6/1999; 1:20:52 PM
Topic:
Msg #:11792 (In response to 11789)
Prev/Next:11791 / 11793

I'm with Eric here. There are multiple pieces. You could collapse them all into a single program on a single machine, and doing so in Frontier seems (at first blush) to be the simplest solution to that.

For what it's worth, here's how I'd tackle the job:

  1. Write an smtp (RFC822) server in Frontier, using the networking code that exists in Frontier today. You may be able to leverage MainResponder, but I'm not familiar enough with that to be able to say for sure. The advantage of starting fresh is that you don't have all the problems that come with a standard implementation. Sendmail is not an easy thing to configure, even if you've got a running executable. You don't have to implement relaying, or even sending initially. Just make it receive mail for starters.
  2. Write a mail-header parser to parse and store the mail using XML for all header fields, message body, and attachments.
  3. Iteratively implement an XML-RPC interface to getting to the mail (probably from another Frontier client, again to make development quick). Do you want searches based on individual fields? Probably, but maybe not out of the gate. Similar requirements will come up as you go.
  4. Now do you need to send mail? If so, hook up that part of the mail server.
  5. Identify bottlenecks in the system. Reimplement things in C or other non-interpreted, higher-performance language. For example, storing email in XML format in a Frontier object database may well overtax the db if you're handling a lot of mail. If that's the case, rewrite it (and the SMTP server you developed) in C, and connect it to a database like Oracle or Sybase.

As Eric points out, your goal is to get the XML-RPC interface spec nailed down. Rather than trying to do that first, make it part of your iteration, and do it in a language/system where iterative development is easy and quick. That says Frontier, perl or other high-level scripting-type language to me.

The main place I differ is that I'd tackle the mailserver running in Frontier first. While I think reimplementing the mailserver is a good thing, I think it's also the riskiest portion of the development plan I laid out, so I'd tackle it first. Gives more time to shake the bugs out of it, and it's useful even if you're not storing the mail in SMTP format.

-DaveP


There are responses to this message:


This page was archived on 6/13/2001; 4:52:57 PM.

© Copyright 1998-2001 UserLand Software, Inc.