🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #64019

Re: xBin and PARity files

#64019
From: Curt Welch
Date: Wed, 12 Feb 2003 21:01
189 lines
11187 bytes
Rene <invalid@email.addr> wrote:
> curt@kcwc.com (Curt Welch) wrote:
> > Rene <invalid@email.addr> wrote:
> > > Well why not simply define the regions such as they are power of
> > > two's blocks, so they are (in the full hash tree of the full file)
> > > covered somewhere by one single hash ? Then you'll only need to
> > > include that single hash.
> >
> > Well, that's not bad.  But it makes it hard to do that and to also keep
> > the PAR file virtual regions aligned with the orginal articles you are
> > trying to repair.  So then you are forcing the PAR articles to be
> > strange sizes and you are forcing the user to download extra PAR data
> > (because of the alignment problems).
>
> You can't align anyway. The user can get his blocks from any number of
> sources who may or may not use different article sizes. There will be
> overhead at the edges - it's unavoidable.

It's all a matter of probability.  What are the odds that people got their
data from more than post?  If I post a 1000 part file which has never been
posted before, and I start to see repost requests, I know for a fact that
all of them got the data from my orginal post.  If I post par data which is
allined with the orgnal articles, then that data is going to be of maximum
use to everyone asking for a repost.

Of course, without the system in use, it's very hard to know how it's going
to be used.

However, with your system, where the PAR data is defined by some constant
defintion and is _never_ alingned to the articles, people will always be
forced to download extra PAR data which will be of no use to them.  If you
can prevent downloading extra data 50% of the time, why not do that?

> That's why we need to find a good threshold where a repost is better than
> a par.

This is something that's had to understand without more re-world usage to
guide us.

It is something the repost tool can always calcaulte no matter what system
we use.  But it can only calculate it if it has all the repost requests -
which it never will.  There will always be people missing parts which don't
bother to post a repost request.  The more par data you post, the more
likely you are helping someone who didn't ask for help.

> I certainly see the reason why to make a PAR fit in a single
> article, but when we really want to do that, I say kick PAR and use a
> one-article repost in the first place.

You are mis-understanding something very basic about RS data.  I know you
understand this, but you just haven't "seen it" yet.  Let me help...

Par data is not article, or file oriented.  It's word oriented (i.e. the
word sized used for the RS calculation).  For the rest of this, I'll assume
we are talking about 8-bit words, i.e. bytes, but as you know, we could
pick 16 bit words as well...

Every byte of RS data protects N well defined bytes from the file.  Every
byte of RS data is useful on it's own.  If I was able to recover only 10
bytes of RS data from a PAR file, it would be useful to help fill in
missing bytes of a file I wanted to download.

For your idea, you are thinking about dividing the large file into some
fixed sized virtial segments (like 8MB), and them posting PAR "files" for
those virtual segments.  But because your virtual segments are larger than
a typical article, one of your "PAR" files, might actaully be 16 articles
of 512K each.

However, your virtual "PAR FILE" will have problems if one of it's articles
is lost.  But, what's important, is that every byte, of every PAR article
is useful by itself.  One of your par articles is useful even if the other
9 were lost.  Your first 512K PAR article, ends up protecting the first
512K over every one of you 8MB "virtual" segements.

A download tool needs to know this.  It needs to know exactly what PAR
bytes are in every article, and it needs to know which bytes from the full
file it's protecting so that it can calculate which articles it needs to
download.

It's stupid as hell to make a download tool download 16 par articles when
in fact, all it needed was articles 3 and 4 from that.  So what's most
important is that the headers (hopfully the Message-ID alone) will tell the
download tool everything it needs to know about the par data in eacy
article to figure out if that article is useful and to figure out "how"
useful that article is to minimize wasted downloads.

> PAR is powerfull but not when cut down to such small sizes !

PAR is defined in terms of small sizes - bytes.

> The
> advantage of PAR over repost is that it can fix more than one gap for
> several users. If the PAR has to be small, the region it can cover is
> going to be small too.

If a PAR article is 500K it covers multiple 500K chunks of file wether you
use your system or mine.  It's the same either way. It's only a question of
how those 500K virtual segments are spread over the file.

With your system, the 500K chunks one of your PAR articles covers are
spread out through the file with gaps between them but will always span the
entire file.  With mine, the chunks are always contiguous, but may not span
the entire file.

So, if you break the large file into "article-size" chunks, and number all
the chunks in the file from 0 to 10,000, one of your par articles (one
"chunk" in size), might cover chunks 0, 100, 200, 300, etc from the file.
The next article you post then covers 1, 101, 201, 301, etc, the third
article you post will cover 2, 102, 202, etc....

One of my chunks instead covers 0 to 99.  The next one covers 100 to 199,
the next one 200 to 299, etc.

You see, there is in fact very little difference between our systems.
What's most important is that that the download tool can figure out exactly
what data is being protected by each PAR article posted.

We can actaully label the articles so either could be used.  But it would
requre either adding yet another paramater to the Message-ID from what I
had proposed.  It would require that you not only specify the size of the
chunk, the offset of the first chunk, and the repeat count (which I had
already specified), but it would also require a "spacing" argument which
specifies how far apart each chunk was spaced.

In your idea, this "spacing" would be pre-defined for all par files as your
"virtial PAR segment size".  And the repeat count would be unneeded because
your PAR files are always assumed to span the entire file.  However, to
allow the download tool to make use of each PAR article without forcing
them to have to find the entire "set" for a virutal segemnt, you need to
label each article to make it clear what the offset, and size, of the RS
data in the PAR article was.

> Thus the potential benefit decreases while a
> certain overhead in producing the PAR data remains.

If someone is missing articles 4 and 5, and can post two par files which
scan articles 1 to 100.  The amount of data I have to scan to calculate the
par files is 100 articles.  The amount of data they have to download is
exactly the same as the amount they are missing.  If anyone is missing 1 or
two articles out of those first 100 they can use my par files.

If your "virtial" files span 8.5 articles each, and if the entire post is
500 articles, then with your system you are trying to get people to post 2
PAR files of 8.5 articles each, and to calculate those PAR files, the code
will have to scan all 500 articles of the file.

How is forcing the par generation system to scan 500 articles instead of
100, and forcing someone to post 17 articles instead of 2, and forcing
someone to download 17 articles instead of 2 "more effecent"?

So you say they should just repost articles 4 and 5 in this case.  How is
that better than reposting two par files of the same size which lots of
people might have been able to use?

And, in your system, as it turns out, the first person didn't really have
to post 17 articles anyway because not all that PAR data was needed.  Only
the par data spanning articles 4 and 5 was needed.  So if your "8.5 article
PAR FILES" where actually posted as 8.5 articles, then only articles 4 and
5 from the first set would be needed.  So with your system, you could post
"the right thing" as long as they are labled correctly so the download tool
could figure that out.

So, mostly what is important here is to have a system that correctly labels
each file so that each PAR file can be used on it's own to fix missing
data.

> The question thus becomes: How do we weight the one against the other?

The question is how complex do you really need to make par articles.  Is
consetive par segements (my system) good enough, or is it really important
to be able to space them out over the file (your system).  And is it
important to limit the range of the protected segments (required in my
system because 8 bit words can't span larger files), or is it wise to force
them to always span the entire file (your system).

If they always span the entire file, then either you have to limit the max
size of the file, or define the "virtual PAR segments" as a function of the
file size.

BTW, I don't expect 99% of the people that read this post to understand
what the fuck I'm talking about.  If you don't understand how the RS
algortihm works, and carfully follow my use of terms like "file", "virtual
segment", "chunk", and "article", you will get lost very quickly.  It would
really be a lot easier to explain this if I could draw pictures.

-- 
Curt Welch                                            http://CurtWelch.Com/
curt@kcwc.com                          Webmaster for http://NewsReader.Com/
Technical Details
Message-ID: <20030212160144.071$NF@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!sn-xit-02!sn-xit-03!sn-xit-06!sn-xit-08!supernews.com!38.144.126.75.MISMATCH!feed1.newsreader.com!newsreader.com!news2.newsreader.com!ellis.newsreader.com!not-for-mail
References: <20021230133312.202$K5@newsreader.com> <20021230171837.399$Im@newsreader.com> <1r7kdr2id0.fsf@vingodur.ifi.uio.no> <20021231140408.995$iu@newsreader.com> <1rlm24a74r.fsf@thrir.ifi.uio.no> <20030101222332.694$bV@newsreader.com> <1rptrflqrl.fsf@ellifu.ifi.uio.no> <20030102152631.435$cR@newsreader.com> <20030104175550.818$mI@newsreader.com> <20030105223458.280$SO@newsreader.com> <20030106051307.259$0O@newsreader.com> <20030130214837.046$fc@newsreader.com> <20030206203828.211$Vw@newsreader.com>

Show Full Headers
Complete Article Headers
Message-ID: <20030212160144.071$NF@newsreader.com>
Subject: Re: xBin and PARity files
Date: Wed, 12 Feb 2003 21:01:44 +0000
From: curt@kcwc.com (Curt Welch)
References: <20021230133312.202$K5@newsreader.com> <20021230171837.399$Im@newsreader.com> <1r7kdr2id0.fsf@vingodur.ifi.uio.no> <20021231140408.995$iu@newsreader.com> <1rlm24a74r.fsf@thrir.ifi.uio.no> <20030101222332.694$bV@newsreader.com> <1rptrflqrl.fsf@ellifu.ifi.uio.no> <20030102152631.435$cR@newsreader.com> <20030104175550.818$mI@newsreader.com> <20030105223458.280$SO@newsreader.com> <20030106051307.259$0O@newsreader.com> <20030130214837.046$fc@newsreader.com> <20030206203828.211$Vw@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!sn-xit-02!sn-xit-03!sn-xit-06!sn-xit-08!supernews.com!38.144.126.75.MISMATCH!feed1.newsreader.com!newsreader.com!news2.newsreader.com!ellis.newsreader.com!not-for-mail
Organization: NewsReader.Com
Newsgroups: news.software.nntp
X-Trace: NewsReader.Com nQvvdPRU6qQbsxJ@@3a=D+/G1y.gH20fnrGaLiFW-j4,I+G@
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: 188