Giter VIP home page Giter VIP logo

javareedsolomon's Introduction

JavaReedSolomon

Backblaze Reed-Solomon Erasure Coding Implementation in Java

Background:

  • Uses a Reed-Solomon encoding matrix to construct parity bits.
  • Uses the inverse matrix to reconstruct the original data.

Simple Functionality:

  • Construct a ReedSolomon “codec”
  • Construct a byte matrix to simulate intact and failed shards
  • Use codec.encodeParity() function to reconstruct the failed shards.

Usage:

  1. Break a file into shards.
  2. Encode parity.
  3. Take a subset of the shards and reconstruct the original file.

Setup:

  1. Clone the repo from https://github.com/Backblaze/JavaReedSolomon
  2. Install the following dependencies:
  • Latest version of JDK (check updates).
  • Latest version of JRE (check updates).
  • Latest version of Gradle.
  1. Open the build.gradle file and change “testCompile” to “testImplementation” Why? Answer: Backblaze/JavaReedSolomon#18
  2. Run gradle build
  3. Run ./gradlew run

Benchmarking Notes:

  • ReedSolomon loops over the data shards, parity shards, and bytes within the shards to perform reads and computations, and uses one of two multiplication methods.
  • Three Loops:
    • “Byte”: Index of byte within shard (default = 200,000 bytes per shard)
    • “Input”: Which input shard is being read (default = 17 data shards)
    • “Output”: Which output shard is being computed (default = 3 parity shards)
  • Multiplication Method for matrices:
    • “Table”: Multiplication table for the Galois (finite) Field
    • “Exp”: Logarithm/Exponents tables
  • Performance of the inner loop depends on the specific processor you’re running on.
  • There are 12 different permutations of the loop, some may be faster than others on a particular machine.
  • Each permutation nests the three loops in a different order and uses one of the two multiplication methods.
  • Number of parity shards, number of data shards and buffer sizes in the benchmark are adjustable.

javareedsolomon's People

Stargazers

 avatar

Watchers

Rajdeep Rana avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.