Skip to content

Instantly share code, notes, and snippets.

@mafintosh
Created June 6, 2016 19:12
Show Gist options
  • Save mafintosh/ae41cbdbba9713f637e224746a536d90 to your computer and use it in GitHub Desktop.
Save mafintosh/ae41cbdbba9713f637e224746a536d90 to your computer and use it in GitHub Desktop.
20:10 dat-gitter-bot> (scriptjs) @mafintosh can you contrast hyperlog vs hypercore for their log capabilities, you dropped hypercore at some point. Is hypercore by itself as useful for an append only log use case?
20:10 <•mafintosh> @scriptjs right
20:10 <•mafintosh> so hyperlog is a DAG structure (a merkle dag even)
20:10 <•mafintosh> where data you insert can point to other data you insert
20:10 <•mafintosh> which is really great if you have multiple peers collaborating on the same data structure
20:11 <•mafintosh> a hyperlog is also always fully replicated since that makes the replication protocol pretty trivial
20:11 <•mafintosh> (i really need to write some white paper on that at some point)
20:11 <•mafintosh> hypercore is just simple single-writer append-only logs
20:11 <•mafintosh> so abstraction-wise hyperlog > hypercore
20:12 <•mafintosh> we could even make hyperlog run on top of hypercore which i really wanna do
20:12 <•karissa> Oh rly
20:12 <•karissa> That sounds fun
20:12 <•mafintosh> yea because hyperlog is just built on a series of append-only logs
20:12 <•mafintosh> so it should *just work*
20:12 <dat-gitter-bot> (scriptjs) k, I get this much better, this helps a lot
20:13 <•mafintosh> @scriptjs hypercore's main feature is that logs can be sparsely replicated efficiently
20:13 <•mafintosh> this is very important for hyperdrive (build on hypercore)
20:13 <•mafintosh> because that allows it do to partial sync of a file (aka streaming)
20:13 <dat-gitter-bot> (scriptjs) right
20:13 <dat-gitter-bot> (scriptjs) this is really helpful
20:14 <•mafintosh> this also makes it more complicated than hyperlog unfortunately
20:14 <dat-gitter-bot> (scriptjs) for my understanding
20:14 <•mafintosh> but still pretty straightforward compared to a lot of other distributed systems
20:14 <•mafintosh> @scriptjs glad it makes it easier to grok.
20:14 <dat-gitter-bot> (scriptjs) well I have been reading the code but I cannot get all the context from it
20:15 <•mafintosh> yea thats kinda hard with distributed stuff in general
20:15 <dat-gitter-bot> (scriptjs) and also reading what you have been writing which is enormously helpful
20:15 <•mafintosh> the easiest way to understand the differences is looking at the modules that use hyperlog,core
20:16 <•mafintosh> @scriptjs fx, building a git clone would be best in hyperlog
20:16 <•mafintosh> but a bittorrent clone is a lot better in hypercore
20:16 <•mafintosh> because of the different semantics
20:17 <dat-gitter-bot> (scriptjs) yeah that is a good example
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment