Codimd: Run hackmd on IPFS

Created on 14 Nov 2016  路  6Comments  路  Source: hackmdio/codimd

Hey there! We just started hackmd at ipfs, after having a discussion about moving on from etherpads here. A few of us were wondering if it might be possible to use IPFS as a backend for HackMD, making it possible to run on a decentralized, distributed internet.

Would you be interested in working with us to make this possible? We would love to be able to use HackMD along with IPFS.

feature help wanted

Most helpful comment

Hi @RichardLitt @jbenet
IPFS looks cool, I think we can work together!
I not really good at CRDT or even OTs, but it's ok to tell every detail we've designed.

But I would suggest open another branch or making PR to work on this.
Current version is not stable enough, wait until 0.5.0 will be better.

And we received some suggestions to use matrix.org or DAG (hyperlog) to make us support decentralized net.
There are so many solutions, could you please explain why and how to choose them?

All 6 comments

Looks like hackmd uses OTs -- which rely on an aggregating server, and are not fully distributed, like some CRDT counterparts. I would imagine the steps towards this to be:

  • [ ] make sure the hackmd data model can be ported over to CRDT (or is properly distributable)
  • [ ] then, try putting hackmd over orbit-db
  • [ ] figure out how auth looks in the distributed case (a hacked-up port can ditch all the centralized OAuths in favor of some other distributed auth, or embrace pseudonymous no-auth).

Hi @RichardLitt @jbenet
IPFS looks cool, I think we can work together!
I not really good at CRDT or even OTs, but it's ok to tell every detail we've designed.

But I would suggest open another branch or making PR to work on this.
Current version is not stable enough, wait until 0.5.0 will be better.

And we received some suggestions to use matrix.org or DAG (hyperlog) to make us support decentralized net.
There are so many solutions, could you please explain why and how to choose them?

@jackycute you already have a DAG -- I believe OTs are a DAG. What you want is also a proper distributed CRDT, where the entire data structure is guaranteed to converge on all hosts and without any bounds on latencies or connectivity. We can take a look and see about proposing changes to the underlying data model to make it leverage CRDTs and make it friendly to all these systems. (A proper CRDT will get you the whole way with all these things-- as long as the log has no centralizing or timing assumptions, any of these systems should be able to make use of this log just fine)

I heard about CRDTs.
And also read this paper https://arxiv.org/abs/1608.03960
So I know how hard a proper CRDT structure can be, but worth it.

Is there any exist lib to make OT to CRDT?

@haadcode @nicola do you have some time to look into the model of hackmd in the next week or two?

I think you need to chat with @Chat-Wane (he made https://github.com/Chat-Wane/CRATE) to have a fully decentralized HackMD.

Fully peer-to-peer solution (hard)

  • do not have a centralized an aggregating server OT (only use the aggregating server to "serve" the latest update)
  • have a gossip system to propagate changes (hackmd can keep on being the single gossiper, but should gossip with other nodes)
  • use crdt (via orbit?)

Publishing hashes (easy)
Although decentralized collaborative editing is a good idea, it is not a low hanging fruit. Maybe starting hashing the result at every few changes and post the hash could be a good idea.

Other intermediate solutions
There are also other solutions that some of us started looking at (and left behind, but will get back on them soon!) which we called authenticated streams. (let's chat about this on IRC freenode #ipfs if you want to know more)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mxmo0rhuhn picture mxmo0rhuhn  路  3Comments

dsprenkels picture dsprenkels  路  3Comments

SISheogorath picture SISheogorath  路  4Comments

mxmilkiib picture mxmilkiib  路  3Comments

LukasKalbertodt picture LukasKalbertodt  路  4Comments