Article View: news.software.nntp
Article #11254Re: ANTP Specification
From: Bryan Ogawa
Date: Mon, 30 Sep 1996 00:00
Date: Mon, 30 Sep 1996 00:00
332 lines
15730 bytes
15730 bytes
elcabalero@aol.com (The Gentleman) writes: >In article <52nboh$ork@nnrp1.news.primenet.com>, > bkogawa@primenet.com (Bryan Ogawa) wrote: >}elcabalero@aol.com (The Gentleman) writes: [...] What would you think of divorcing ANTP completely (or almost completely) from the actual transport protocol, by specifying the way that files are named, articles are posted and preserved, and so on, but ignoring whether the user is using ftp, http, gopher, wais, smtp, uucp, or even some super-nntp to move the articles? 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. [...] >}I understand that there are good political reasons to make transfer >}directories world readable (specifically, preventing the oligarchical >}nature of NNTP). However, the reasons that news servers don't accept >}connections from the world are often legitimate ones. Many people will >}end up reading news directly off of the CH instead of using it to find and >}inject news, especially since the CH will ideally represent a >}world-readable "full feed" of all articles in the group. >} >}This sort of requirement makes it less appealing to run the CH. > This is a possible problem, except that without an index file, you would >be trying to guess a filename that might be 255 characters long, and >deliberately chosen near-randomly. Also, you have only the Message ID, not >the Subject, From, or any other useful fields. I think it would take >deliberate effort in the form of a CGI script to really make it a place to >read the group. In which case, why not use DejaNews? Yeah, mostly true, I admit, but why not allow CH's to use authentication at their own option? > 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. :) >} >}>The articles will be placed in the CH by the clients, and must be >}>given filenames that are identical to the message ID's assigned to >}>that article per RFC 822 and RFC 1036. This means that no article >}>may be transferred via ANTP with a message ID longer than 255 >}>characters. Some systems may require a shorter file name, the >}>system limit will then become the maximum usable. No architecture >}>allowing less than 240 character filenames should be used for a CH. >} >}Technical nit: I believe that the recommended practice (and a good idea >}in any case) is for standards documents to NOT specify an implementation >}when it's not needed, and I believe it's specifically not needed here. Try >}saying something like, "The clients must pass the message ID as per RFC >}822 and RFC 1036 as the filename of the article, and the server must >}identify the articles available for download by their message IDs, and >}accept article requests via message ID." The big thing is to try to NOT >}tie the implementation to the definition. Eventually, someone will >}probably want to write a version which works with something unexpected >}(like database software) and it's better if they are given the freedom to >}do what they want when they do that. > The placing of an upper limit is neccesary, to keep the CH as simple as >possible, otherwise you would need a constantly updated index file, and have >some serious collision problems or a much more complex CH. Placing a lower >limit on the capability of the CH filename length may be uneccesary. Perhaps >I should just say that no article should be transferred that has an article ID >longer than the maximum filename size for the CH? 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 [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. Since each client has its own upload directory, no file is ever written simultaneously (it's the client's responsibility to never run twice at the same time. If it can happen, it needs to become two separate clients.) 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>"). b) the directory that might get overfilled is the index directory, although the worst case is that there is one index per message, in which case the directory is still overflowed, and there's significant overhead of doing all of the cd's. This could be cured by the "reaper" rewriting the index files to consolidate them (once every few hours, or once a day). 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. b) The client doesn't have to download old index files, since it already knows which ones it has seen before. [...] >}>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? [...] > 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. [... I was concerned about CH maintainers getting blamed ...] > Not if the CH spec is kept so simple. If everything devolves on the >Client, the client can more easily be configured to match the particular >circumstances it is dealing with. Which is why I place so much importance on >clients identifying themselves, if they start generating spew, it needs to be >spotted quickly. 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? >} >}[...] >}>from the NNTP server. Either NOV commands or NNTP commands may be >}>used for this purpose, other news database commands may be used as >}>well. The absolute message ID must be recovered, although a local >}>article reference may also be used for streamlining the process. >} >}This is the sort of phrasing that should go above. Give the >}server-writers the sort of freedoms you're giving the client-writers. > Again, smart clients reduces CH host system load, not a small >consideration. I am deliberately departing from the traditional client/server >model with smart servers, to one more in line with modern distributed >computing, where everything possible is placed on the client. OK. This makes sense. I hope this round of suggestions is in line with this philosophy. [...] > At least one implementation of an FTP server for Linux does this, and the >standard FTP server for Windows NT. Others will 'fail safe', by overwriting >the first file received. As far as I know, very few would automatically >rename the file. If you're just worrying about renamings, then I agree--most ftp servers won't do that. > Since the intent is to make the route traceable, so that a source of >errors may be identified, I should find a different separator. Perhaps '^', >as I have never seen that in a group name or address, and it is 7-bit ASCII. Possibly. I don't think ^ is legal in hostnames or newsgroup names. I don't know if it's legal in email addresses. See above for a different idea. [...] >}>X-ANTP-alt.thing-johndoe@baz.com-Break:1-555-555-1212 >} >}I would consider the method used above to be insufficient to identify the >}operator of the ANTP client. > It assumes that the client isn't going to lie. I can't see a way to >establish absolute authentication. A 'Secure' CH can provide that, if >neccesary. Eventually, a 'smart' CH could be created, but it isn't neccesary >to begin with one. I was mostly concerned about the ambiguity problem and the forged posting via upload to a CH problem, but you've addressed those pretty well. >}>This header will be followed by a newline, and then the symbols: >} >}><BREAK> [...] >}Without meaning to flame, why? Unless I'm sorely mistaken (which is [...] > Because I'm a lazy bugger in my coding. You're right, I should lose this >one. Heh... :) [...] > If security problems arise, a change to the 'Secure' CH can be made, at >which point it is as secure as the FTP server hosting the CH. This requires >only getting the admins of the host site to add a user, whose only privilege >is to upload to that directory. I'd encourage you to make a "Secure" CH the default, to head off problems at the pass. If people want to run insecure CH's, then they can, but it seems to me that you might as well specify higher security now. :) [...] > Again, this is why the specific mention of the 'Secure' CH. If only >'trusted' users have access, the problem becomes much more tractable. Since >even a small (around 12) number of particpants can have a sizable benefit for >the group, this is not a major drawback. Yes. >}3. If it works, it'll be with us forever. >} >}Remember, if what you do is popular, everyone will keep using it for the >}next decade. Choose wisely now, or everyone will pay tomorrow. > Which is why I am going through this, rather than just building it and >making everyone live with the result. And I, for one, am thankful that you're taking the time to do it. [...] >}Realize that you need the good will of news admins to keep this from being >}stillborn. > I am on fairly good terms with most of the admins I know on the net, and I >am trying to design this to prevent extra headaches for them. Yes, their >tacit permission is necessary for its use. But since articles can only hit >their server if they have already started carrying that group, it shouldn't be >any extra headaches for them. Yes, presumably so. My major concerns were using CHs to forge posts and client spew, but you're putting in the right things to help minimize these things. >}I expect that most comments from news admins to this proposal will be >}negative. I encourage you to find and use this commentary as positively >}as possible, since (1) it will probably be educational if nothing else (I >}will certainly read responses by others and expect to learn quite a bit), >}(2) may help you shape this proposal into something better, (3) may spawn >}new and different ideas which someone else can use. > Sounds fine to me. I hope that admins will not be reflexively hostile to >it, it really can make their lives simpler. [...] Since you haven't been flamed yet, I consider this a good sign. :) I think I was too afraid of heated discussion. More stuff 1. Since one of these new versions of http is supposed to allow uploads, it seems like a good idea to not tie this specifically to ftp if you don't have to. 1a. If you are using ftp, though, you might as well as use ftp for the downloading as well. 2. I favor getting rid of the requirement about handling simultaneous uploads, so that the CH has no responsibility whatsoever except to provide space. At the very least, I favor the client being able to determine this feature of the ftp server automatically. :) 3. You asked about slurp. If I recall correctly, slurp is considered a bad boy, since it uses the NEWNEWS command, which is inefficient under INN. I recommend suck, which replaces slurp, and works a lot like the slrn newsreader (it goes into each group you're subscribed to and finds the new news less intrusively). suck 3.2.0 is available from the following ftp sites: Site1 = sunsite.unc.edu Path1 = /pub/Linux/system/Mail/news File1 = suck-3.2.0.tar.gz Site2 = tsx-11.mit.edu Path2 = /pub/linux/sources/sbin File2 = suck-3.2.0.tar.gz suck *can* be used in combination with a news server on a unix box to do what you're trying to do with ANTP, or probably could become the start of an ANTP implementation for Unix and clones. >} >}I hope my comments are of assistance. >} > Much, thank you. You're welcome. I'm interested in this idea--I think it could help to improve newsfeeds for a lot of poorly-propogated groups. -- bryan k. ogawa <bkogawa@primenet.com> <bkogawa@netvoyage.net>
Technical Details
Message-ID:
<52pl7q$s20@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>Show Full Headers
Complete Article Headers
Message-ID: <52pl7q$s20@nnrp1.news.primenet.com> Subject: Re: ANTP Specification Date: Mon, 30 Sep 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> 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: 186328430 Organization: Primenet Services for the Internet X-posted-by: bkogawa@206.165.5.107 (bkogawa) Newsgroups: news.admin.net-abuse.misc,news.admin.misc,news.software.nntp