[ZODB-Dev] ZODB Experiments project at SourceForge
Shane Hathaway
shane@zope.com
Wed, 17 Oct 2001 14:33:19 -0400
sean.upton@uniontrib.com wrote:
> Slightly off topic, but I had a question regarding pma, which sounds very
> interesting...
>
> NNTP backed by ZODB? That sounds really cool; seriously, we newspaper folks
> would love to have this sort of thing, because AP online (the "online-only"
> version of the AP wire) dumps XML-formatted news stories and photos as
> attachments to news messages via an NNTP pushed feed. In the early part of
> next year, my company is planning on creating an interface to grab these
> attachments for selective import into Zope. If we could get rid of INN, we
> would!
Same here. I've had this project in mind for a while, and I finally
moved forward on it when I upgraded to Mandrake 8.1 and my INN server
broke in some way that I haven't been able to decipher. I was spending
so much time trying to fix it that I finally decided it would be more
efficient--and a lot more fun--to create my own NNTP server. It turned
out I was right. :-)
> One of the thoughts that I have always had was that NNTP was definitely a
> "queryable" protocol, almost even like SQL:
> SELECT * FROM comp.lang.python
> WHERE MESSAGE_SUBJECT LIKE "some pattern"
> AND MESSAGE_DATE="10/10/2001"
>
> If I was interested in writing a Zope DA to interact with this, I should be
> able to do this via ZEO instead of having to find an NNTP client, as long as
> I familiarize myself with the API in dbnews.py, map fields to most of the
> methods in DBArticle, and assume that if I need attachments out of the body,
> I use DBArticle.getBody(), and process the MIME attachments on my own and
> then map them like DAs that support BLOBs?
The API for queries is in nntpserver.py. dbnews.py contains an
implementation of that interface. Note that nntpserver.py does not yet
contain a complete implementation of either RFC 977 or RFC 2980, just
the subset used by Mozilla 0.9.4. The few remaining commands should be
easy to add, although they might expand the interfaces slightly.
News feeds would be a nifty way to use this project! Though I'm not
sure that the DA approach is necessary. If you need to be able to
perform unexpected queries, you might want to create "sqlnews.py", an
alternative to dbnews.py, which would store articles in an RDBMS.
Shane