I was thinking about DHT and I'm not quite sure if it's the best network. The main problem is that it is focused on short simple messages to many different peers, which works well for UDP. However, since I want to be able to have browsers be full nodes on the network, I am relegated to using WebRTC, which is a much slower protocol when establishing connections.
I'm not sure what the implications of that are, and whether it will be a problem or not. I think I need to do some experimentation on that.
The other idea is to use freenet's algorithm, which has long standing connections and would be a better fit for WebRTC. I only skimmed freenet's whitepaper, so I need to delve into it more deeply so that I can better make a decision.
Other than that, I came up with an initial roadmap for Captain Dirgo, which is subject to change which is still based on DHT.
The idea is that version 1 would make it necessary to run a daemon along side the browser. Version 2 would allow firefox to not need a daemon anymore, and version 3 should work with chrome and other browsers.
Below is the breakdown of the roadmap on a rough architectural level:
Version 1:
- node ids are ip and a public key (like bittorent BEP42 and s/kademlia)
- public key is used as a user id
- we only have a DHT network, nothing underneath
- DHT contains:
- nodeid - address/port (in the future, webrtc, etc.)
- userdata - a separate key from userid, contains data associated to user, good and bad. Split into 3 separate locations to prevent fuckery. (using hash of nodeid+1, nodeid+2, nodeid+3). T
- username - the userid associated with a username ... do we really want this?
- urlstart - keyed of the hashed url, contains block, or a merkle tree root of contained blocks
- url+block - a merkle tree node of a url (referenced by a higher up url+block or urlstart)
- To write a message, upvote, etc. a put_value is run
- To use must run a daemon app that browser locally connects to
- nodes keep a log of estimated network size (for determining if other nodes are considered trustworthy given their distance to the infohash)
- upvotes give proof of work
Version 2:
- webrtc integration
- we need websocket support in the daemons
- we have special messages for SDP, add, claim (and responses confirming or denying the claim)
- firefox support w/o daemon
- chrome still needs daemon
Version 2.1
- chrome support w/o daemon (hopefully)
Version 3:
- Global state, blockchain.
I was thinking about DHT and I'm not quite sure if it's the best network. The main problem is that it is focused on short simple messages to many different peers, which works well for UDP. However, since I want to be able to have browsers be full nodes on the network, I am relegated to using WebRTC, which is a much slower protocol when establishing connections.
I'm not sure what the implications of that are, and whether it will be a problem or not. I think I need to do some experimentation on that.
The other idea is to use freenet's algorithm, which has long standing connections and would be a better fit for WebRTC. I only skimmed freenet's whitepaper, so I need to delve into it more deeply so that I can better make a decision.
Other than that, I came up with an initial roadmap for Captain Dirgo, which is subject to change which is still based on DHT.
The idea is that version 1 would make it necessary to run a daemon along side the browser. Version 2 would allow firefox to not need a daemon anymore, and version 3 should work with chrome and other browsers.
Below is the breakdown of the roadmap on a rough architectural level:
Version 1:
* node ids are ip and a public key (like bittorent BEP42 and s/kademlia)
* public key is used as a user id
* we only have a DHT network, nothing underneath
* DHT contains:
- nodeid - address/port (in the future, webrtc, etc.)
- userdata - a separate key from userid, contains data associated to user, good and bad. Split into 3 separate locations to prevent fuckery. (using hash of nodeid+1, nodeid+2, nodeid+3). T
- username - the userid associated with a username ... do we really want this?
- urlstart - keyed of the hashed url, contains block, or a merkle tree root of contained blocks
- url+block - a merkle tree node of a url (referenced by a higher up url+block or urlstart)
* To write a message, upvote, etc. a put_value is run
* To use must run a daemon app that browser locally connects to
* nodes keep a log of estimated network size (for determining if other nodes are considered trustworthy given their distance to the infohash)
* upvotes give proof of work
Version 2:
* webrtc integration
- we need websocket support in the daemons
- we have special messages for SDP, add, claim (and responses confirming or denying the claim)
* firefox support w/o daemon
* chrome still needs daemon
Version 2.1
* chrome support w/o daemon (hopefully)
Version 3:
* Global state, blockchain.
(post is archived)