Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wallet-data concept & updates #1

Open
1 of 27 tasks
serapath opened this issue Aug 17, 2019 · 0 comments
Open
1 of 27 tasks

wallet-data concept & updates #1

serapath opened this issue Aug 17, 2019 · 0 comments

Comments

@serapath
Copy link
Member

serapath commented Aug 17, 2019

@todo

  • Research how DAT works
  • figure out how to use a p2p backend (e.g. dat) to store and retrieve data from
  • handle bookmarks/files
  • bookmark internal/external files
    • load and cache external files into browser storage (automatically/when clicked)
    • create new file/folder
    • rename/delete/move the file
    • bookmark a file (save it)
    • browse files or folders
    • send/export (download to computer, upload to swarm, share to github, create gist, share via local network (from coworker), share link on social media, send to a person)
    • receive/import (from computer, from swarm/github, get through local network)
  • Deploy dat-gateway and gonna research on hyperdrive
  • Try to push a file and save on DAT
  • import/exports/sync user data (dat/git/...)
  • implement a demo filesystem.html to use wallet-data
  • find a way to load a dat in the browser (coding a proof of concept)
  • find a way to create a new dat in the browser (coding a proof of concept)
  • find a way to publish and pin a dat from the browser to another browser (e.g. mobile phone)
  • find a way to pin/publish a browser created in the browser to a public dat server
  • find a way to backup all relevant dat keys to control a dat to disk (e.g. import/export key files)
  • find a way to deploy a new dat server from the browser
  • build a dat management tool for all dats i control or participate in

"dream scenario"

1. user comes to static page **our app** (=static website)
2. user interacts with app and any data is cached locally
3. user decides he likes the app and wants to keep his data
4. user clicks button: e.g. "backup your data" => This starts the process

5. user selects one of the freemium gateway deployment options
    * e.g.: heroku, zeit.co, aws, google cloud, azure, ..., hashbase?
    * (custom), e.g. rasberry pi, etc..
    * (local) download desktop, comandline client, beaker browser, ...
6. user remote controls/configures "their" gateway through
    * **our app** (=static website)
    * or a "browser extension" or other **app** we program specifically to manage the gateway
7. user can now use many other app's using their "dat data" by just connecting their dat address

message format { from, path, type, body }

  1. from = [<string> key1, <number> id1]
    • where key1 is the address or path of the sender
    • and id1 is unique message identifier for all the messages that sender sends
  2. path = [<string> key2, <number> id2]
    • where key2 is the address or path of the receipient (e.g. "foo/bar/baz")
    • and id2 is like a reference to an earlier message if there was one
  3. type = <string> (e.g. "get", "set", "list", ....)
    • to indicate what kind of event or command or request, etc... the message is all about
  4. body = <any>
    • is any kind of content appropriate for the given "type"

Use Cases:

  1. Users create all kinds of data while going through the workshops lessons & exercises in the skilltree.
    For example:
  • Writing a smart contract
  • Deploying a smart contract to a network at a specific address
  1. Users switch devices and might open the workshop app on their phone and on different computers or use different browsers or even clear browser caches or re-install their systems, but they don't want to lose their data and they want to continue smoothly when switching devices.
    For example:
  • A user starts a workshop at home on their laptop and wants to continue later using a tablet

Data:

  1. Users work create and change files and folders during workshops
  2. Users generate many actions or activities that go into some kind of journal

Idea:
Maybe we could try to use git or dat in mainstream browsers like (firefox/chrome/...) to enable users to store their Data and sove the two Use Cases listed above.


about iframes

localStorage has a data limit. If we store a lot we will need to switch later to indexeddb :-)

  1. all localStorage data is stored in the browser on the laptop of user 1
  2. all localStorage data is stored in the browser on the laptop of user 2

Link Collection:
A bunch of links to content that might be interesting and eventually useful to solve this issue


I think there are some ideas

  1. https://github.com/RangerMauve/dat-gateway
  2. Do a reverse proxy or Proxy PAC
  3. Node forward datDNS and TCP request to the upper gateway

Scenario

  1. User -> xxx proxy on Chrome
  2. Proxy open a new Tab
  3. User handle everything inside
  4. That tab bg activity handler data send and receive via PAC.

Useful lib

  1. https://www.npmjs.com/package/simple-peer
    2.http://y-js.org/
    3.https://github.com/nikolaiwarner/cabal-desktop-mini

just read through https://ar.al/2019/01/22/hypha-spike-multiwriter-1/
looks very very interesting.
Do I understand it correctly?

  1. You run dat in the browser (or in two browsers)
  2. The private dat key is stored locally in each browser
  3. you connect both browsers through a generic signalhub
  4. you make one browser talk to the other via webRTC to (e.g. authorize each other to write to those other dats)

...but essentially this kind of dat network and all the dat data stays in browsers - even though they might possibly sync to a dat client running on my desktop (outside the browser) if i run some kind of bridge ...

Is that how it works?
and also - can dats be used on static websites hosted on different domains?


answer

Heya (sorry, I don’t check DMs often). Yes, in a nutshell. Although you don’t have to store the secret key if you use deterministic keys (e.g., derived from a high-entropy passphrase) and also you can bridge to native clients that replicate over TCP by using the always-on node as a relay via WebSocket.

DATs can be used with static sites. It’s what I’m doing my blog currently (dat://ar.al – open that using Beaker Browser) :) But Hypha is the opposite of that. Everything is client-side and the always-on node (“server” in centralised parlance) is an untrusted/unprivileged node.


@alincode there is another issue we discovered that needs work, but it would probably be a project you would need to work on together with @ookangzheng

The skilltree module
The skilltree module is supposed to be a module which can be used to create a static githubpage which shows the skilltree (=curriculum) of connected existing workshop pages, so you could navigate between them.
It consists of two aspects

  1. discover and crawl the workshop.json files of existing workshops to get the "skilltree data"
  2. generate a visualisation from it which users can navigate and which is inspired by http://dungeonsanddevelopers.com
  • the config.json
    • was a very early experiment using user owned github repos instead of user owned dats and using the github api ..to play a little bit with new ways of doing things.
      Maybe it can serve as "inspiration", but that's it.
  • about matrix
    • i don't know a lot about matrix (but isn't it a federated system too?), but i'm hoping we could manage to use https://cabal-club.github.io/ in the browser in the future instead or in parallel to gitter
  • about dat-gateway


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

No branches or pull requests

1 participant