🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nntp
3 messages
3 total messages Started by Chris Thu, 20 Mar 2003 22:19
xBin file set message format?
#64469
Author: Chris
Date: Thu, 20 Mar 2003 22:19
11 lines
1561 bytes
I've been hacking up ypost so that it will generate xBin headers, and I
realized that I didn't know how to generate file set messages.  Was there
some format that had been agreed upon?  I was thinking of just putting
~XB~T1 or something like that in the Message-ID: header, and then listing
the root hash of each file in the set on its own line in the message body.

I have an xBin C library pretty much complete if anybody is interested.

Cheers,
Chris
Re: xBin file set message format?
#64471
Author: Curt Welch
Date: Thu, 20 Mar 2003 22:38
54 lines
3814 bytes
"Chris" <nobody@rogers.com> wrote:
> I've been hacking up ypost so that it will generate xBin headers, and I
> realized that I didn't know how to generate file set messages.  Was there
> some format that had been agreed upon?  I was thinking of just putting
> ~XB~T1 or something like that in the Message-ID: header, and then listing
> the root hash of each file in the set on its own line in the message
> body.

No work at all has been done on the file format as far as I know.

If the file is official marked in the message-id however, we need to define
a file format.

What it must have is the list if xBin IDs (I'd argue that the root hash
alone really isn't right because the file size should be included as well).
I wanted to estabish that the "file id" all through the xBin "system" was
thought of as not just the root hash but the root hash + the file size.
This is most important to allow more effective bits in the Message-Ids
without having to use a full root hash in the Message-Id, but generally
seems useful throught the system to give us more effective "bits" to
identify files with and reduce the probability of collisions for large time
periods and large file sets.

But, in addition to the file-id, there are lots of reasons where you want
to include a lot more meta-data about the file - and that is very likely to
change from application to application.  The most obvious is a file name,
but other data like the mime type, is also very useful for a broad range of
applications.  And for backward compatiblity with things like csf files,
having other CRC or hash values like an MD5 if the file will be both useful
and important.  Text descriptions of the files are important (bascily the
stuff you would find in a subject line for a normal post), and general
"set" descriptions are good.

Then there's all sorts of more application specific meta data that would be
niec to include in thes files, like for jpgs, you can include the pixel
size of the image.  For mp3 files the encoding rate as well as artist, etc.

So, a general purpose format that would allow applications to add extra
meta data at will, but have the well known meta data (like filename, xBin
ID, mime time, description) well defined so they will work across all
appliations, would be important.

I was thinking some type of XML format would be a way to go, but I know
very little about how XML stuff is actually defined so I'd have to study
that more to really get a feel for how you define that.

> I have an xBin C library pretty much complete if anybody is interested.

Cool.

-- 
Curt Welch                                            http://CurtWelch.Com/
curt@kcwc.com                          Webmaster for http://NewsReader.Com/
Re: xBin file set message format?
#64476
Author: Chris
Date: Fri, 21 Mar 2003 06:21
112 lines
6819 bytes
On Thu, 20 Mar 2003 22:38:15 +0000, Curt Welch wrote:
> "Chris" <nobody@rogers.com> wrote:
>> I've been hacking up ypost so that it will generate xBin headers, and I
>> realized that I didn't know how to generate file set messages.  Was
>> there some format that had been agreed upon?  I was thinking of just
>> putting ~XB~T1 or something like that in the Message-ID: header, and
>> then listing the root hash of each file in the set on its own line in
>> the message body.
> 
> No work at all has been done on the file format as far as I know.

Same with repost request posts.  Although I suppose a repost request would
look almost identical to a data post, except it would have something like
~T2 or ~Trepost and no message body.  I can think of four message types
right now:
regular data posts
repost requests
parity data
fileset data

regular data posts and repost requests have identical Message-ID formats
except for the type indicator.  parity data posts have an additional ~P
field indicating which parity file this is of a given set and possibly a
~N field specifying the number of articles spanned (~s isn't good enough?)

> If the file is official marked in the message-id however, we need to
> define a file format.
> 
> What it must have is the list if xBin IDs (I'd argue that the root hash
> alone really isn't right because the file size should be included as
> well). I wanted to estabish that the "file id" all through the xBin
> "system" was thought of as not just the root hash but the root hash +
> the file size. This is most important to allow more effective bits in
> the Message-Ids without having to use a full root hash in the
> Message-Id, but generally seems useful throught the system to give us
> more effective "bits" to identify files with and reduce the probability
> of collisions for large time periods and large file sets.

Ok, so a file is identified by the combination of the root hash + the file
size, and you include only a portion of that information in the Message-ID
header.  In the fileset you would want to use all of the information.

On a sort-of-related (but not really) note, I remember someone mentioning
that some random characters should be included in the Message-ID header as
well (before the ~XB string?).  What was the purpose of that random data?

> But, in addition to the file-id, there are lots of reasons where you
> want to include a lot more meta-data about the file - and that is very
> likely to change from application to application.  The most obvious is a
> file name, but other data like the mime type, is also very useful for a
> broad range of applications.  And for backward compatiblity with things
> like csf files, having other CRC or hash values like an MD5 if the file
> will be both useful and important.  Text descriptions of the files are
> important (bascily the stuff you would find in a subject line for a
> normal post), and general "set" descriptions are good.
> 
> Then there's all sorts of more application specific meta data that would
> be niec to include in thes files, like for jpgs, you can include the
> pixel size of the image.  For mp3 files the encoding rate as well as
> artist, etc.
> 
> So, a general purpose format that would allow applications to add extra
> meta data at will, but have the well known meta data (like filename,
> xBin ID, mime time, description) well defined so they will work across
> all appliations, would be important.
> 
> I was thinking some type of XML format would be a way to go, but I know
> very little about how XML stuff is actually defined so I'd have to study
> that more to really get a feel for how you define that.

My first reaction to this is that it's overkill, but then I guess it
depends on what your goal is with xBin.  I don't know too much about XML
either, I've played around with it a bit so here's my amateurish attempt:

<xbFileSet> (this could be implied?)
<xbFile hash="SDF+12412/23FFSDFASI..." size="12345" filename="foo.bar"/>
<xbFile hash="sadfa..." size="123124" type="parity"
   filename="foo.bar.p01"/> (for non-xBin parityfiles like .par's)
   
<xbFile hash="sdf..." size="12345" type="audio">
   <format>mp3</format>
   <artist>The Tragically Hip</artist>
   <title>Bobcaygeon</title>
   ...
   </xbAudioFile>
</xbFile>
...
</xbFileSet>

The XML gurus will probably want to have my head for this, I'm never sure
what should be an attribute of a tag and what should have its own tag.
Trouble with this is that it's not very human-readable.  Sure, you can
work your way through it but it's not immediately obvious.  Although the
newsreader could present it in a more friendly manner.  It also depends on
the poster to enter the correct information.  If I want my newsreader to
download all songs by "The Tragically Hip", and somebody posts an mp3 with
artist set to "Tragically Hip", what happens?  It kind of comes down to
the same problem that we have with subject lines.  The information in the
subject is useful to humans, but not as useful to machines.

In any case, there needs to be newsreaders out there able to support all of
this great functionality.  What are the popular ones out there, and how
can we get xBin support into them?  I'm trying to write the C library so
that it's easy to incorporate into existing programs, but even ypost
required some non-trivial modifications (all due to getting ypost to post
articles of the correct sizes (multiples of the block size, which I have
set to 22500) ).  I can imagine modifying a newsreader to support xBin
would be far more difficult.

Cheers,
Chris
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