A Filesystem on Noms

nomfs in action (for non-readers)

What’s Modern?

Snapshots

Dedup

Consistency

Backup

Designing a Schema

Initially, Badly

Schema philosophy

A Better Schema

struct LinkedList {
data: Blob
next: Cycle<0>
}

Writing It

Demo

$ go build
$ mkdir /var/tmp/mnt
$ ./nomsfs /var/tmp/nomsfs::fs /var/tmp/mnt
running…
Your database fell into my filesystem!
$ noms show http://demo.noms.io/ahl_blog::fs
struct Commit {
meta: struct {},
parents: Set<Ref<Cycle<0>>>,
value: struct Filesystem {
root: struct Inode {
attr: struct Attr {
ctime: Number,
gid: Number,
mode: Number,
mtime: Number,
uid: Number,
xattr: Map<String, Blob>,
},
contents: struct Directory {
entries: Map<String, Cycle<1>>,
} | struct Symlink {
targetPath: String,
} | struct File {
data: Ref<Blob>,
},
},
},
}({
meta: {},
parents: {
5v82rie0be68915n1q7pmcdi54i9tmgs,
},
value: Filesystem {
root: Inode {
attr: Attr {
ctime: 1.4705227450393803e+09,
gid: 502,
mode: 511,
mtime: 1.4705227450393803e+09,
uid: 110853,
xattr: {},
},
contents: Directory {
entries: {
"usenix_winter91_faulkner.pdf": Inode {
attr: Attr {
ctime: 1.4705228859273868e+09,
gid: 502,
mode: 420,
mtime: 1.468425783e+09,
uid: 110853,
xattr: {
"com.apple.FinderInfo": 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 // 32 B
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00,
"com.apple.quarantine": 30 30 30 31 3b 35 37 38 36 36 36 33 37 3b 53 61 // 21 B
66 61 72 69 3b,
},
},
contents: File {
data: dmc45152ie46mn3ls92vvhnm41ianehn,
},
},
},
},
},
},
})
http://splore.noms.io/?db=https://demo.noms.io/ahl_blog&hash=2nhi5utm4s38hka22vt9ilv5i3l8r2ol

Nom Nom Nom

--

--

--

Building computers at Oxide; past: DTrace, ZFS, Delphix CTO, Transposit founder, CEO

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Adam Leventhal

Adam Leventhal

Building computers at Oxide; past: DTrace, ZFS, Delphix CTO, Transposit founder, CEO

More from Medium

Step by Step Migration Guide from Epsagon to Thundra

Immutability in Golang;

Fun with Flags

Custom CloudWatch Metrics from Lambda Functions