Saturday, April 9, 2005

I wrote most of a new smtp client from scratch tu...

I wrote most of a new smtp client from scratch tutorial for Twisted a couple weekends ago. I wanted to polish it up some more before asking for comments but it doesn't look like I'm going to get to it as soon as I'd hoped. It is in the style of the Twisted from scratch tutorial, though quite a bit shorter. I still need to write an introduction and a conclusion, but I'd like to hear from people if the doc is clear and useful, and if not what I can do to improve it. I hope to be writing some more of these for various parts of Twisted in the near future, if people do indeed find them useful.

8 comments:

  1. 1. The "most minimal tac file" part looks like it says the first line is enough. It took me a while to understand it's not saying that, and I know the truth :)
    2. Also I am unsure why you use application instead of reactor!

    ReplyDelete
  2. It worries me that people need to link to doc-latest :( (My solution is to make it official.)

    ReplyDelete
  3. Perhaps you could extend it further to handle the case where a primary MX is down, and you have to fall back to a secondary? That might be a good way to introduce the handling of failures...

    ReplyDelete
  4. 1. I see what you mean. I'll rework that section a bit.
    2. applications are great. direct reactor interaction is lame. (I didn't want to introduce t.p.log)

    ReplyDelete
  5. I think I agree. There should be a distinction between the docs for the latest released version of Twisted and the latest development docs, but both should be easily accessible. I've also been thinking that doc.twistedmatrix.com would be a good thing to set up.

    ReplyDelete
  6. Good idea. I wonder what a nice way to have this demonstrated would be, though. Already the end of the tutorial is kind of lame, since it depends on a domain which does not exist and to which mail will therefore never be deliverable. It'd be nice to have the final code actually do something visible. Maybe the recipient address should be parameterized or something...

    ReplyDelete
  7. My proposed solution was slightly different, primarily because the documentation of existing functionality can significantly improve in between releases, and I don't like my chances of persuading someone to do a minor version release (especially of core) just because the docs are much better. I'll point to your comment from the bug.

    ReplyDelete
  8. Set up a magic subdomain (example.twistedmatrix.com) - it has two MXs, one of which doesn't exist, or whatever. All email to that address gets bitbucketed, or, if you're feeling especially clever, goes onto a webpage for 24 hours.

    Probably more work than you've got time for, though...

    ReplyDelete