org.hd.d.pg2k.svrCore.FEC
Class FECConsts

java.lang.Object
  extended by org.hd.d.pg2k.svrCore.FEC.FECConsts

public final class FECConsts
extends java.lang.Object

This holds compile-time constants for forward-error-correction (FEC) of exhibit data.


Field Summary
static int BASIC_FEC_BLOCK_BYTES
          Disc block size; postitive power of two larger than a disc sector.
static int FIXABLE_UNIT_FEC_BLOCK_SIZE
          FEC protection unit/block size; a positive power of two much larger than BASIC_FEC_BLOCK_BYTES.
static java.lang.String FIXABLE_UNIT_FEC_CHECKSUM_ALG
          The "fixable unit" block-checksum cryptographic checksum algorithm name.
static int MIN_BASIC_BLOCKS_REPAIRABLE
          Minimum number of "basic FEC block" failures per "fixable unit block" to be able to recover from; strictly positive.
 
Constructor Summary
private FECConsts()
          Prevent construction of an instance.
 
Method Summary
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BASIC_FEC_BLOCK_BYTES

public static final int BASIC_FEC_BLOCK_BYTES
Disc block size; postitive power of two larger than a disc sector. We assume that an especially common failure mode is for an entire sector to become unrecoverably unreadable, and thus our repair algorithm should work when a block at least this large (and on this alignment) fails.

Current common (2006) sector sizes are 512 bytes for magnetic media and 1024 bytes for optical media, with 4096 bytes being proposed as a new standard circa 2006.

We use the largest of these as our fundamental FEC block size.

See Also:
Constant Field Values

FIXABLE_UNIT_FEC_BLOCK_SIZE

public static final int FIXABLE_UNIT_FEC_BLOCK_SIZE
FEC protection unit/block size; a positive power of two much larger than BASIC_FEC_BLOCK_BYTES. Each block of this size of a raw exhibit file (and on this alignment) is treated independently by the FEC algorithm.

Any one exhibit will have a single fixable-unit block size, though some exhibits may transiently have a different-to-this size after a change in this value until the FEC data can be recomputed.

Its is useful be able to manipulate (multiple variants of) a whole such block in memory without straining the JVM/OS, and so a value from hundreds of kB to tens of MB is probably reasonable.

See Also:
Constant Field Values

FIXABLE_UNIT_FEC_CHECKSUM_ALG

public static final java.lang.String FIXABLE_UNIT_FEC_CHECKSUM_ALG
The "fixable unit" block-checksum cryptographic checksum algorithm name. We want a modern, reliable, reasonably-fast, JVM-supported algorithm, different to (and stronger/better than) the MD5 algorithm used to checksum entire exhibit files.

Ideally it should also be different to any underlying filesystem checksum (such as hard-disc CRCs/ECCs and the ZFS SHA-256 block-check), so as to maximise the chance of this FEC algorithm caching something that the others miss.

See Also:
Constant Field Values

MIN_BASIC_BLOCKS_REPAIRABLE

public static final int MIN_BASIC_BLOCKS_REPAIRABLE
Minimum number of "basic FEC block" failures per "fixable unit block" to be able to recover from; strictly positive. For RS-style FEC the extra file space overhead is directly proportional to this.

Since we are expecting the underlying filesystem to have a very low undetected/unrecoverable error rate then this can reasonably be as low as one.

We may be prepared to provide extra recovery/protection for popular and/or heavily-used and/or designated exhibits.

See Also:
Constant Field Values
Constructor Detail

FECConsts

private FECConsts()
Prevent construction of an instance.


DHD Multimedia Gallery V1.60.69

Copyright (c) 1996-2012, Damon Hart-Davis. All rights reserved.