Are you aware of https://github.com/bup/bup? It's a git file format based backup incremental backup tool.
Do you also use rolling checksums (like bup) to prevent re-storing data when only a few bytes have changed? --> What are the major use cases you imagine for noms? I've read the section on Github, but can you give some specific examples that you see as good use cases?
bup is focused on backups. Would you say that noms is useful as a backup utility?
Do you have any mechanisms for securing integrity, specifically repairing the store in case of inconsistencies? Is there any plans to support any data retention policy/functionality?
Another question to help me better understand the tool: who do you see as your competitors, technically? What do you see as viable alternatives to Noms, but worse? (Or better!) I do see that you were inspired by git, but clearly your use-cases are different.
Git is a competitor. It is fairly common to check data (e.g., csv or json files) into Git today.
However, this falls down pretty rapidly. In order to get reasonable diffs, the data has to be sorted, and line-oriented. Also Git just doesn't scale well to larger repos or individual objects. Otherwise, we see the competitors as the way that people distribute data today - custom APIs, zip files full of CSV, etc.
How would you say Noms compares to Datomic[1]? Both projects are working on the same idea of representing a database as tree of commits over time.
From my quick inspection, it looks like Noms shows some focus towards working in multiple branches, whereas Datomic, at least in its marketing materials, just talks about preserving a single timeline. [1]: http://www.datomic.com/benefits.html
> Also Git just doesn't scale well to larger repos or individual objects.
I guess the above means that Noms does scale to larger repos... Do you guys have any numbers, comparisons, benchmarks against git? If so, it would be useful to include in the readme.md as it would be kind of a big thing, and quite attractive to many people.
I mean, by their definition it is a database, but i can understand your usage. Then again, they both say it is a database, and in your link, they say it "isn't quite there yet", so /shrug heh.
IPFS is essentially providing a globally decentralized filesystem. Noms is providing (or hopes to provide) a database. By database, I mean:
- small individual records
- efficient queries, updates, and range scans
- ability to support complex queries
- ability to enforce structural data validity
These are all things that IPFS could eventually grow to support, but in order to do it, I think it would have to grow into or layer something like noms on top.
Why would you exclusively support schema inference, rather than also allowing users to manually specify their schemas?
Schema inference is very difficult to do correctly and safely, especially with small initial samples of instances (source: work on https://github.com/snowplow/schema-guru).
There's a little bit of terminology overloading going on here.
In Noms every value has a type. It's an immutable system, so this type just is. The type of `42` is `Number`. The type of `"foobar"` is `String`. The type of `[42,44]` is `List`. And if you add "foo" to that list, the type becomes `List`. We don't try to infer a general database schema from a few instances of data. We just apply this aggregation up the tree and report the result. That all said, we do want to eventually add schema _validation_, by which I mean the ability to associate a type with a dataset and have the database enforce that any value committed to the dataset is compatible with that type (following subtyping rules).
It sounds like Noms is dynamically typed, rather like SQLite — types are associated with values, not (just) with datasets. The difference is that SQLite (like Python or JS) only types leaf/atomic data, while you're also typing aggregate data. Is that right?
Right - the challenge is that with dynamic typing and without schema validation, it's incredibly easy to break any strongly typed client/consuming application. You think you are dealing with a `List`, you have Go/Java/Haskell/whatever apps which are consuming that in a strongly typed fashion using their idiomatic record types, and then suddenly a user accidentally sends in a single value which turns the tree of values into a `List`, and all your consuming apps break.
Given that schema validation ("does this instance match this type?") is simpler to implement than schema inference ("what is the type of this instance?"), it's surprising to me to deliver inference first...
The HN title suggested it's a database, which made me really curious as I can finally stop using history tables (or wal logging, or the other myriad ways of seeing a point in time). However, that doesn't seem to be the case here? That said, the idea of "git as a datastore" does seem akin to "blockchain as data verification". Combine those two ideas together, get PWC involved and you have multimillion dollar deals coming in for audit protection.
I've been working on something pretty akin to what you describe, hosted verifiable data structures (logs and maps). Rather than Blockchain it uses the same data structures as Certificate Transparency to provide equivalent functionality. Would love to get some feedback if you had the time to look: https://www.continusec.com/
I've been wanting something like Noms for a while. Prolly trees sound really promising.
In intro.md, you suggest, "If you wanted to find all the people of a particular age AND having a particular hair color, you could construct a second map having type Map>, and intersect the two sets." In that case, how should I keep the two maps in sync? Do I need to atomically update the logic of all the instances of the application to modify both maps instead of just one? Or do I keep the second map (the hair color index) in a separate index database and update the index whenever I pull changes from a remote database? (What does the API look like for getting notified of new changes that haven't been indexed yet?) I see that "noms sync" does both push and pull. Does that mean I can't pull data from a database I can't write to? How does that work over HTTP — do I need to use a special HTTP server that knows how to accept and authenticate write requests, or can I just dump a Noms dataset in a directory and serve it up with Apache? Forgive me if these questions are obvious — I've read the docs I could find, but I haven't read any of the code beyond the hr sample.
> Do I need to atomically update the logic of all the instances of the application to modify both maps instead of just one? Or do I keep the second map (the hair color index) in a separate index database and update the index whenever I pull changes from a remote database? (What does the API look like for getting notified of new changes that haven't been indexed yet?)
Currently, you have to manually keep an index up to date. But keep in mind that internally this is what all databases are doing -- manually reflecting changes into indexes -- they just hide it from you. Eventually, we imagine that there will be tools to declare indexes you want to maintain and we'd do it for you. Note that because Noms is good at diffing, calculating the changes that need to be re-indexed comes for free!
Comments (167) 38 threads
Earlier commentsDo you also use rolling checksums (like bup) to prevent re-storing data when only a few bytes have changed?
--> What are the major use cases you imagine for noms?
I've read the section on Github, but can you give some specific examples that you see as good use cases?
https://github.com/attic-labs/noms/blob/master/doc/intro.md
We were also heavily influenced by camlistore (which I hacked on for awhile), irmin, ipfs, and others who have done a lot of interesting work in this space.
We do use rolling checksums, but I think we have done some novel work here: https://github.com/attic-labs/noms/blob/master/doc/intro.md#...
PS: I love the name "Prolly Tree".
[1] <https://github.com/attic-labs/noms/blob/master/datas/databas...
Continue this thread — 1 reply
Do you have any mechanisms for securing integrity, specifically repairing the store in case of inconsistencies?
Is there any plans to support any data retention policy/functionality?
Continue this thread — 1 reply
However, this falls down pretty rapidly. In order to get reasonable diffs, the data has to be sorted, and line-oriented. Also Git just doesn't scale well to larger repos or individual objects.
Otherwise, we see the competitors as the way that people distribute data today - custom APIs, zip files full of CSV, etc.
From my quick inspection, it looks like Noms shows some focus towards working in multiple branches, whereas Datomic, at least in its marketing materials, just talks about preserving a single timeline.
[1]: http://www.datomic.com/benefits.html
Continue this thread — 1 reply
I guess the above means that Noms does scale to larger repos... Do you guys have any numbers, comparisons, benchmarks against git?
If so, it would be useful to include in the readme.md as it would be kind of a big thing, and quite attractive to many people.
https://ipfs.io/
IPFS is essentially providing a globally decentralized filesystem. Noms is providing (or hopes to provide) a database.
These are all things that IPFS could eventually grow to support, but in order to do it, I think it would have to grow into or layer something like noms on top.By database, I mean:
Schema inference is very difficult to do correctly and safely, especially with small initial samples of instances (source: work on https://github.com/snowplow/schema-guru).
In Noms every value has a type. It's an immutable system, so this type just is. The type of `42` is `Number`. The type of `"foobar"` is `String`. The type of `[42,44]` is `List`. And if you add "foo" to that list, the type becomes `List`.
We don't try to infer a general database schema from a few instances of data. We just apply this aggregation up the tree and report the result.
That all said, we do want to eventually add schema _validation_, by which I mean the ability to associate a type with a dataset and have the database enforce that any value committed to the dataset is compatible with that type (following subtyping rules).
Are you planning on writing complete reference documentation at some point, like https://www.sqlite.org/limits.html, https://www.sqlite.org/howtocorrupt.html, https://www.sqlite.org/lang.html, https://docs.python.org/2/reference/index.html, and https://golang.org/ref/spec? Or is using Noms going to be more of a UTSL kind of thing? The documentation I've found so far seems to be purely tutorial and introductory in nature.
(I'm really glad you're writing Noms, by the way. There's an enormous need for it.)
Given that schema validation ("does this instance match this type?") is simpler to implement than schema inference ("what is the type of this instance?"), it's surprising to me to deliver inference first...
Continue this thread — 1 reply
Continue this thread — 2 more replies
The HN title suggested it's a database, which made me really curious as I can finally stop using history tables (or wal logging, or the other myriad ways of seeing a point in time). However, that doesn't seem to be the case here?
That said, the idea of "git as a datastore" does seem akin to "blockchain as data verification". Combine those two ideas together, get PWC involved and you have multimillion dollar deals coming in for audit protection.
http://opendata.stackexchange.com/questions/748/is-there-a-g...
But there's also - https://github.com/mirage/irmin
In intro.md, you suggest, "If you wanted to find all the people of a particular age AND having a particular hair color, you could construct a second map having type Map>, and intersect the two sets." In that case, how should I keep the two maps in sync? Do I need to atomically update the logic of all the instances of the application to modify both maps instead of just one? Or do I keep the second map (the hair color index) in a separate index database and update the index whenever I pull changes from a remote database? (What does the API look like for getting notified of new changes that haven't been indexed yet?)
I see that "noms sync" does both push and pull. Does that mean I can't pull data from a database I can't write to? How does that work over HTTP — do I need to use a special HTTP server that knows how to accept and authenticate write requests, or can I just dump a Noms dataset in a directory and serve it up with Apache?
Forgive me if these questions are obvious — I've read the docs I could find, but I haven't read any of the code beyond the hr sample.
Currently, you have to manually keep an index up to date. But keep in mind that internally this is what all databases are doing -- manually reflecting changes into indexes -- they just hide it from you.
Eventually, we imagine that there will be tools to declare indexes you want to maintain and we'd do it for you. Note that because Noms is good at diffing, calculating the changes that need to be re-indexed comes for free!
All comments shown.
Couldn't load more comments. Check your connection and try again.