Open MatejLach opened 8 years ago
Examples are definitely worth reading. That C# one - woah! Lots of detail there.
Don't have a lot of experience with this kind of network programming... but I think MIO is a good option. One asynchronous event loop would handle reading and writing to peers... not sure what to suggest from there lol but I'll have more ideas soon.
@synlestidae Yeah, am not too versed in this as well, but that's part of the fun, night :-) I agree with mio + I wonder whether futures-rs can help us here as well.
Yes a few months ago I would have said MIO for sure as it seemed to be the only (as far as I knew) cross-platform async-IO rust library. There is also tokio which is built on top of MIO. Worth a look...
I saw that hyper
is about to improve its async API by using tokio, however this benchmark, shows that current hyper
, (which does not integrate tokio
, but rotor
instead), is significantly slower than both, raw mio
and the futures
HTTP implementation, so I am interested in seeing how that improves with hyper
0.10, implementing tokio
and whether tokio
will offer rps speeds closer to raw mio
.
This is a tracking issue for implementing the Peer Wire Protocol
Once tracker request/response cycle is implemented, we are ready to implement the Peer Wire Protocol. The Peer Wire Protocol facilitates the actual P2P exchange of blocks and is thus the heart of the BitTorrent protocol.