Skip to content

Instantly share code, notes, and snippets.

@pfrazee
Last active January 13, 2017 19:03
Show Gist options
  • Save pfrazee/e8e743aaeb25b71b7f7bde419c2e7dc6 to your computer and use it in GitHub Desktop.
Save pfrazee/e8e743aaeb25b71b7f7bde419c2e7dc6 to your computer and use it in GitHub Desktop.

So far, here's what I've uncovered. I made tempfixes as I went. I'm going to make PRs now, and see what all these fixes get us.

1. beaker wasnt listening to additional requests

Due to a bad bit of logic, Beaker isn't taking advantage of multiplexing. This actually isn't a significant factor though, because hypercloud shouldn't be using active replication anyway.

2. hypercloud dns config wasnt set

Hypercloud just isnt using dns discovery at all.

3. emitting the 'add' event too soon

Hypercore-Archiver is emitting the 'add' event before persisting new keys to disk, causing archiver-server to join the discovery swarm prematurely. Beaker would connect and replication would fail.

4. multiple connections issue

Discovery swarm isnt creating one connection for each peer/discoveryKey combo. Instead, it's creating one connection for each peer. The connection would sit open and so nothing else would happen.

5. (possibly) letting the cloud initiate connections causes failures

I have to confirm this still, but there were some signs that connections might be failing if they were initiated by hypercloud to my device running beaker. I want to get fixes 1-4 done, then I'll check on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment