GithubHelp home page GithubHelp logo

hard.io's Introduction

Shorthair Low-Latency Networking

The Shorthair library uses Calico and Wirehair to provide low-latency loss-prevention and data integrity, which uses extra bandwidth to make almost any unreliable packet channel suitable for real-time communication.

Pros:

  • Two-way communication over a single lossy channel.

  • You can dial the packet loss to any acceptable rate for your application.

  • It has a RTT*3/2 upper-bound delay for the data it protects, which is the lower-bound for recovering data with ARQ.

  • Calculates and generates precisely the amount of redundancy required to achieve the target loss rate.

  • It supports variable-length data packets.

  • Overhead is 16 bytes/packet.

  • Provides data encryption and integrity validation.

  • Redundant packets are 18 bytes + size of largest packet in the code group.

  • Ruthlessly-optimized multi-threaded software.

  • Library has a clean platform-independent interface with minimal configuration required.

Cons:

  • Congestion control/avoidance is not provided.

  • It doesn't handle re-ordering.

  • It doesn't guarantee delivery of your data.

In short, it solves the hardest problems of using UDP/IP.

Applications

On top of Shorthair you can build any number of other transport protocols involving ordered-reliable, ordered-unreliable, and unordered-unreliable combinations. As a black box you can treat it like normal UDP with some nice additional features (security, very low loss) as otherwise it works identically.

ARQ can be built effectively on top of Shorthair producing a hybrid that has very low average latency and guaranteed delivery. Sending a NACK over the reverse channel as normal data is an effective way to recover from losses for full reliability, whereas normal ARQ would suffer from over 2x the normal packet loss rate to recover from a loss event.

Also consider a broadcast scenario with many receivers, where the loss rate is mulitplied by N. Someone out there is going to have a bad time every time a new message is rebroadcast.

I decided to split the transport layer into shorthair + ARQ/CC since for a lot of applications like audio streaming, ARQ and CC are not even desired.

hard.io's People

Contributors

chris-gc avatar

Watchers

 avatar  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.