mirror of
https://github.com/aljazceru/pear-docs.git
synced 2025-12-17 14:34:19 +01:00
link fixes
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
<mark style="background-color:green;">**stable**</mark>
|
||||
|
||||
Hyperbee is an append only B-tree based on [hypercore.md](hypercore.md). It provides a key/value-store API, with methods for inserting and getting key-value pairs, atomic batch insertions, and creating sorted iterators. It uses a single Hypercore for storage, using a technique called embedded indexing. It provides features like cache warmup extension, efficient diffing, version control, sorted iteration, and sparse downloading.
|
||||
Hyperbee is an append only B-tree based on [`Hypercore`](hypercore.md). It provides a key/value-store API, with methods for inserting and getting key-value pairs, atomic batch insertions, and creating sorted iterators. It uses a single Hypercore for storage, using a technique called embedded indexing. It provides features like cache warmup extension, efficient diffing, version control, sorted iteration, and sparse downloading.
|
||||
|
||||
> As with the Hypercore, a Hyperbee can only have a **single writer on a single machine**; the creator of the Hyperdrive is the only person who can modify it as they're the only one with the private key. That said, the writer can replicate to **many readers**, in a manner similar to BitTorrent.
|
||||
|
||||
@@ -58,7 +58,7 @@ npm install hyperbee
|
||||
|
||||
#### **`const db = new Hyperbee(core, [options])`**
|
||||
|
||||
Make a new Hyperbee instance. `core` should be a [hypercore.md](hypercore.md).
|
||||
Make a new Hyperbee instance. `core` should be a [`Hypercore`](hypercore.md).
|
||||
|
||||
`options` include:
|
||||
|
||||
|
||||
@@ -465,7 +465,7 @@ The `isInitiator` argument is a boolean indicating whether a peer is the initiat
|
||||
|
||||
To multiplex the replication over an existing Hypercore replication stream, another stream instance can be passed instead of the `isInitiator` Boolean.
|
||||
|
||||
To replicate a Hypercore using [hyperswarm.md](hyperswarm.md):
|
||||
To replicate a Hypercore using [`Hyperswarm`](hyperswarm.md):
|
||||
|
||||
```javascript
|
||||
// assuming swarm is a Hyperswarm instance and core is a Hypercore
|
||||
@@ -474,10 +474,10 @@ swarm.on('connection', conn => {
|
||||
})
|
||||
```
|
||||
|
||||
> To replicate many Hypercores over a single Hyperswarm connection, see [corestore.md](../helpers/corestore.md).
|
||||
> To replicate many Hypercores over a single Hyperswarm connection, see [`Corestore`](../helpers/corestore.md).
|
||||
|
||||
|
||||
If not using [hyperswarm.md](hyperswarm.md) or [corestore.md](../helpers/corestore.md), specify the `isInitiator` field, which will create a fresh protocol stream that can be piped over any transport:
|
||||
If not using [`Hyperswarm`](hyperswarm.md) or [`Corestore`](../helpers/corestore.md), specify the `isInitiator` field, which will create a fresh protocol stream that can be piped over any transport:
|
||||
|
||||
```javascript
|
||||
// assuming we have two cores, localCore + remoteCore, sharing the same key
|
||||
|
||||
@@ -65,7 +65,7 @@ npm install hyperdrive
|
||||
|
||||
#### **`const drive = new Hyperdrive(store, [key])`**
|
||||
|
||||
Creates a new Hyperdrive instance. `store` must be an instance of [corestore.md](../helpers/corestore.md).
|
||||
Creates a new Hyperdrive instance. `store` must be an instance of [`Corestore`](../helpers/corestore.md).
|
||||
|
||||
By default, it uses the core at `{ name: 'db' }` from `store`, unless the public `key` is set.
|
||||
|
||||
@@ -255,7 +255,7 @@ Returns a read stream of entries in the drive.
|
||||
|
||||
#### **`const mirror = drive.mirror(out, [options])`**
|
||||
|
||||
Mirrors this drive into another. Returns a [mirrordrive.md](../helpers/mirrordrive.md) instance constructed with `options`.
|
||||
Mirrors this drive into another. Returns a [`MirrorDrive`](../helpers/mirrordrive.md) instance constructed with `options`.
|
||||
|
||||
Call `await mirror.done()` to wait for the mirroring to finish.
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
<mark style="background-color:green;">**stable**</mark>
|
||||
|
||||
Corestore is a Hypercore factory that makes it easier to manage large collections of named Hypercores. It is designed to efficiently store and replicate multiple sets of interlinked [hypercore.md](../building-blocks/hypercore.md)(s), such as those used by [hyperdrive.md](../building-blocks/hyperdrive.md), removing the responsibility of managing custom storage/replication code from these higher-level modules.
|
||||
Corestore is a Hypercore factory that makes it easier to manage large collections of named Hypercores. It is designed to efficiently store and replicate multiple sets of interlinked [`Hypercore`](../building-blocks/hypercore.md)(s), such as those used by [`Hyperdrive`](../building-blocks/hyperdrive.md), removing the responsibility of managing custom storage/replication code from these higher-level modules.
|
||||
|
||||
> [GitHub (Corestore)](https://github.com/holepunchto/corestore)
|
||||
|
||||
@@ -80,7 +80,7 @@ Corestore replicates in an 'all-to-all' fashion, meaning that when replication b
|
||||
|
||||
If the remote side dynamically adds a new Hypercore to the replication stream (by opening that core with a `get` on their Corestore, for example), Corestore will load and replicate that core if possible.
|
||||
|
||||
Using [hyperswarm.md](../building-blocks/hyperswarm.md) one can replicate Corestores as follows:
|
||||
Using [`Hyperswarm`](../building-blocks/hyperswarm.md) one can replicate Corestores as follows:
|
||||
|
||||
```javascript
|
||||
const swarm = new Hyperswarm()
|
||||
@@ -112,7 +112,7 @@ const core1 = ns1.get({ name: 'main' }) // These will load different Hypercores
|
||||
const core2 = ns2.get({ name: 'main' })
|
||||
```
|
||||
|
||||
Namespacing is particularly useful if an application needs to create many different data structures, such as [hyperdrive.md](../building-blocks/hyperdrive.md)s, that all share a common storage location:
|
||||
Namespacing is particularly useful if an application needs to create many different data structures, such as [`Hyperdrive`](../building-blocks/hyperdrive.md)s, that all share a common storage location:
|
||||
|
||||
```javascript
|
||||
const store = new Corestore('./my-storage-dir')
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Localdrive
|
||||
|
||||
A file system API that is similar to [hyperdrive.md](../building-blocks/hyperdrive.md). This tool comes in handy when mirroring files from user filesystem to a drive, and vice-versa.
|
||||
A file system API that is similar to [`Hyperdrive`](../building-blocks/hyperdrive.md). This tool comes in handy when mirroring files from user filesystem to a drive, and vice-versa.
|
||||
|
||||
> [GitHub (Localdrive)](https://github.com/holepunchto/localdrive)
|
||||
|
||||
@@ -146,7 +146,7 @@ Returns a stream of all subpaths of entries in drive stored at paths prefixed by
|
||||
|
||||
**`const mirror = drive.mirror(out, [options])`**
|
||||
|
||||
Mirrors this drive into another. Returns a [mirrordrive.md](../helpers/mirrordrive.md) instance constructed with `options`.
|
||||
Mirrors this drive into another. Returns a [`MirrorDrive`](../helpers/mirrordrive.md) instance constructed with `options`.
|
||||
|
||||
Call [`await mirror.done()`](../helpers/mirrordrive.md#await-mirrordone) to wait for the mirroring to finish.
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# MirrorDrive
|
||||
|
||||
Mirrors a [hyperdrive.md](../building-blocks/hyperdrive.md) or a [localdrive.md](../helpers/localdrive.md) into another one.
|
||||
Mirrors a [`Hyperdrive`](../building-blocks/hyperdrive.md) or a [`LocalDrive`](../helpers/localdrive.md) into another one.
|
||||
|
||||
> [GitHub (Mirrordrive)](https://github.com/holepunchto/mirror-drive)
|
||||
|
||||
|
||||
@@ -9,9 +9,9 @@ pear init -y -t terminal
|
||||
npm install hyperswarm hyperdrive localdrive corestore debounceify b4a graceful-goodbye
|
||||
```
|
||||
|
||||
[hyperdrive.md](../building-blocks/hyperdrive.md) is a secure, real-time distributed file system designed for easy peer-to-peer file sharing. In the same way that a Hyperbee is just a wrapper around a Hypercore, a Hyperdrive is a wrapper around two Hypercores: one is a Hyperbee index for storing file metadata, and the other is used to store file contents.
|
||||
[`Hyperdrive`](../building-blocks/hyperdrive.md) is a secure, real-time distributed file system designed for easy peer-to-peer file sharing. In the same way that a Hyperbee is just a wrapper around a Hypercore, a Hyperdrive is a wrapper around two Hypercores: one is a Hyperbee index for storing file metadata, and the other is used to store file contents.
|
||||
|
||||
Now mirror a local directory into a Hyperdrive, replicate it with a reader peer, who then mirrors it into their own local copy. When the writer modifies its drive, by adding, removing, or changing files, the reader's local copy will be updated to reflect that. To do this, use two additional tools: [mirrordrive.md](../helpers/mirrordrive.md) and [localdrive.md](../helpers/localdrive.md), which handle all interactions between Hyperdrives and the local filesystem.
|
||||
Now mirror a local directory into a Hyperdrive, replicate it with a reader peer, who then mirrors it into their own local copy. When the writer modifies its drive, by adding, removing, or changing files, the reader's local copy will be updated to reflect that. To do this, use two additional tools: [`MirrorDrive`](../helpers/mirrordrive.md) and [`LocalDrive`](../helpers/localdrive.md), which handle all interactions between Hyperdrives and the local filesystem.
|
||||
|
||||
This example consists of three files: `writer.js`, `drive-reader.js` and `bee-reader.js`.
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Hyperbeam
|
||||
|
||||
An end-to-end encrypted pipeline for the Internet, utilizing the [hyperswarm.md](../building-blocks/hyperswarm.md) and Noise Protocol for secure communications.
|
||||
An end-to-end encrypted pipeline for the Internet, utilizing the [`Hyperswarm`](../building-blocks/hyperswarm.md) and Noise Protocol for secure communications.
|
||||
|
||||
> [GitHub (Hyperbeam)](https://github.com/mafintosh/hyperbeam)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user