Article View: news.software.nntp
Article #57464Using Message-ID to store binary file information
From: Curt Welch
Date: Wed, 20 Mar 2002 19:04
Date: Wed, 20 Mar 2002 19:04
118 lines
7260 bytes
7260 bytes
"J.B. Moreno" <planb@newsreaders.com> wrote:
> I like the References "hack" as you call it because it's compatible
> with all servers and makes threading easier (i.e. you can always use
> References based threading), but on thinking about it I think it's even
> better to use Message-ID (even if some servers won't allow the client
> to provide it).
>
> Defining a Message-ID standard format for binary messages would not
> only mean it was included in the overview, but would mean it could be
> acted upon by servers at transport level.
I'm normally against trying to put anything besides the date into a
Message-ID. Everybody wants to put something into the Message-ID and even
though a lot of ideas about putting stuff in there is interesting, none of
it seemed truly worthy.
But the idea of having a standard Message-ID format for binary file
segments seems like it might have some value. As you point out, if the
complete file size was there, news servers could reject articles based on
the Message-ID.
The problem however is that once you put one thing in there, then everyone
starts to argue about what else should be stuffed in there. Group names,
revision numbers, author IDs, etc etc.
Ignoring the slippery slope problem of putting anything into Message-IDs,
what would you suggest putting in there for binaries?
At the low end, you could put a marker which simply indicated that the
article was a binary - perhapps also meaning it conformed to some new
standard for encoding binaries on Usenet: $ubf$
You could put in the full file size which this segment was a part of,
Something like: $fs=3a74f$ (using hex to help compact it - or you could use
a base-64 type encoding to compact it further). Hex takes 8 characters to
hold a 32 bit number but base64 encoding only takes 6.
You could throw in the segment offset and size:
so=3Hw6,ss=y7J
You could thrown in the md5, which would be a big waste of characters:
md5=6ba6b1808d70fea97d7f64001144a0d6
Or you could create something much smaller like a 16 bit version of
the full md5 to help match files but not to to uniqly idendtify them:
m6=a0d6
If the full file size was there, then the short hash + the file size
would be a good indication of a match. But if it wasn't good enough,
then you would still be stuck with the need of putting a larger hash
somewhere else in the headers. Maybe a 32 bit hash would be strong
enough? It's been implied that crc32 isn't very good, but maybe 32
bits from an md5 of the file would be strong enough that it could all
be placed in the Message-ID???
So, to see what this looks like, I'll make up an example. Let's assume
we are posting the last segment of a 500 MB file and the segments are
500KB each. (I'm using numbers on the larger end to show what an ID will
look like with farily large numbers in it). And I'll put in a 32 bit
hash encoded in base64 as well: (or why not a 36 bit hash):
<.date-stuff.$h=uJb8Ex$s=eP000$o=eNb00$l=A900$@somehostname.com>
In the above, h is the 36 bit hash, s is the filesize, o is the file offset
for this segment, l is the length of this segment. A 500K single part file
would leave out the offset and length so it would look something like this:
<date-stuff$h=uJb8Ex$s=A900$@somehostname.com>
Compared to an airnews id which usenet is already living with:
<99372C2973C6A746.C6C49A8CCD3EA397.1810703A62E23B4F@lp.airnews.net>
If the hash and the size were always required, these IDs could be spotted
by looking for the pattern: "$h=......$s=.*$" I'm guessing that would be
good enough to reduce false positive hits to an acceptably low level.
As much as I dislike the idea of putting "header" information into the
message-id, I think this has some potential. It forces the file segment
informaion into a very compact form so header downloads won't be too
adversely impacted. It gives newsreaders everything they need with no
changes to the current servers (other than the fact that the few servers in
the world that don't allow you to specify the Message-ID would not be
useable for posting binaries - but the users could still read binaries fine
from those servers).
It's also 100% compatible with all current formats used for posting
binaries to Usenet (uuencode, MIME, or yEnc) -- as long as you include
only one file or file segment in each article.
> (I.e. if you include an overall size component, servers could reject
> messages of a size they don't want to carry).
Current servers have no real abilty to filter on Message-ID, so this
isn't something they could make use of now, but it would be very
straight forward to add to any server. And the very cool thing
is that a server could filter their incomming feeds by full file size
and make changes to their filters without having to contact their peers!
Or you could simply filter all binaries from the feed if one day this
convention became the norm instead of the exception.
Servers at some point could start to reject posted binary articles that
didn't have a valid "binary" message-ID to help force the transistion
of Usenet to this standard. And they could check articles at time of post
to make sure the Message-ID was consistent with the data in the
article (all you could really check was the length of the encoded data
in the article - but that might be useful). Doing that for example would
prevent abuse where a hacker would post small fake messages in an attempt
to block parts of a post from getting out to the net by guessing at the
Message-IDs of the other parts that had not yet shown up.
--
Curt Welch http://CurtWelch.Com/
curt@kcwc.com Webmaster for http://NewsReader.Com/
Technical Details
Message-ID:
<20020320140409.897$WW_-_@newsreader.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!netnews.com!xfer02.netnews.com!feed1.newsreader.com!news2.newsreader.com!ellis.newsreader.com!not-for-mailReferences:
<us1c9ucatbi49fiq685eolg8jf73sjcta0@4ax.com> <3c98344b.1993605@news> <mgfc9uc7d9l0n2tprssu340g22r96uuseu@4ax.com> <20020318154507.410$TU@newsreader.com> <9hlc9u8ga789vu6hfcun0oln29ae6mck5m@4ax.com> <20020318160827.211$fq@newsreader.com> <ldmc9u48omjm6sf5vj9fn54c83tob9u69g@4ax.com> <20020318181949.333$Fq@newsreader.com> <180320022351466617%planb@newsreaders.com>Show Full Headers
Complete Article Headers
Message-ID: <20020320140409.897$WW_-_@newsreader.com>
Subject: Using Message-ID to store binary file information
Date: Wed, 20 Mar 2002 19:04:09 +0000
From: curt@kcwc.com (Curt Welch)
References: <us1c9ucatbi49fiq685eolg8jf73sjcta0@4ax.com> <3c98344b.1993605@news> <mgfc9uc7d9l0n2tprssu340g22r96uuseu@4ax.com> <20020318154507.410$TU@newsreader.com> <9hlc9u8ga789vu6hfcun0oln29ae6mck5m@4ax.com> <20020318160827.211$fq@newsreader.com> <ldmc9u48omjm6sf5vj9fn54c83tob9u69g@4ax.com> <20020318181949.333$Fq@newsreader.com> <180320022351466617%planb@newsreaders.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!netnews.com!xfer02.netnews.com!feed1.newsreader.com!news2.newsreader.com!ellis.newsreader.com!not-for-mail
Organization: NewsReader.Com
Newsgroups: alt.usenet.offline-reader.forte-agent,news.software.nntp
X-Trace: NewsReader.Com fT,IO6dO=u1A5q5Fn9X9-+loO@+_zbkBVV@5g_maU_fxlxq
X-Face: "p}G*1KH{+F7EYGKLb>ogDguabZ+%,?^epeFB!nzu`)`$=QcvL1KF6<0GH!Tbc!Sqo[|tV5
%IW48mQf3K=Ci&gZ7]]aazx@]Y-nq!r5{yH/#,?@lDdUDvOfByB2hVW0.@OM%{l/{cT'{w
X-Url: http://CurtWelch.Com/
User-Agent: NewsReader.Com
Lines: 117