Skip to content
This repository has been archived by the owner on Jun 3, 2020. It is now read-only.

Move to the new hyperdrive-daemon (WIP) #24

Open
wants to merge 74 commits into
base: blue
Choose a base branch
from
Open

Conversation

pfrazee
Copy link
Member

@pfrazee pfrazee commented Jul 10, 2019

This is a work-in-progress PR to replace the dat-daemon with the new hyperdrive-daemon which will also move us to the new Dat 2.0 stack. I will update the TODOs as this progresses.

TODOS

  • Replace the daemon getArchiveInfo()
  • Implement all existing hyperdrive methods
  • PDA2
    • stat() .blocks and .downloaded (relies on upstream)
    • readFile opts (relies on upstream)
    • writeFile opts (relies on upstream)
    • mount() should resolve DNS before mounting
    • update docs
  • Resolve whether the .key file should be part of drives
  • Occasional "Error: Failed to connect before the deadline" on startup hypercore-protocol/hyperdrive-daemon-client#3
  • Add fns to stat output (isFile, etc) hypercore-protocol/hyperdrive-daemon-client#4
  • Update hyperdrive-daemon to level@5
  • Issue: Mounting at a version is failing
  • Issue: isSymbolicLink() is not returning true
  • Issue: first visit needs to wait for data before attempting to read (getting 'no file found' because not waiting for a file listing to come down)
  • Issue: Daemon will sometimes fail with "Bandwidth exhausted"
  • Implement the mount API
  • Implement the symlink API
  • Implement network events and stats (relies on upstream)
  • Implement disk-usage tracking (relies on upstream)
  • Implement local disk-usage management including clearing all stored data (relies on upstream)
  • Test folder-sync
  • Move the exportArchiveToArchive algorithm out of the old daemon and into beaker (fork relies on this)
  • Move the folder-sync algorithm out of the old daemon and into beaker
  • Move the "preview mode" scoped-fs management out of the old daemon and into beaker
  • Replace or deprecate the auto-download behavior
  • Deprecate or replace the dat bandwidth throttle config
  • Deprecate or replace all debug/logging in the old daemon
  • Deprecate or replace the wire-protocol extensions (datPeers)
  • Move the daemon into an external self-managing process (relies on upstream)
  • Create a migration flow for previous user-data

@pfrazee
Copy link
Member Author

pfrazee commented Jul 11, 2019

Achievement unlocked: Loaded a hyperdrive 10 site (from Copenhagen!)

@andrewosh
Copy link

andrewosh commented Aug 15, 2019

hyperdrive-daemon 0.10.0 has a few changes that should fix a few of your remaining issues:
New methods:

  1. createDiffStream, which you can use as a replacement for history for the time being.
  2. checkout, which behaves the same as Hyperdrive.checkout, except it is async and returns a RemoteHyperdrive. You can use these with createDiffStream using Hyperdrive's API.
  3. version, an async method which returns the current drive version.
  4. There are client/server implementations for download, but don't use that one quite yet (Hyperdrive impl still pending).

Bug fixes:

  1. isSymbolicLink should return true for symlinks now, as stat returns the same object that's used in Hyperdrive (factored out into a separate module).
  2. readFile accepts an encoding option now.
  3. .key is no longer written as an actual file to any drives.
  4. The connection timeout's been increased, and a connectionTimeout option has been exposed so you can tweak it as you need (this will need to be given more thought, too).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants