-
Notifications
You must be signed in to change notification settings - Fork 37
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
Implement peers / network #11
Comments
Networking Vaporware APIlet feed = Feed::default();
feed.append(b"data")?;
for event in feed {
match event {
Event::Data(data) => {},
Event::PeerAdd => {},
Event::PeerRemove => {},
Event::Download => {},
Event::Synchronize => {},
Event::Append => {},
}
} |
What are you planning on using for networking?
|
@pierd great question! -- I've bee thinking about this a bunch, even to the point where I've joined the networking WG to make more sense of the landscape. I think there's no evading that we need So I'm thinking for next steps it'd be good to start implementing the Dat networking layer. This would include extracting / re-building (if it isn't in So yeah, there's a few steps to take here. I'd happily provide write access to Hope this all makes sense! -- Sorry for not communicating much of this earlier; only got a good grasp of the next steps to take here when I met up with mafintosh in Vancouver earlier this month. References |
I think that a nice addition would be to follow https://github.com/bluejekyll/trust-dns and their technical decisions when it comes to networking (https://github.com/bluejekyll/trust-dns/issues/569#issuecomment-433561439). IIRC dns multicast is also part of the swarm-discovery process (see https://www.npmjs.com/package/@hyperswarm/discovery) Also worth mentioning: libp2p/libp2p#28 libp2p/rust-libp2p#590 |
Regarding networking, it seems that Dat is going to be migrating to hyperswarm once that's up and running. |
I would like to help with this. I've started a small test to discover how mdns and libp2p works, and if it would interop with current dat on node, specially with the hyperswarm migration. Any pointers to start/continue with this? |
@bltavares I haven't done any research on the network protocol yet, so it probably requires scouring through the JS reference impl to find out. Doing that and sharing the notes would probably be the first step in making progress on this. I'm thinking that a first version of the network protocol should probably tackle TCP first, and a single discovery mechanism. It can then later be expanded to cover more protocols once we have an MVP. |
I've started a research project on the network interop on bltavares/colmeia, specially to understand how viable is to use existing rust crates for discovery. My plan is to find a running dat repo on my local network, then find it use hyperswarm dht, and provide a list of ip:ports to connect for a given dat public key. (No url DNS lookup yet). I will take this slowly, as much of my computer time is being used at work and I'm trying to take things slowly :) I'll push my notes and discoveries on that repo :) |
I played around with hypercore-protocol in Rust too and made it up to receiving a first data message from a regular nodejs hypercore replication stream, but with the NOISE handshaking and encryption disabled. See hypercore-protocol-rust-experiments and this PR to disable NOISE in hypercore. |
I've finished this weekend with a barely functional dat server. It is broadcasting MDNS requests on the network, and it can be reached by The handshake part is working, as well as the encryption. It needs now to implement the remaining protocol to exchange data. I'll park this a bit, and try to get it cross-compiled to run on Android just to check if it is working :) |
On another news: |
I've started playing around with the idea of The design I'm coming from was the idea of having a The networks stack on hypercore API seems to live inside hypercore, given the I can think of a couple of ideas:
I'll try to write an async test case on hypercore to drive the changes to make it |
Any updates? I'm thinking of picking this up if nobody is working on it at the moment. |
hypercore
now works pretty well, it's time to implement the networking part.Todos
feed.announce()
(ref)feed.unannounce()
(ref)pub feed.has()
(ref)pub feed.has_all()
(polymorphic variant offeed.has()
)pub feed.head()
(ref)pub feed.replicate()
(ref)pub feed.update()
(ref)pub feed.downloaded()
(ref)pub feed.finalize()
(ref)Peer
structEvent
enumBonus
pub feed.cancel()
(ref)pub feed.clear()
(ref)pub feed.seek()
(ref)Skipping
pub feed.download()
(ref)pub feed.undownload()
(ref)Resources
The text was updated successfully, but these errors were encountered: