react-client
react-client copied to clipboard
Can HedgeDoc be fully functional without a server but with IPFS?
Hi,
Right now, if i got the documentation correctly, you need the HedgeDoc client (this repo) and the server for a fully functional instance.
Don't get me wrong! That is a perfectly fine setup to have!
Still, i'm curious to know if HedgeDoc would be able to run in a fully distributed manner. Here the distributed platform would be IPFS. It would be enough to save documents. It would be lacking for user management as that just is a whole different beast to tackle in the distributed world (though DID can be used with help if 3BOX).
The means of communicating with IPFS would be done client side thought js-ipfs. Which would allow adding data to the network and getting data from it.
The end result (now excluding the DID and 3BOX stuff) would be accessing your document from anywhere as long as there is a node hosting your data in the network. There would not be a server at all.
I'm curious what you folks think about this.
Cheers, Mark
Hi Mark,
Short Answer: No
Long Answer:
Interesting idea, but saving files is not everything. For a full hedgedoc experience we need the realtime component and permission management. Also synchronising and merging documents in a distributed setup is much more complicated.
Don't get me wrong, we love decentrialized apps (that's why we use matrix), but HedgeDoc will focus on the communication with the HedgeDoc Backend.
Hi Tilman,
Ah, i see. The "synchronising and merging documents in a distributed setup" part is a solved problem in IPFS. Look at this video for example: https://www.youtube.com/watch?v=-kdx8rJd8rQ
It does come with a big caveat though. It's unmaintained.
The IPFS team has more of this. For example, there is webrtc-star which works but needs "signaling servers" (so there you have a central point again) to work properly. And that library is going to be phased out sometime, that much is clear already. I know they are working on this stuff but i don't know what the most current project is.
The permission management is tricky. As that requires a central place (like a database). A distributed solution for this is super tricky, if possible.
I suppose what i'm asking is: is the current codebase flexible enough to even allow a distributed version to exist?
Cheers, Mark
Is the current codebase flexible enough to even allow a distributed version to exist?
Most likely it isn't. Our primary goal right now is to make the frontend work with the HedgeDoc backend, therefore we focus our efforts on the communication between these two parts. I'm sorry, but we don't have the time or resources to generalize the hole infrastructure to allow multiple backends. :/
I'm sorry, but we don't have the time or resources to generalize the hole infrastructure to allow multiple backends. :/
Very understandable and fair enough! I'm already very happy that such a great markdown editor like this exists and is totally free :)
I think that also answers everything i asked. It's up to you if you leave this issue open for perhaps an adventurous developer that sees this sometime and might want to give it a shot.
Here's an idea. This could be a source code bounty!
By that i mean that the end result should be a fully working HedgeDoc with IPFS and no other central servers. I should be able to access HedgeDoc through any IPFS node.
I would totally support a source code bounty and would put in some money for it. Provided it would be a kind of crowdfunding concept where i eventually get the funds back if nothing happens.
We decided that this is out of scope for HedgeDoc. If anybody wants to implement this then the person can fork the project.