Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run hackmd on IPFS #251

Open
RichardLitt opened this issue Nov 14, 2016 · 6 comments
Open

Run hackmd on IPFS #251

RichardLitt opened this issue Nov 14, 2016 · 6 comments
Labels
feature Wants to add a new feature help wanted We want you to help us with this!

Comments

@RichardLitt
Copy link

RichardLitt commented Nov 14, 2016

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.

@jbenet
Copy link

jbenet commented Nov 14, 2016

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).

@jackycute
Copy link
Member

jackycute commented Nov 15, 2016

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?

@jbenet
Copy link

jbenet commented Nov 15, 2016

@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)

@jackycute
Copy link
Member

jackycute commented Nov 15, 2016

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?

@jackycute jackycute added feature Wants to add a new feature help wanted We want you to help us with this! labels Nov 29, 2016
@jbenet
Copy link

jbenet commented Nov 30, 2016

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

@nicola
Copy link

nicola commented Nov 30, 2016

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Wants to add a new feature help wanted We want you to help us with this!
Projects
None yet
Development

No branches or pull requests

4 participants