Skip to content

Instantly share code, notes, and snippets.

View pfrazee's full-sized avatar

Paul Frazee pfrazee

View GitHub Profile

A shared file & object store for Beaker.

Requirements:

  • Applications need to share files & data with each other. For instance, you want to be able to share your contact list between apps. (Think about the ways that phones share data - it's the same story here.)
  • Userdata needs to persist outside of a given application. If I decide to stop using ContactsPro2000 then I still want UberFriends to have my contact list.
  • Ideally, users won't be interacting with files. We may still need that, but file-managers never make anybody smile. This isn't a hard requirement. If nothing else makes sense, we'll use a file manager.
  • Applications need to not clobber or corrupt each others' data. They need to work together.
  • We need some shared semantics, to handle interop. Solid, IPLD?
  • For that matter, I dont think it quite works to just have a bunch of files sitting around. We need smarter queries, like, "give me all the user's contacts." So, we need metadata
Process: Electron [62016]
Path: /Users/USER/*/Electron.app/Contents/MacOS/Electron
Identifier: com.github.electron
Version: 1.2.7 (1.2.7)
Code Type: X86-64 (Native)
Parent Process: node [62015]
Responsible: Terminal [1219]
User ID: 501
Date/Time: 2016-07-14 15:21:39.356 -0500
Share Link 6ece0d8319611a8a834e56a979f484898aaeda172ad5905de929dbceee19d34e
The Share Link is secret and only those you share it with will be able to get the files
Sharing /Users/paulfrazee/tmp/mytestdat, connected to 1/3 sources
Uploading 185.22 kB/s, 926.09 kB Totalfs.js:681
binding.read(fd, buffer, offset, length, position, req);
^
Error: Offset is out of bounds
at Error (native)
at Object.fs.read (fs.js:681:11)
/**
* Beaker applications that are loaded via dat:// or ipfs:// have a sandboxed `fs` available to them.
* But, they also need a way to get outside the sandbox, eg to work on a spreadsheet in ~/Documents
*
* This is an API for both use-cases.
* The application explicitly requests access outside of the sandbox.
* Those requests result in file-explorer dialogs, to pick the folder or file.
* The selection then stays in the app's perms until explicitly released, by the app or user.
**/
DAGNode {
_cached: null,
_encoded: null,
data: '\b\u0002\u0012�\u0001<!doctype html>\n<html>\n <head><title>Test ipfs site</title></head>\n <body>\n <h1>Hello, ipfs world</h1>\n <img src="/images/icon.png">\n </body>\n</html>\u0018�\u0001',
links: [] }

beaker ipfs/dat apps

what I think would be cool: an ipfs/dat site with an index.html that looks like this:

<!doctype html>
<script src="ipfs://mypfs.com/[email protected]"></script>
<script>exploreArchive('ipfs://pauls-public-files.com')</script>
var hyperdrive = require('hyperdrive')
var swarm = require('hyperdrive-archive-swarm')
var memdb = require('memdb')
var fs = require('fs')
var path = require('path')
var drive = hyperdrive(memdb())
var archive = drive.createArchive()
function ondnspeer (name, peer) {
console.log('ondnspeer', name, peer, self.destroyed)
}
ondnspeer 4ffa35f545e14b5eda5d768fc7c4fdf41d8d6f30 { port: 63229, host: '208.70.31.231' } false
ondnspeer 4ffa35f545e14b5eda5d768fc7c4fdf41d8d6f30 { port: 63297, host: '208.70.31.231' } false
ondnspeer 4ffa35f545e14b5eda5d768fc7c4fdf41d8d6f30 { port: 63297, host: '208.70.31.231' } false
ondnspeer 4ffa35f545e14b5eda5d768fc7c4fdf41d8d6f30 { port: 63229, host: '208.70.31.231' } false
ondnspeer 4ffa35f545e14b5eda5d768fc7c4fdf41d8d6f30 { port: 63297, host: '10.30.65.230' } false
function ondhtpeer (peer, infoHash) {

decentralized tech & enterprise

I have a sneaking suspicion that decentralized tech will despecialize enterprise solutions, and so make enterprise software cheaper. (If a solution works for consumer and enterprise, why would enterprise pay more? they just fold into the consumer market)

Broadly, whats good for consumers, should be good for enterprises.

  • Enterprises have organizational requirements which they solve with dollars (IT staff, purchases).
  • Consumers dont have that money to spend, and no top-down org, so they depend on automated solutions.
  • If the requirements align between consumers and enterprises, then a consumer solution will be cheaper (and more convenient) than the enterprise solution.
import * as yo from 'yo-yo'
import * as bookmarksData from '../data/bookmarks'
const KEYCODE_ENTER = 13
const KEYCODE_ESC = 27
// globals
// =
var bookmarksTBody