Trying to model hypercore-protocol in Rust, and wow yeah okay this is pushing the boundaries a bit of what established Rust stream patterns can provide. Currently using the codec pattern + modelling it after crossbeam channels, but it's not *quite* righthttps://github.com/mafintosh/hypercore-protocol …
-
Show this thread
-
Okay done for today. Research so far is in this doc: https://paper.dropbox.com/doc/2019-07-17-Hypercore-Network-Protocol--AhNEGkO5FvBBgr7Wt3cPjs3VAg-4B3OhCO3vPtphqT82Lidg … Tl;Dr: hypercore-protocol multiplexes multiple feeds over a single connection, which means we're having two layers of things that need to stream in and out. It's really good, but ooph this isn't easy.
1 reply 0 retweets 4 likesShow this thread -
Where "single connection" == AsyncRead + AsyncWrite. Using Hyperswarm this could be backed by a plethora of connection methods, but the interface should remain consistent.
2 replies 0 retweets 0 likesShow this thread -
Replying to @yoshuawuyts
unsure if this helps you but note that it is designed in a way where the "stream in a stream" does *not* need any backpressure mechanics - the top level protocol handles all of that
1 reply 0 retweets 2 likes
Sort of! My main trouble was figuring out how to make the borrow checker behave, but I think I have a design that can work now!
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.