Thread View: news.software.readers
19 messages
19 total messages
Started by Steve Zilko
Thu, 30 May 1996 00:00
Posting - unique message IDs
Author: Steve Zilko
Date: Thu, 30 May 1996 00:00
Date: Thu, 30 May 1996 00:00
21 lines
1181 bytes
1181 bytes
I am implementing a news reader and poster, and I am dealing with the need to generate unique message-IDs for the news postings that I am creating. The application that I am implementing is a client only, and is sending its postings to a news server using the POST command of NNTP. How can I generate a guaranteed unique message-ID for my posting? Is there a way to request a unique ID from the news server? How does other posting software handle this issue. Any pointers to RFCs, shareware, articles, etc. will be greatly appreciated!!! Thanks!! -Steve
Re: Posting - unique message IDs
Author: Andreas Ley
Date: Fri, 31 May 1996 00:00
Date: Fri, 31 May 1996 00:00
18 lines
1528 bytes
1528 bytes
In article <slrn4qskpb.67r.guckes@banach.math.fu-berlin.de>, guckes@banach.math.fu-berlin.de (Sven Guckes) writes: > Hint: date+time+hostname What if someone on the same machine posts at the same time? A newsreader can't generate a unique ID _for sure_, the news server does that. Just leave the job to your server, that's the way it was thought of. Bye, Andy ------------------------------------------------------------------------------- Andreas Ley ! "Even when you're ! Email: ley@rz.uni-karlsruhe.de Goethestr. 27 ! a genius, life is ! Voice: +49 721 84 10 36 76135 Karlsruhe ! a mystery!" ! RZ: +49 721 608 4038 Germany ! Doogie Howser, M.D. ! AKK: +49 721 96 403 22
Re: Posting - unique message IDs
Author: Michel
Date: Fri, 31 May 1996 00:00
Date: Fri, 31 May 1996 00:00
42 lines
2381 bytes
2381 bytes
In <31ae03ed.170044781@client1.news.psi.net> steve@kazan.com (Steve Zilko) writes: >I am implementing a news reader and poster, and I am dealing with the >need to generate unique message-IDs for the news postings that I am >creating. >The application that I am implementing is a client only, and is >sending its postings to a news server using the POST command of NNTP. >How can I generate a guaranteed unique message-ID for my posting? Is >there a way to request a unique ID from the news server? How does >other posting software handle this issue. Typically, the hostname of the machine is used in the message ID. This ensures that all ID's generated by that machine are unlikely to be duplicated by other machines. Then, the (unix) time of day can be very usefull since every second of any moment in time as we know it, will have a different unix time of day... All you need to ensure now is that when you process multiple messages/seconds, that these messages have unique ID's. A sequence number can be very useful here, and you would only have to keep track of unique sequence numbers every second. Once a new second has begun, you can forget about all former sequence numbers. If you wanna be a hoot, you can even throw in an extra random number and use the CRC-32 over the machines name, multiplied by your mother's age and increased by the unix-time-of-day modulo your feetsize as a seed for rand(). I believe RFC's advise that once a messageID is used, it is not repeated for another 5 years. I think the above would garantee that w/o problem. >Any pointers to RFCs, shareware, articles, etc. will be greatly >appreciated!!! RFC 822 and kins... Michel.
Re: Posting - unique message IDs
Author: Sven Guckes
Date: Fri, 31 May 1996 00:00
Date: Fri, 31 May 1996 00:00
15 lines
1144 bytes
1144 bytes
steve@kazan.com (Steve Zilko): > I am implementing a news reader and poster, and I am dealing with the need > to generate unique message-IDs for the news postings that I am creating. > Is there a way to request a unique ID from the news server? > How does other posting software handle this issue? Have you tried to read the source of the newsreader you used to post this? Hint: date+time+hostname Sven
Re: Posting - unique message IDs
Author: J.B. Nicholson-Owens
Date: Fri, 31 May 1996 00:00
Date: Fri, 31 May 1996 00:00
62 lines
4048 bytes
4048 bytes
On 30 May 1996 18:58:30 -0400, Steve Zilko <steve@kazan.com> wrote: > I am implementing a news reader and poster, and I am dealing with the > need to generate unique message-IDs for the news postings that I am > creating. I'm not sure about all servers, but I believe you don't have to specify a Message-ID at all. I believe the server will make one for a post if one isn't specified (I'm getting this from a good article on this topic posted recently. The main subject was why one should not make ``yet another newsreader''. Among other reasons why the world doesn't need another newsreader, the file listed the minimum headers one needs to send to a server for a legal post. If I remember correctly, those headers were From:, Newsgroups:, Subject: and References: in the case of a followup, but I might be mistaken.) Relying on the server to generate Message-IDs should work flawlessly, however, unless those IDs contain some identifyable or predictable substring, it might mean more work to let the user track followups to their posts easily. If you don't want to let the user track followups easily, you need not create a Message-ID. In slrn (ftp://space.mit.edu/pub/davis/slrn) I can easily score followups to my articles high and it's *very* convenient. > The application that I am implementing is a client only, and is > sending its postings to a news server using the POST command of NNTP. > How can I generate a guaranteed unique message-ID for my posting? Is > there a way to request a unique ID from the news server? How does > other posting software handle this issue. Since you have to ask, I wonder why you're making a newsreader in the first place. I admit to agreeing with the aforementioned file that the world doesn't need another newsreader. New ideas rarely justify making an entirely new application and unwarranted liberties are often taken when creating a minimal set of worthwhile features. When new ideas come along (such as not forcing the user to think of article threads as a part of a group), newsreader authors are usually unwilling to make an application to supports this. Most newsreader authors are better off staring with some already-written newsreader app and building their feature on (or into) that. In the case of my newsreader of choice, slrn, I'd argue that any newsreader author starting from scratch will take so long to get up to slrn's capabilities, the new app will most likely not be worth using. Furthermore, I've yet to see a GUI newsreader that can compete with the freely available CLI newsreaders one can compile for Unix. I suggest checking out slrn (ftp://space.mit.edu/pub/davis/slrn) and considering making a newsreader *server* by implementing it with an already available RDBMS as the core (personally, I think the idea of using a specific program to run a news server, like INN, is silly since the features a news server needs are exactly what RDBMSs provide). Treat server APIs like a specification and let the RDBMS track threads, handle multiple incoming feeds (using whatever locking mechanism the RDBMS provides if you need one) and so on. If I can find that article about making a newsreader, I'll repost a pointer to it. -- Due to local news server and feed problems, I might not see all followups.
Re: Posting - unique message IDs
Author: Matthew Dillon
Date: Fri, 31 May 1996 00:00
Date: Fri, 31 May 1996 00:00
31 lines
1655 bytes
1655 bytes
:In article <31ae03ed.170044781@client1.news.psi.net>,
:Steve Zilko <steve@kazan.com> wrote:
:>
:>I am implementing a news reader and poster, and I am dealing with the
:>need to generate unique message-IDs for the news postings that I am
:>creating.
:>
:>The application that I am implementing is a client only, and is
:>sending its postings to a news server using the POST command of NNTP.
:>How can I generate a guaranteed unique message-ID for my posting? Is
:>there a way to request a unique ID from the news server? How does
:>other posting software handle this issue.
:>
:>Any pointers to RFCs, shareware, articles, etc. will be greatly
:>appreciated!!!
:>
:>Thanks!!
:>
:>-Steve
Check to see if the nntp server you are using will add the Date:
and Message-ID: headers for you by doing a POST that does not
contain a Date: or Message-ID: header.
The nntp server that comes with INN *will* do this for you.
-Matt
Re: Posting - unique message IDs
Author: Waldi Ravens
Date: Fri, 31 May 1996 00:00
Date: Fri, 31 May 1996 00:00
18 lines
1000 bytes
1000 bytes
Steve Zilko <steve@kazan.com> wrote: > > I am implementing a news reader and poster, and I am dealing with the > need to generate unique message-IDs for the news postings that I am > creating. The server will add a Message-ID: header field, if the user agent hasn't done so. BTW, do the users of your news reader a favour: don't allow them to post articles with an illegal From: field body. Regards, Waldi
Re: Posting - unique message IDs
Author: bill davidsen
Date: Fri, 31 May 1996 00:00
Date: Fri, 31 May 1996 00:00
20 lines
1244 bytes
1244 bytes
In article <31ae03ed.170044781@client1.news.psi.net>, Steve Zilko <steve@kazan.com> wrote: | | I am implementing a news reader and poster, and I am dealing with the | need to generate unique message-IDs for the news postings that I am | creating. Why? The required headers are Newsgroups, Subject, and From. The server will be happy to fill in the date, message-id, and anything else it wants. Keep it simple. -- Bill Davidsen (davidsen@tmr.com) "The secret to procrastination is to put things off until the last possible moment - but no longer" -me
Re: Posting - unique message IDs
Author: Sven Guckes
Date: Mon, 03 Jun 1996 00:00
Date: Mon, 03 Jun 1996 00:00
24 lines
1594 bytes
1594 bytes
Andreas.Ley@rz.uni-karlsruhe.de (Andreas Ley): > > Hint: date+time+hostname > What if someone on the same machine posts at the same time? Well, at first my hint read as date+time+hostname+username+processid+randomvalue but this looked like overkill to me. I took out the "processid" as I figured that a process which produces a lot of ids in a very short time would check on the ids. Then I took out "username" as the "randomvalue" should be enough to make the ids unique. And then I removed "randomvalue" as I wanted to make the person I gave the hint think about just that problem. :-) > A newsreader can't generate a unique ID _for sure_, the news server does > that. Just leave the job to your server, that's the way it was thought of. Exactly! Sven
RDBMS as a news server
Author: Olaf Titz
Date: Mon, 03 Jun 1996 00:00
Date: Mon, 03 Jun 1996 00:00
49 lines
2761 bytes
2761 bytes
Newsgroups: news.admin.technical,news.software.readers
Path: not-for-mail
From: Olaf Titz <olaf@bigred.inka.de>
Subject: RDBMS as a news server
Message-ID: <dsbtdy.9lf@bigred.inka.de>
Date: 01 Jun 1996 16:53:58 +0100
References: <31ae03ed.170044781@client1.news.psi.net>
<slrn4qt1iu.fod.jbn@mystery-train.cu-online.com>
Organization: private Linux site, southern Germany
Lines: 34
J.B. Nicholson-Owens <jbn@mystery-train.cu-online.com> wrote:
> newsreader, the file listed the minimum headers one needs to send to a
> server for a legal post. If I remember correctly, those headers were From:,
> Newsgroups:, Subject: and References: in the case of a followup, but I might
Correct.
> considering making a newsreader *server* by implementing it with an already
> available RDBMS as the core (personally, I think the idea of using a
> specific program to run a news server, like INN, is silly since the features
> a news server needs are exactly what RDBMSs provide). Treat server APIs
In principle, it shouldn't be too hard to base a news system upon an
RDBMS. One of the main reasons, I think, why this hasn't been done
already is efficiency. News systems handle a big throughput on
relatively small machines - C News systems on 286 or Sun 3 weren't
exactly uncommon several years ago. Every incoming article is a
transaction; well look at the news.lists statistics for needed
"transactions per second" figures.
Even if the standard implementation on top of a Un*x filesystem
is suboptimal, it provides a reasonable balance of hardware needs,
software complexity and performance. RDBMSs need something more power
for themselves.
Does anyone know of News implementations (or thoughts/work on such) on
bigger or specialized DBMS machines?
olaf
--
___ Olaf.Titz@inka.de or @{stud,informatik}.uni-karlsruhe.de ____
__ o <URL:http://www.inka.de/~bigred/> <IRC:praetorius>
__/<_ >> Just as long as the wheels keep on turning round
_)>(_)______________ I will live for the groove 'til the sun goes down << ____
Re: Posting - unique message IDs
Author: Doug Bora
Date: Mon, 03 Jun 1996 00:00
Date: Mon, 03 Jun 1996 00:00
17 lines
1334 bytes
1334 bytes
: duplicated by other machines. Then, the (unix) time of day can be : very usefull since every second of any moment in time as we know it, : will have a different unix time of day... All you need to ensure now : is that when you process multiple messages/seconds, that these messages : have unique ID's. A sequence number can be very useful here, and you : would only have to keep track of unique sequence numbers every second. Or just grab the time of day once, then simply increment it for each posting. -- Doug Bora stigmata@wwa.com
Re: Posting - unique message IDs
Author: Bill Stewart-Cole
Date: Mon, 03 Jun 1996 00:00
Date: Mon, 03 Jun 1996 00:00
38 lines
2325 bytes
2325 bytes
In article <slrn4qskpb.67r.guckes@banach.math.fu-berlin.de>, guckes@math.fu-berlin.de wrote: >steve@kazan.com (Steve Zilko): >> I am implementing a news reader and poster, and I am dealing with the need >> to generate unique message-IDs for the news postings that I am creating. >> Is there a way to request a unique ID from the news server? >> How does other posting software handle this issue? > >Have you tried to read the source of the newsreader you used to post this? > >Hint: date+time+hostname Not always ideal. A client may not have a hostname or may have a different one every time it gets connected. Using an IP number in the host part is a bad idea, and using a name that may have a different person attached in 10 minut6es is not much better. There is the option of simply letting the server assign the ID, but this makes some neat user features impossible (like automatic flagging of follow-ups and quick cancel generation for 'oops' posts). It is NOT acceptable for the client to generate an ID with the server's host part because you never know how to make it unique. IMHO the best method is to have the user configure whether whether his hostname is permanent. If it is, generate an ID that is relatively short but easily parsed for revealing data, such as: username.date.time@hostname (e.g.: bill.960601.213320@sc1.scconsult.com) If the hostname is not permanent, let the server do the ID and forego providing any cute features like the immediate cancelling of posts (the 'oops' response) or References-based automatic follow-up flagging. -- Bill Stewart-Cole
Re: Posting - unique message IDs
Author: Michel
Date: Tue, 04 Jun 1996 00:00
Date: Tue, 04 Jun 1996 00:00
24 lines
1539 bytes
1539 bytes
In <4oo6qc$fdl@kirin.wwa.com> stigmata@wwa.com (Doug Bora) writes: >: duplicated by other machines. Then, the (unix) time of day can be >: very usefull since every second of any moment in time as we know it, >: will have a different unix time of day... All you need to ensure now >: is that when you process multiple messages/seconds, that these messages >: have unique ID's. A sequence number can be very useful here, and you >: would only have to keep track of unique sequence numbers every second. >Or just grab the time of day once, then simply increment it for each >posting. I later realized that 'gettimeofday()' and can even return the current microsecond. How big are the odds that more than one message is processed at the same microsecond ? >-- >Doug Bora >stigmata@wwa.com
Re: RDBMS as a news server
Author: bill davidsen
Date: Tue, 04 Jun 1996 00:00
Date: Tue, 04 Jun 1996 00:00
27 lines
1805 bytes
1805 bytes
In article <m0uPs42-000J17C@bigred.inka.de>, Olaf Titz <olaf@bigred.inka.de> wrote: | In principle, it shouldn't be too hard to base a news system upon an | RDBMS. One of the main reasons, I think, why this hasn't been done | already is efficiency. News systems handle a big throughput on | relatively small machines - C News systems on 286 or Sun 3 weren't | exactly uncommon several years ago. Every incoming article is a | transaction; well look at the news.lists statistics for needed | "transactions per second" figures. A humble 486 running Linux can show sustained peak tps of 16-17, something I don't see doing with any of the databases I've used. And that transaction is not simple, it writes to the history file, history database, NOV database and log file. A good commercial RDBMS is much better at never losing a transaction or leaving things in a bad state if the machine dies, but that's usually not a requirement of news. -- Bill Davidsen (davidsen@tmr.com) "The secret to procrastination is to put things off until the last possible moment - but no longer" -me
Re: Posting - unique message IDs
Author: Doug Bora
Date: Wed, 05 Jun 1996 00:00
Date: Wed, 05 Jun 1996 00:00
17 lines
1229 bytes
1229 bytes
: >Or just grab the time of day once, then simply increment it for each : >posting. : I later realized that 'gettimeofday()' and can even return the : current microsecond. How big are the odds that more than one message is : processed at the same microsecond ? Probably not very, but as a programmer, do you really want to take that chance? -- Doug Bora stigmata@wwa.com
Re: RDBMS as a news server
Author: J.B. Nicholson-Owens
Date: Thu, 06 Jun 1996 00:00
Date: Thu, 06 Jun 1996 00:00
30 lines
2273 bytes
2273 bytes
On 3 Jun 1996 18:04:54 -0400, Olaf Titz <olaf@bigred.inka.de> wrote: > In principle, it shouldn't be too hard to base a news system upon an > RDBMS. One of the main reasons, I think, why this hasn't been done > already is efficiency. Perhaps that was true when C News and INN were first made, but I'm not so sure that's true today. I don't have specifics to point to (and I gather you don't either, or else you would have referenced them), but I find it hard to believe that all the study and work that has gone into RDBMSs would be useless in handling a Usenet feed. It seems odd to me that if RDBMSs are that slow and inefficient they would be chosen by many companies for enormous tasks instead of customized, reinvent-the-wheel programs geared for a single task (like INN and C News are for Usenet). Furthermore, I suspect the article searching and sorting benefits one would gain from using an RDBMS as news server would far outweigh the problems of not handling the ultimate worst case where thousands of users want simultaneous full access to a single news server. Such benefits might even call for extending some server-client protocol to allow new ways of letting clients regroup articles. I am still reading about what's involved in day-to-day maintenance of a news server and what this would mean for a news server running on an RDBMS, and I'd prefer to research this issue before diving in blindly and coding something. -- Due to local news server and feed problems, I might not see all followups.
Re: Posting - unique message IDs
Author: bill davidsen
Date: Thu, 06 Jun 1996 00:00
Date: Thu, 06 Jun 1996 00:00
16 lines
1288 bytes
1288 bytes
In article <michel.833883488@nijenrode.nl>, Michel <michel@nijenrode.nl> wrote: | I later realized that 'gettimeofday()' and can even return the | current microsecond. How big are the odds that more than one message is | processed at the same microsecond ? Sure, "can" return, but in many cases returns time to the nearest clock tick. That's a lot of clock cycles... -- Bill Davidsen (davidsen@tmr.com) "The secret to procrastination is to put things off until the last possible moment - but no longer" -me
Re: Posting - unique message IDs
Author: Michel
Date: Mon, 10 Jun 1996 00:00
Date: Mon, 10 Jun 1996 00:00
23 lines
1510 bytes
1510 bytes
In <4p7dfv$keq@usenetw1.news.prodigy.com> davidsen@tmr.com (bill davidsen) writes: >In article <michel.833883488@nijenrode.nl>, Michel <michel@nijenrode.nl> wrote: >| I later realized that 'gettimeofday()' and can even return the >| current microsecond. How big are the odds that more than one message is >| processed at the same microsecond ? >Sure, "can" return, but in many cases returns time to the nearest >clock tick. That's a lot of clock cycles... Oh well... Then the solution is obvious: introduce a "sleep(1);" after processing each message. In a pinch, it will give you a fixed message- processing rate for all future releases =) Michel. (We seem to have drifted off topic)
Re: Posting - unique message IDs
Author: Curt Sampson
Date: Mon, 10 Jun 1996 00:00
Date: Mon, 10 Jun 1996 00:00
18 lines
1311 bytes
1311 bytes
In article <michel.834340688@nijenrode.nl>, Michel <michel@nijenrode.nl> wrote: > >Oh well... Then the solution is obvious: introduce a "sleep(1);" after >processing each message. In a pinch, it will give you a fixed message- >processing rate for all future releases =) Not to mention that if we make it a sleep(60) it will help solve our spam problems as well. :-) cjs -- Curt Sampson curt@portal.ca Info at http://www.portal.ca/ Internet Portal Services, Inc. Vancouver, BC (604) 257-9400 De gustibus, aut bene aut nihil.
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