If you're already familiar with Hypercore, Hyperswarm, and the rest of the modules here, you might be wondering what's changed recently. In short: a lot! Here's a brief breakdown of some of the highlights.
We've decided to focus entirely on making our core building blocks as easy to use, as fast, and as reliable as possible. The goal is to give developers all the essential pieces needed to make killer P2P apps, without being unnecessarily opinionated and without introducing operational complexity.
We'd previously introduced the Hyperspace daemon and
hypCLI tool as core modules, but in practice found that they don't fit cleanly into this vision. We feel it's better to keep a tight focus on the fundamental building blocks so that others can build similar higher-level tools with zero friction. Given that, they are both now considered deprecated.
- An improved fork detection in the replication protocol, to improve resilience.
- Optional on-disk encryption for blocks (in addition to the existing transport encryption).
- The storage layer now uses a write-ahead log to better ensure that power loss or unexpected shutdown cannot lead to data corruption.
- An improved UDP holepunching algorithm that uses arbitrary DHT nodes (optionally selected by the connecting peers) to proxy necessary metadata while being maximally privacy-preserving.
- A custom-built transport protocol, UDX, that takes advantage of the holepunching algorithm to avoid unnecessary overhead (it doesn't include handshaking since holepunching takes care of that, for example). It's blazing fast.
- A simplified DHT API that closely resembles NodeJS's
netmodule, but using public keys instead of IPs.
- Uses Hyperbee internally for storing file metadata
- Major API simplification. Instead of mirroring POSIX APIs, the new API better captures the core requirements of P2P file transfer.
- Auxiliary tools, Localdrive and Mirrordrive, that streamline import/export flows and make it easy to mirror drives to and from the local filesystem. We use these every day when deploying Keet.
The latest release of Hyperdrive is currently published with the
nexttag, but will be released as a new major version soon.
Hypercores are single-writer data structures, but collaboration is crucial. Autobase is an experimental module that allows you to turn many Hypercores, owned by many different people, into a single 'virtual' Hypercore. In Keet, every member of a room has their input Hypercore where they write chat messages, and Autobase merges these into the linear view you see on screen.
Since Autobase's output shares the familiar Hypercore API, you can plug it into higher-level modules like Hyperbee and Hyperdrive, getting multi-user collaboration with little additional effort.
Autobase is still experimental and is likely to change significantly in the near future. If you're feeling adventurous, give it a shot!