ingenrod / mesh

0 stars 0 forks source link

architecture: #2

Open sloev opened 4 months ago

sloev commented 4 months ago

brug wave-share til initielt bootstrapping

hver peer har et peerId som er deres public key hver peer bruger peer-relay til at forme webrtc træer hver peer bruger web-dht ovenpå peer-relay til at forme et globalt namespace hver peer bruger mutable key-values til at holde andre opdateret på deres catalog af torrents hver bruger har et catalog af torrents: infohash til filnavn

hver bruger seeder et tilfældigt udvalg af torrents omkring dem samt hvad de selv har pinnet

sloev commented 4 months ago

brug kun peer-relay til små beskeder, hvis beskeden er større end x da lav en torrent og seed den og send dens infohash i stedet

sloev commented 4 months ago

evt: hvis du vil sende en besked: hvis besked er under 150bytes: send besked direkte hvis besked har attachements eller er større end 150bytes: vedhæft resten af data som en torrent og send besked inkl infohash

sloev commented 4 months ago

https://discord.com/channels/695952492684640267/1167430786622967808/1215570107791839242

sloev commented 4 months ago

currently thinking about: use https://github.com/ggerganov/wave-share for webrtc bootstrapping using audio (no servers please 🙂 ) organize webrtc trees using xor hash distance like in dht (see https://github.com/RangerMauve/mostly-minimal-spanning-tree) relay messages using same algo as peer-connections, for eventual delivery (see https://github.com/xuset/peer-relay) use https://github.com/geut/nanomessage to have request/response end to end on the top have esp32 join the fun with audio bootstrapping, wifi mesh (see https://github.com/aZholtikov/zh_network) and webrtc (see https://github.com/seemk/WebUDP)

sloev commented 4 months ago

currently my blunt comments would be something like:

project: p (pros) c(cons): gundb: p[easy to establish first p2p replication] c[code-base and docs are not great] peerbit: p[great docs, ok codebase] c[dictates code style, very frameworky, uses special relay/signalling] yjs + y-webrtc: p[uses mmst for sparse p2p mesh, rocksolid crdt] c[doesnt scale well in terms of peers] dxos: p[great documentation, community, codebase, solid p2p implementation using webrtc first and mmst sparse mesh] c[currently doesnt scale well for many users on single docs] orbitdb: p[great dox, great codebase, helia and libp2p rocks] c[slow because of ipfs] ipfs (helia): p[great code, dox etc] c[slow because of ipfs]

all in all i think it would be great with a project that: work in the browser local serverless webrtc handshakes using audio (https://github.com/ggerganov/wave-share ) sparse page-refresh-persisted mesh trees using https://github.com/RangerMauve/mostly-minimal-spanning-tree end to end encryption using assymetric keys plus public key used as peer-id data is transmitted either directly (only works if both peers are online) or relayed through the mesh using hash x-or distance to find its way to the recipient (should work offline using lans, and works between networks etc) end to end ack have in browser persistence of key-pair and un-acked messages