Thread View: news.software.nntp
7 messages
7 total messages
Started by Allen Brunson
Fri, 23 Sep 2005 06:17
filtering algorithm
Author: Allen Brunson
Date: Fri, 23 Sep 2005 06:17
Date: Fri, 23 Sep 2005 06:17
27 lines
2242 bytes
2242 bytes
hello news admins, i'm about to implement filtering rules for my client newsreader. i want to give the user the ability to filter on any arbitrary header. and i also want to avoid the problem that some newsreaders have, viz: they can only filter on what's in the overview database, but don't make it obvious, so the behavior is different from server to server unless they have identical overview fields. so i guess my first step will be to get a list of all headers that the current ruleset will need to filter against. if they're all in the overview database, great, i can get by examining only the XOVER data. if they don't, what's next? should i either: 1) bite the bullet and do a HEAD for every single message i'm thinking about downloading. 2) use XPAT to get matching articles. 3) use XHDR to get matching headers/articles. 4) something better you know about but i don't. i guess this question is arguably off-topic here, but i'm sure you news admins know the answers better than anybody. i'm still not over basing a whole lot of my first newsreader on the NEWNEWS command, only to discover that it was turned off nearly everywhere. so this time i figure i should go to the source.
Re: filtering algorithm
Author: Bill Davidsen
Date: Fri, 23 Sep 2005 12:27
Date: Fri, 23 Sep 2005 12:27
39 lines
3166 bytes
3166 bytes
Allen Brunson wrote:
> hello news admins,
>
> i'm about to implement filtering rules for my client newsreader. i want to
> give the user the ability to filter on any arbitrary header. and i also want
> to avoid the problem that some newsreaders have, viz: they can only filter on
> what's in the overview database, but don't make it obvious, so the behavior is
> different from server to server unless they have identical overview fields.
1 - this belongs in the news.software.readers group
2 - do read the "so you want to write another news client" essay
3 - overview was created because getting individual headers was very
slow and used too many server resources.
>
> so i guess my first step will be to get a list of all headers that the current
> ruleset will need to filter against. if they're all in the overview database,
> great, i can get by examining only the XOVER data. if they don't, what's
> next? should i either:
>
> 1) bite the bullet and do a HEAD for every single message i'm thinking about
> downloading.
>
> 2) use XPAT to get matching articles.
>
> 3) use XHDR to get matching headers/articles.
>
> 4) something better you know about but i don't.
>
> i guess this question is arguably off-topic here, but i'm sure you news admins
> know the answers better than anybody. i'm still not over basing a whole lot
> of my first newsreader on the NEWNEWS command, only to discover that it was
> turned off nearly everywhere. so this time i figure i should go to the
> source.
--
bill davidsen
SBC/Prodigy Yorktown Heights NY data center
http://newsgroups.news.prodigy.com
Re: filtering algorithm
Author: Curt Welch
Date: Sat, 24 Sep 2005 00:40
Date: Sat, 24 Sep 2005 00:40
69 lines
4454 bytes
4454 bytes
Allen Brunson <brunsona@takethisout.newsguy.com> wrote: > hello news admins, > > i'm about to implement filtering rules for my client newsreader. i want > to give the user the ability to filter on any arbitrary header. and i > also want to avoid the problem that some newsreaders have, viz: they can > only filter on what's in the overview database, but don't make it > obvious, so the behavior is different from server to server unless they > have identical overview fields. > > so i guess my first step will be to get a list of all headers that the > current ruleset will need to filter against. if they're all in the > overview database, great, i can get by examining only the XOVER data. if > they don't, what's next? should i either: > > 1) bite the bullet and do a HEAD for every single message i'm thinking > about downloading. > > 2) use XPAT to get matching articles. XPAT is not supported on all servers (same reason NEWNEWS isn't - it can consume too many resources and tends to be abused), and on others, it only supports the headers which are in XOVER so XPAT doesn't always help if you are trying to search on none XOVER headers. (XPAT is just a bad design to begin with). > 3) use XHDR to get matching headers/articles. Likewise, some servers only support the XOVER headers for XHDR. > 4) something better you know about but i don't. The reason most newsreader clients don't support anything besides XOVER header filtering is because there is no good standard way to do it for the other headers. HEAD is the only thing you can expect to work everywhere and it's just too slow for anything other than very small sets of articles. What's very wrong to do is to automatically switch to something like using header fetches with HEAD instead of XOVER just becase the user selected a non-xover header from the list without any indication that doing that would cause the search speed to drop by a factor of 1000. When that happanes, they ask us (instead of you) why the header search is so slow all of a sudden. If you can filter sets of binary posts by doing a header only on the first article from each set, then that might be useful. But to try and do header fetches on 100,000 headers to filter a binary group will never work. > i guess this question is arguably off-topic here, but i'm sure you news > admins know the answers better than anybody. i'm still not over basing a > whole lot of my first newsreader on the NEWNEWS command, only to discover > that it was turned off nearly everywhere. so this time i figure i should > go to the source. The answer is there really is no way to do what you want in the general case. The best way is to just not bother. Do a good job of searcing and filtering on XOVER data and don't waste your time on anything else. If you want to do better, run your own server to collect and index header data and sell it as a search service instead of trying to do it over NNTP with a newsreader. And if you still want to do something better than XOVER, then be ready to write a lot of very complex UI and NNTP code to make sure the user understands what is going on, and doesn't kill servers by issuing millions of HEAD commands or tons of XPAT commands. -- Curt Welch http://CurtWelch.Com/ curt@kcwc.com http://NewsReader.Com/
Re: filtering algorithm
Author: Allen Brunson
Date: Sat, 24 Sep 2005 03:57
Date: Sat, 24 Sep 2005 03:57
32 lines
2652 bytes
2652 bytes
Curt Welch wrote: > XPAT is not supported on all servers (same reason NEWNEWS isn't - it can > consume too many resources and tends to be abused), and on others, it only > supports the headers which are in XOVER so XPAT doesn't always help if you > are trying to search on none XOVER headers. (XPAT is just a bad design to > begin with). okay then, no XPAT. >> 3) use XHDR to get matching headers/articles. > > Likewise, some servers only support the XOVER headers for XHDR. can you qualify "some?" 10 percent, 50 percent, 80 percent? i'm trying to decide if it would be worthwhile to write code that tries XHDR and then falls back to something else, or just immediately fall back to something else. > If you can filter sets of binary posts by doing a header only on the first > article from each set, then that might be useful. But to try and do header > fetches on 100,000 headers to filter a binary group will never work. well, i'm not trying to do "xbin on the client" or anything severe like that. this will be for things like "killfile this thread," "auto-download bodies for all replies to my posts," etc. some people get really bent out of shape over morphing trolls, i've noticed, and would like to filter on one of those headers that some news servers supply that give the IP address of the poster. and while HEAD might be slow, it's definitely faster than getting the whole article, which is what i'm currently doing in most cases, and then applying the filtering in a killfile-like fashion to get rid of stuff the user doesn't want to see.
Re: filtering algorithm
Author: Curt Welch
Date: Sun, 25 Sep 2005 03:00
Date: Sun, 25 Sep 2005 03:00
174 lines
8097 bytes
8097 bytes
Allen Brunson <brunsona@takethisout.newsguy.com> wrote: > Curt Welch wrote: > >> 3) use XHDR to get matching headers/articles. > > > > Likewise, some servers only support the XOVER headers for XHDR. > > can you qualify "some?" 10 percent, 50 percent, 80 percent? The trend started with the Highwinds servers (typhoon/cyclone/twister) which have been very popular in the past with ISPs. I don't even know if their current products still do this I would guess they do. These servers alone could make a substatial percentage of the servers (30% would be a wild guess). Here's what easynews does as an example (They might still be running Highwind softwre on their backend servers): group news.software.nntp 211 1213 77870 79283 news.software.nntp xhdr subject 77870-77875 221 subject fields follow 77870 Newsman Pro 2.0 Released 77871 The Greatest News Ever! 77873 Re: What are these directories, and why doesn't anything prune them? 77874 es, and why doesn't anything prune them? 77875 es, and why doesn't anything prune them? .. xhdr path 77870-77875 221 path fields follow 77870 (none) 77871 (none) 77873 (none) 77874 (none) 77875 (none) .. xhdr newsgroups 77870-77875 221 newsgroups fields follow 77870 news.software.nntp 77871 news.software.nntp 77873 news.software.nntp 77874 news.software.nntp 77875 news.software.nntp .. xhdr organization 77870-77875 221 organization fields follow 77870 (none) 77871 (none) 77873 (none) 77874 (none) 77875 (none) .. This bizare use of (none) is the crap that Highwinds started. But it's interesting that Easynews supports Newsgroups even though it's not in the XOVER data. I don't know if that's something Highinwds did or something Easynews might have "faked" by using the Xref: data. Diablo servers I think tend to support xhdr for all headers. So services like newshosting and octanews and readnews and astraweb as well as all the ISPs that use Diablo will have full xhdr support. I don't remember what INN does. It used to do full xhdr but I don't know about performance or if it might be disabled by defalut. I support xhdr but on all headers, it's very slow on non xover headers because my server does header featches for each article in order to get the data. So this can confuse a client like your's because it will look like it "works" to your software yet is so slow as to be mostly unusable on large binay groups with thousands to millions of articles. Here's another test on a giganews server: group news.software.nntp 211 6933 92617 99549 news.software.nntp xover 99549 224 xover information follows 99549 Re: Authentication advice "John F. Morse" <xanadu.bbs@invalid.net> Sat, 24 Sep 2005 17:25:29 -0500 <e90d4$4335d25a$4097152a$3064@EVERESTKC.NET> <2b9f5$4335ae05$4097152a$18719@EVERESTKC.NET> <dh4dmf$d5u$1@puck.litech.org> 425793 Xref: number1.nntp.dca.giganews.com news.software.nntp:99549 . xhdr organization 99549 221 organization fields follow 99549 (none) .. xhdr newsgroups 99549 221 newsgroups fields follow 99549 (none) .. xhdr xref 99549 221 xref fields follow 99549 Xref: number1.nntp.dca.giganews.com news.software.nntp:99549 .. xhdr message-id 99549 221 message-id fields follow 99549 <e90d4$4335d25a$4097152a$3064@EVERESTKC.NET> .. So it looks like the old highwinds technique but unlike easynews, they don't support newsgroups. Giganews used to use Highwinds software but wrote their own a few years back - but it looks like they cloned the Highwinds behavior. Supernews I believe supports a few more useful headers other than just the xover headers for commands like xhdr, but they don't support all of them (if I remember correctly - I don't have an account on their servers so I cant test). That should give you an idea of the mess you are getting into by trying to make intelligent use of xhdr for non-xover fields. > i'm trying to decide if it would be worthwhile to write code that tries > XHDR and then falls back to something else, or just immediately fall back > to something else. > > > If you can filter sets of binary posts by doing a header only on the > > first article from each set, then that might be useful. But to try and > > do header fetches on 100,000 headers to filter a binary group will > > never work. > > well, i'm not trying to do "xbin on the client" or anything severe like > that. this will be for things like "killfile this thread," Why can't you do that with References: and Subject: data from XOVER? > "auto-download > bodies for all replies to my posts," If you put custom markers in your Message-IDs you can spot replies with the References: data in XOVER. > etc. some people get really bent > out of shape over morphing trolls, i've noticed, and would like to filter > on one of those headers that some news servers supply that give the IP > address of the poster. Yeah, spam/troll filtering is where access to all the other headers that show up in posts becomes very useful. It's just not easy to get access to those headers in bulk from most news servers. If you are trying to do better spam/troll filtering for small text groups that tend to have 1000 or less posts, then playing games with xhdr can work well. If you are trying to filter binary groups with 100,000 new posts a day, it's hard to make xhdr worth the time. So if you add features designed to work well in small text groups, you have to take care about what happens when people try to use them in a group with 10 million articles in it. > and while HEAD might be slow, it's definitely > faster than getting the whole article, which is what i'm currently doing > in most cases, and then applying the filtering in a killfile-like fashion > to get rid of stuff the user doesn't want to see. Yeah, for sure. HEAD is better than the entire article even for text posts. And if your code is smart, and uses BODY to get the body instead of ARTICLE then you don't have to download the header twice. If your intent is to work well for slower speed connections like dial up, then doing things like that can still be a win. A technique that can work well (and maybe this is what you are already doing), is to not try to do the extra filtering until the user selects a "next article" function, so you fetch headers, and skip articles as needed until you find the next good one. That why you are not trying to filter 1000 articles at once using HEAD for each when you first enter the group. But you still need to watch out for what happens when you get a flood of 1000's of posts which you filter tries to reject and causes it to hang for minutes scanning the crap. You need a UI to let the user know this is happening and given them the option to abort instead of waiting. -- Curt Welch http://CurtWelch.Com/ curt@kcwc.com http://NewsReader.Com/
Re: filtering algorithm
Author: Allen Brunson
Date: Sun, 25 Sep 2005 05:25
Date: Sun, 25 Sep 2005 05:25
39 lines
3052 bytes
3052 bytes
Curt Welch wrote: > I support xhdr but on all headers, it's very slow on non xover headers > because my server does header featches for each article in order to get the > data. So this can confuse a client like your's because it will look like > it "works" to your software yet is so slow as to be mostly unusable on > large binay groups with thousands to millions of articles. all right, you've scared me sufficiently that i'll just use XOVER where i can and HEAD if i have to, and ignore all the other late-model stuff. >> well, i'm not trying to do "xbin on the client" or anything severe like >> that. this will be for things like "killfile this thread," > > Why can't you do that with References: and Subject: data from XOVER? i can, of course, and will do so, if all filter rules can be satisfied from the overview data. but people want to filter on other headers as well, as already mentioned. >> "auto-download bodies for all replies to my posts," > > If you put custom markers in your Message-IDs you can spot replies with the > References: data in XOVER. yeah, i notice xnews does that. i don't think it's a general enough solution, though. it works for replies to your own posts, but it doesn't work for a rule like "i want to ignore this person and all replies he might get." since i need special logic to make that kind of rule work, i might as well use it for "replies to my own posts" as well, rather than having two different ways to go about it. rules that involve looking at other messages are going to be the worst. i'll have to keep a whole ton of crud in memory at once, so i can do things like find the parent of the message i'm currently trying to filter. that might mean i have to request another batch of XOVER data i wouldn't have needed otherwise. thanks for your help, curt, i think i've probably got enough information to get to work on this now.
Re: filtering algorithm
Author: Bill Davidsen
Date: Mon, 26 Sep 2005 17:37
Date: Mon, 26 Sep 2005 17:37
23 lines
2666 bytes
2666 bytes
Allen Brunson wrote: > Curt Welch wrote: > >>I support xhdr but on all headers, it's very slow on non xover headers >>because my server does header featches for each article in order to get the >>data. So this can confuse a client like your's because it will look like >>it "works" to your software yet is so slow as to be mostly unusable on >>large binay groups with thousands to millions of articles. > > > all right, you've scared me sufficiently that i'll just use XOVER where i can > and HEAD if i have to, and ignore all the other late-model stuff. Depending on the service that may not be practical. Just as some services have response which gets progressively slower as you do a lot of posting, so some have deliberate slowdowns for things which use significant server resources compared to other users. HEAD is going to be very slow on systems where that's the case. -- bill davidsen SBC/Prodigy Yorktown Heights NY data center http://newsgroups.news.prodigy.com
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads