News for hackers. Stuff that matters.
Re:Show HN: Flatend – Quickly build microservices using P2P ... by kodablah on Thursday June 18, 2020 @11:23AM (#23563928)
I appreciate the dev-friendliness of this (libp2p leaves a lot to be desired last I looked from a dev perspective). How chatty is it? How resilient is it to untrusted peers (e.g. any of skademlia features built in)? Any plans to let the user provide their own net.Conns or io.Reader/Writers (e.g. I might want to run it over Tor)?
Re:Show HN: Flatend – Quickly build microservices using P2P ... by lithdew on Thursday June 18, 2020 @11:41AM (#23564110)
All communication is quiescent unless some given node A sends data to node B (apart from TCP keepalive packets of course). For routing messages, it is expected O(log n) much like ordinary Kademlia.

There isn't much resilience carefully integrated into the system for untrusted peers (complete S/Kademlia is in progress though! Static/dynamic crypto puzzles are fully implemented to prevent Sybil attacks on IDs, and the FIND_NODE RPC call is implemented to meet he guarantees documented in S/Kademlia's paper), since this framework is intended to be used in a closed environment for a set of microservices.

The underlying library for networking, Monte, fully supports providing your own net.Conn's and io.Reader/Writers - all you need to do is return your modified net.Conn via implementing the monte.Handshaker interface here: https://github.com/lithdew/monte/blob/master/net.go#L36

Monte will everything else related to bidirectional RPC management. Details of the bare minimum Monte prefixes to your packets is documented on the README for it.

Hope you enjoy using either Monte or Flatend!