Article View: news.software.nntp
Article #63816Re: xBin and PARity files
From: Curt Welch
Date: Mon, 03 Feb 2003 00:23
Date: Mon, 03 Feb 2003 00:23
143 lines
6947 bytes
6947 bytes
Oh, thank god, I found an aritcle in this thread that was actaully on
topic...
:)
Kjetil Torgrim Homme <kjetilho@haey.ifi.uio.no> wrote:
> [Curt Welch]:
> PAR was absent from my xBin draft (I simply forgot about it :-). just
> a detail: clearly specifying either P or N is mandatory. we could do
> either:
>
> P parity sequence number (defaults to 1)
> N number of segments spanned by parity data (mandatory)
>
> or
>
> P parity sequence number (mandatory, the first file has number 1)
> N number of segments spanned by parity data (defaults to 100)
or
P mandatory
N mandatory
> it feels more natural to identify PAR articles by looking for P.
It feels that way to me as well.
> the
> latter approach also has the advantage of giving a strong
> recommendation for how many parts a PAR file should cover,
That's a point I wouldn't have thought about. Do we know enough to be in
the position to make a strong recommendation? Is it even resonable to pick
a single number for everyone to use as a default?
My instincts tell me that any number we might pick would tend to become
outdated at some point in the future yet everyone that wrote a xBin
Message-ID decoder would be required to add that "100" default into their
code for the rest of time. It doesn't seem right to force any constant
(other than 0 or 1) into a standard when it's not required and likely to be
ignored at some point in the future.
But before picking a number, we would really need to write proof of concept
code and use it for a while to get a good feel for what the issues are.
> and it also reduces the msgid size slightly.
>
> <...~NBk...>
> <...~PC~NBk...>
> <...~PD~NBk...>
>
> vs.
>
> <...~PB...>
> <...~PC...>
> <...~PD...>
>
> (we may want to choose a different default value than 100, but it
> seems a nice and round number to me.)
Yeah, being able to leave out the the ~N sure makes it look nicer in
your example. But maybe the 4 saved characters are not really that
important and when you look at a full Message-Id is not going to make much
difference???
I think allowing the P to be optional is probably not the way to go. I too
like making the P the main key which makes it clear the ID is for a PAR
file.
If N is optional, then having a "useable" deafult seems wise. I think we
just need to have more experence with what "real" numbers would tend to be
used.
If N is not optional, then maybe it shoudn't even be a separate parameter?
Maybe both the par file number and the span size should be encoded into the
P value somehow? If the par formula number is limited to 256, then put
that in the lower 8 bits and the N value into the higher bits and encode it
as a single number which is the ~P parameter?
> > By adding in the segment offset and size (and for PAR files the par
> > sequence number) the download tool _never_ had to do anything else
> > besides look at the message-id to figure out what it has to download
> > to complete the files it's looking for.
>
> the segment size is the size of the PAR article, right?
That's what I was thinking.
> > > > So, if you post a set of articles each with this number of hash
> > > > blocks each:
> > > >
> > > > 20 20 20 20 20 19 19 19 19 19 19 19 19
> > > >
> > > > You can then post par files of size 20 for the first 5
> > > > articles, and par files of size 19, which cover the last
> > > > files. And then the par files exactly match the data they are
> > > > replacing, and if you are missing 19 blocks of data, you only
> > > > need to download 19 blocks of par file to replace it.
>
> the algorithm I specified will actually produce the sequence
>
> 20 20 20 20 19 19 19 19 19 19 19 19 20
>
> where the last block is only partially full. I don't think this
> matters much, the PAR file covering the last article will simply
> contain 22500 bytes more than necessary.
Yeah, the above makes the article sizes closer but creates a minor problem
with the PAR files. If you want to create a PAR file (using the
specification system we are talking about in this article) that spans the
last 5 articles of the above post you can't do it. The PAR file would end
up covering only the first 19 blocks of that last article.
One thing you could do is post those PAR file (which covers everything
expect the last partial block of the file, and then just re-post the last
partial file as is in a small file in case anyone needed it. But that's
getting strange. It would work however without anyone having to understand
what was going on because the download tool would just automatically figure
out what it needed and do the right thing.
However, posting the orginal as 20 20 19 19 19 18.5 takes the strangeness
out. The article sizes are not as close together in size this way, but,
the shortest article is the one posted last, and since smaller articles
tend to move though usenet slightly faster, that's not really a bad thing
either - i.e. the last article posted moving faster and catching up with
the previous ones.
In the end however, either would work with xBin as we are talking about it
now, so people that write the posting tools could decide for themself what
they think works best and post it either way.
As far as what we talk about in the spec, maybe the simpler way (which
produces posts with articles that aren't as close in size) is the better
one to go with because this is very complex already for a lot of people?
Or maybe we could mention both?
--
Curt Welch http://CurtWelch.Com/
curt@kcwc.com Webmaster for http://NewsReader.Com/
Technical Details
Message-ID:
<20030202192320.152$Sn@newsreader.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!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!feed3.newsreader.com!newsreader.com!news2.newsreader.com!ellis.newsreader.com!not-for-mailReferences:
<20021230133312.202$K5@newsreader.com> <20021230171837.399$Im@newsreader.com> <20030103212914.998$3s@newsreader.com> <20030130214337.749$eF@newsreader.com> <1ry951werx.fsf@vingodur.ifi.uio.no>Show Full Headers
Complete Article Headers
Message-ID: <20030202192320.152$Sn@newsreader.com>
Subject: Re: xBin and PARity files
Date: Mon, 03 Feb 2003 00:23:20 +0000
From: curt@kcwc.com (Curt Welch)
References: <20021230133312.202$K5@newsreader.com> <20021230171837.399$Im@newsreader.com> <20030103212914.998$3s@newsreader.com> <20030130214337.749$eF@newsreader.com> <1ry951werx.fsf@vingodur.ifi.uio.no>
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!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!feed3.newsreader.com!newsreader.com!news2.newsreader.com!ellis.newsreader.com!not-for-mail
Organization: NewsReader.Com
Newsgroups: news.software.nntp
X-Trace: NewsReader.Com 0z,,vc1@KiG-0J4PxBaHmo6=q.8Hu40IVDP89Z9fM5y,-wNsK
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: 142