dat-ecosystem-archive/docs

Browser Dat section is out of date?

jonathanlb opened this issue · 2 comments

I'm having trouble trying the demos under the "Browser Dat" section. I'm sourcing dat-js from https://cdn.jsdelivr.net/dat/6.2.0/dat.min.js and running from Chrome 67.0.3396.87.

Run your own instance of signalhub
node ./node_modules/signalhub/bin.js listen -p 8080

with the dat/clone creation updated to something like

var datOpts = { signalhub: [ 'http://localhost:8080' ] };
// or omitting running your own instance
var datOpts = { 
  signalhub: [ 'https://signalhub-jccqtwhdwc.now.sh', 'https://signalhub-hzbibrznqa.now.sh' ]
};
var dat = Dat(datOpts);
  • The "Sharing data" subsection looks to have been cut-and-paste from the dat-js/README.md, but the datproject section omits the replicate() definition. The function parameter to clone.add() inside replicate() is never called.... I see my local signalhub v7.7.1 logging subscribe and broadcast of the key....
  • Under "Downloading data" the functional parameter to clone.add() never executes. I do see signalhub log the subscription....
  • "Under the hood" refers to 2016-era hyperdrive usage. dat-js depends upon hyperdrive v7.7.1, two major versions back from the latest. E.g. the default hyperdrive constructor no longer functions. Is it worth mentioning the version lag? Sourcing a working test or code snippet from dat-js? Removing the section?

The callbacks to Dat.add(key, repo) aren't triggered using either my local signalhub nor publicly available signalhubs at the github page. Am I not starting signalhub properly? I do see heartbeat traffic when I connect with curl and replay the requests from the Chrome debugger.

I'm happy to take a swing at updating the documentation once I can get a working example. Seeing that the dat-js github project has been archived, maybe the best thing to do is to remove the section from datproject.org?

Yeah, perhaps we should remove this section if we aren't supporting webrtc anymore, and replace it with some other example of using dat in the browser. Thoughts @jimpick?

I was having coffee with @joehand and we discussed possibly building out the the dat.land community site a bit more... This would be a good candidate to move over there. I'm going to get in touch with him shortly to discuss a bit more.