Article View: news.software.nntp
Article #11306Re: ANTP Specification
From: Bryan Ogawa
Date: Tue, 01 Oct 1996 00:00
Date: Tue, 01 Oct 1996 00:00
345 lines
15930 bytes
15930 bytes
elcabalero@aol.com (The Gentleman) writes: >bkogawa@primenet.com (Bryan Ogawa) wrote: >}elcabalero@aol.com (The Gentleman) writes: >}>bkogawa@primenet.com (Bryan Ogawa) wrote: >}>}elcabalero@aol.com (The Gentleman) writes: Yes, we've been having this discussion for a while. [...] >}What would you think of divorcing ANTP completely (or almost completely) >}from the actual transport protocol, by specifying the way that files are [...] > With reservations, it sounds good. The less tied to other protocols it >is, the better it can adapt. The hard part is going to be figuring out what >assumptions it can do without. True. >} >}I have some ideas on how to make the client more complicated so that you >}can use ftp without any assumption that it will do anything reasonable if >}the same file is uploaded twice. >} > Just what I need, the client to be *more* complicated. You do realize I >have to write the first one, don't you? ;) Hey... if you keep going like this, someone will write six variants for you! (That's kinda what I meant when I said that it might give other people ideas. :) ) Seriously--the protocol as it stands would not be horribly difficult to write in perl--probably 8 hours of work for an alpha, or less. :) [...] >}Yeah, mostly true, I admit, but why not allow CH's to use authentication >}at their own option? > You're right. Leave open the idea of a smart CH that can force client >authentication, as well. And, at the same time, the possibility of a group >archive. Lot of possibilities, since it's on a web server anyway. Yup. I think that you should start out with authenticating CH's to avoid the forgery problem, as well as unwanted reader-only clients. >}> However, if it does prove to be a problem, I think it likely CH >operators >}>would say to hell with the spec, and use a more selective access model. >} >}Yes. :) >} > So why not write it in at the beginning, is what you're saying? Okay, >okay, but why anyone would be so paranoid as to think people would abuse the >net is beyond me. ;) That is what I'm saying, and you know why, I'm sure. :) [..] >}I believe there is an upper limit on Message-ID length as it is. However, >}I think that there is a way to store the files without needing to worry >}about message-ID length, about what happens when two clients upload at the >}same time, or about illegal characters in message-IDs. What about each >}client (a) uploading articles to a separate, private area (based upon some >}agreement with the CH), and (b) uploading an index of the files it sent >}after it finishes transmission? The index would contain a message-ID and >}pathname, like so: >} >}<199609302004.NAA05727@foo.primenet.com> bkogawa/199609301533/file000001 >}<199609250959.CAA07754@foo.netvoyage.net> bkogawa/199609301553/file000002 > I'd think a separator such as a ',' would be good. Makes parsing lines >with unpredictable lengths much easier. I would recommend using one ' ' (space) as the separator, since it's slightly less likely to appear in a Message-ID or filename, but that's just me. :) >}[the rest of the entries look like this, too] >} [EOF] >} >}(that's the literal letters '[EOF]' at the end of the file, preceded by a >}tab.) >} >}This means that in the directory bkogawa/199609301533, file file000001 is >}the message with ID (well, you can see it). >} >}The uploaded indexes are saved to their own special subdirectory. The >}client is responsible to download all of the new index files it finds in >}this subdirectory. The [EOF] is there so that the client can tell if the >}other client is finished uploading any particular index file--if it >}hasn't, it either ignores it or marks it to be re-checked the next time it >}runs. No file is ever written twice. The client uploads the index AFTER >}it has uploaded the articles, so there's no way for another client to find >}message-ids and filenames for articles that haven't been uploaded yet. > Which means no unpredictable results if a client tries to download a >half-uploaded article file. I just thought of that, looking at this. New >directories for every session seem like kindof overkill, since you'll never >need to list them anyway. The major reason for that is because that way, the client never has to remember which filenames he has already used. Clients which do remember can continue to use the same directory. It's expected that clients can create directories at will. [...] >}Disadvantages are: >} >}a) it somewhat presumes an implementation with a heirarchical file system >}(e.g. directories and files and subdirectories), although it might be >}possible to make a non-heirarchical implementation (just probably not over >}ftp--imagine a server which accepts commands like "uploading new index >}file", or "download all index files since <date>"). > Definitely possible. I don't want to assume them at the beginning, but I >won't exclude them. And it doesn't assume a heirarchal structure neccesarily: ><199609302004.NAA05727@foo.primenet.com>,cgibin/antp?bkogawa+file000001 ><199609250959.CAA07754@foo.netvoyage.net>,cgibin/antp?bkogawa+file000002 > See what I am saying? very nifty. One thing is that the client may need to be able to determine the (possible) difference between upload and download directory paths. This could present a problem, but shouldn't be horribly hard to do (maybe just a configuration option?) [...] >}Other advantages: >} >}a) The reaper (program that expires old articles and possibly rewrites >}indexes) can be a remote client, just like all of the other programs (this >}is actually true of your proposed solution, too). Then the CH just has to >}provide disk space and access. > I was assuming that housecleaning would be done by a client. In the >future, it could be done by a smart CH. For now, it's better to be able to >assume that the CH is just a dumb server, with no special capabilities. Yeah. This works well, I think. [...] >c) The client can work off of specific URL's for everything but the index >directory listing. That means a major increase in speed. In the future, even >that could be done by a 'smart' CH. Since a smart CH is probably going to just list the directory anyway, it's not a big savings. >d)Three or four articles could be transferred simultaneously, so that you get >full use of the available bandwidth (probably over a modem connection), and >don't waste huge amounts of time waiting for HTTP connections to be >established. At peak periods, it can take close to a minute before the actual >files start coming back after a GET, this helps you keep it from being wasted. > That's why Web browsers usually run four simultaneous connections. >} >}[...] >}>}>The CH must be capable of handling 'collision' between two clients >}>}>attempting to upload the same article simultaneously by generating >}>}>an error and refusing the duplicate article. >}>} >}>}This is a major concern, as I believe that most current ftp servers do not >}>}do this by default (e.g. simultaneous uploads produce no warning and may >}>}produce various unexpected results). Solving this problem, if it exists, >}>}will rest upon the writers of ftp servers. >} >}> Which is why I was specific about mentioning it. At least a few FTP >}>implementations do create errors on collision, many others would simply >}>overwrite the file that arrived first. This section probably needs a little >} >}The second is the behavior I expect, which may or may not be a good thing. >}What happens if one client starts uploading, then the second starts >}uploading and finishes, then the first client finishes? > Yick. No way to predict, every FTP server might handle it differently. >Some might not handle it the same way every time. Some might even fall down >and go boom. Yup. I have learned that file locking in Unix is nasty, ad-hoc, untrusted, untrustworthy, and non-portable. If you don't need it, don't use it. :) >} >}[...] >}> I may try to look at multiple directories, but this opens another can of >}>worms. >} >}Yes, I guess it does, but I think it's worth it, since you can then ignore >}the collisions issue. > Yeah, it solves more problems than it causes. It requires a very special >client for housekeeping, but that's doable. You'd be surprised, though, how easy it might be to write such a client. And if you do have more features on the CH (like the ability to run perl scripts) it is nearly trivial. [...] >}Yes. Have you considered something akin to the Path: line, except with >}email addresses? E.g.: >} >}X-ANTP-Path: <bkogawa@primenet.com><elcabalero@aol.com><tale@uu.net> >} >}And just have the clients append themselves to the header whenever they >}handle the article? >} > That was why I specified that the Break: header must be last. But that >won't ensure that the ones above are in the right order. Why not use what you >suggest above, but append the actual path to it? Prepend it. Whatever. That >kills two birds with one stone, and more accurately reflects its real course. Hm. An idea. The cases that might be hard to work with is something like this: poster->nntp->nntp->nntp->uucp->nntp->antp->antp->nntp->nntp->antp->antp->nntp There should be a way to determine where the antp posters stood in the chain. The problem is that email addresses might not be pretty in the Path: line (otherwise I might just suggest that). The other issue, of course, is that newsreaders might not trust the original path line to be truthful. So it is a good idea to preserve the Path: line somehow. Maybe like this: Path: nntp.primenet.com!news.foo.bar.com!nntp.foo.edu!notformail When I download the article and put it on the ANTP site, I add: X-ANTP-Path: <bkogawa@primenet.com>!nntp.primenet.com!news.foo.bar.com! nntp.foo.edu!notformail (note this would be one line) If someone else posted it back up, it'd be: X-ANTP-Path: <tale@uu.net>!<bkogawa@primenet.com>!nntp.primenet.com! news.foo.bar.com!nntp.foo.edu!notformail But the Path: header would become naked. Potential problem--do some news servers use Path: to reject duplicate articles based upon transferring site (e.g. themselves?) vs. Message-ID? I know cnews uses Message-ID, and I think INN does as well. [...] >}OK. This makes sense. I hope this round of suggestions is in line with >}this philosophy. >} > Yeah, it allows for smart CH's, but only assumes the client is. That is >definitely better, allows more room for improvement. Without having to chase >down a few hundred or more client users. Yes. I think it's important that the default be "deny clients access to CH" so that they are required to do a positive thing (beg CH admin for access) to get access. Especially since they can probably: a) forge posts via this mechanism b) destroy the entire contents of the CH c) get the CH admin in trouble > A good one. I'll still keep the X-header format, though. No guessing how >many different CH's and clients a message might pass through. Unique headers >are worth the effort. No need to stomp the Posting-Host and Org lines, for >any of the stages. Might need them for tracing. Yeah, that's a good idea. Another suggestion: X-ANTP-Saved-<client-ID>: <put whole header here> X-ANTP-Saved-<client-ID>: <put whole header here> X-ANTP-Saved-<client-ID>: <put whole header here> X-ANTP-Saved-<client-ID>: <put whole header here> [as many times as needed] Example: X-ANTP-Saved-<bkogawa@primenet.com>: Organization: Primenet X-ANTP-Saved-<bkogawa@primenet.com>: NNTP-Posting-Host: usr01.primenet.com X-ANTP-Saved-<bkogawa@primenet.com>: Sender: bkogawa@primenet.com I believe that user-generated headers can appear multiple times in a single message. [...] > With all the time I spend in nanam, I know that if I leave wide-open holes >for the spammers, spewers, and forgers, they'll take full advantage. And spew >is a bad thing. Most of the time, the first person to notice client spew >would be the person operating the client. He's probably reading news while >the client is adding to it. And he isn't going to be happy about it, that's >his favorite group he just filled with junk. Both good points. [...] > I used HTTP for downloading because it places an absolute minimum of >burden on the system. FTP got in there because things like a directory >listing would require a smart CH without it, and HTTP uploads are unproven. >Eventually, everything could be done by HTTP. Tying an experimental protocol >to an experimental protocol didn't seem to be the wisest move, right now. No, but allowing for its future existence does seem wise. :) [...] > I'll ditch the simultaneous uploads. To many ifs. And explicitly leave >open the idea of HTTP uploads, that opens a lot of potential avenues. Good. While you can expect admins to do some things to help, installing a new ftp server is probably not one of them. :) [...] > Yeah. But right now it depends on there being servers that are wide-open >to reading. Those will be getting less and less common, as they are being Actally, what I was thinking about was using suck to provide the news server half of ANTP--making it that much easier to code. The other thing you could do is ship rpost bundles of the articles around the internet to people with personal news servers. :) >heavily used for binaries, and costing a fortune in bandwidth. And it doesn't >really allow for separate users to pool their efforts. Although I have a >Windows background, I'm trying to avoid making this OS specific. I jump >through enough hoops because protocols assume a Unix system. Things that you >can do with a simple shell script in Unix can take a major effort in Windows. [...] Yes. I think that building an ANTP client under Unix would be much easier than under Windows. Have you looked at getting perl for Windows and using that? perl provides some very nice features perfect for this sort of thing (like '($message_id, $path) = split(/\s+/);', which would take care of the possibility of arbitrary numbers of spaces between the message ID and the path :) ) I think that Windows clients are a partially good thing (any reasonably clueful person could improve their feed if they can find a willing CH), but two disadvantages are that it's much harder to write such a beast in windows, and that making a client easier to use may allow people who are less knowledgeable about news to use it. Using perl for windows may address those concerns (while possibly adding the problem that it raises the bar excessively). -- bryan k. ogawa <bkogawa@primenet.com> <bkogawa@netvoyage.net>
Technical Details
Message-ID:
<52rsuq$39k@nnrp1.news.primenet.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mailReferences:
<52mm8p$54d@library.airnews.net> <52nboh$ork@nnrp1.news.primenet.com> <52nipe$55s@library.airnews.net> <52pl7q$s20@nnrp1.news.primenet.com> <52q11g$v2c@library.airnews.net>Show Full Headers
Complete Article Headers
Message-ID: <52rsuq$39k@nnrp1.news.primenet.com> Subject: Re: ANTP Specification Date: Tue, 01 Oct 1996 00:00:00 +0000 From: bkogawa@primenet.com (Bryan Ogawa) References: <52mm8p$54d@library.airnews.net> <52nboh$ork@nnrp1.news.primenet.com> <52nipe$55s@library.airnews.net> <52pl7q$s20@nnrp1.news.primenet.com> <52q11g$v2c@library.airnews.net> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail X-Deja-AN: 186528328 Organization: Primenet Services for the Internet X-posted-by: bkogawa@206.165.5.102 (bkogawa) Newsgroups: news.admin.net-abuse.misc,news.admin.misc,news.software.nntp