I'm not particular about language (Java, Go, Javascript, etc), since it's for a new project. I found this thread from 2016 (https://news.ycombinator.com/item?id=11145691), it had some interesting recommendations, but quite a few were out of date, and with the big push to distributed apps nowadays, I thought it might be a good time to readdress the topic.
Some of the solutions form the other thread or that I've found:
- Smokesignal (Javascript / Node, not updated in >10 months) https://github.com/marcelklehr/smokesignal
- ZeroTier: https://www.zerotier.com/product-netcon.shtml
- Maki: https://maki.io
- Telehash: http://telehash.org/
- A whole host of blockchain projects, Bitcoin, Ethereum, HyperLedger, Scorex (Scala blockchain)
Bitcoin is an interesting option, it certainly has a large user base and is well tested and secure code, but forking it has it's own set of issues.
EDIT: I'm referring to the JS version here.
We found IPFS in general to be awesome software that just wasn't quite ready for production.
There's IPFS-cluster[0] but that's still in capital-letters ALPHA.
Why not GNUnet? Check the recently released 181 pages long dissertation on it:
https://pdfs.semanticscholar.org/153d/578869863450766a870727...
Previous Hacker News discussion here: https://news.ycombinator.com/item?id=15877908
If you end up rolling your own, I found js to have the most building blocks (pmp and upnp libraries).
I'd strongly recommend going for GNUnet, nobody takes me serious when I say this, but it WILL surplant IP eventually.
The painful move from IPv4 to IPv6 suggests that this is unlikely. More likely is an overlay over IP, TCP, or even HTTPS.
GNUnet can function as an overlay and an _underlay_ simultaneously, quoting from the dissertation:
> GNUnet is an overlay network, as it is initially supposed to primarily operate over the existing Internet network. However, GNUnet does not assume that this is always the case. For example, GNUnet can also operate directly over WLAN or Bluetooth to create an ad-hoc wireless mesh network, and with the GNUnet “PT/VPN” subsystems we can run TCP/IP over GNUnet. So in this configuration, GNUnet would be an underlay network, a bit like MPLS or B.A.T.M.A.N. [NAL07]. In reality, we in fact expect to see both at the same time: some peers will run over the existing Internet, while others may connect to GNUnet on Layer 2.
Previous Hacker News discussion here: https://news.ycombinator.com/item?id=15877908
Scuttlebutt is advertised as a social network, but in core it is an eternal distributed log. You can pass either public or private messages and assets around.
https://github.com/kgryte/awesome-peer-to-peer
Personal bias tilts to web tech. WebRTC will require you to centrally implement all your peer broker and logic. But take a look at something like Peer5 Video CDN to appreciate scalability:
We solve the problem of distributing HLS/DASH delivery over large p2p swarms and scaling video. Doesn't sound like it could work for OP.
Thanks a lot for keeping us in mind though :)
- Developed by Microsoft
- Open Specification
- DHT-based
- IPv6 only
- Windows support since Windows XP SP 3
- .NET support since .NET Framework 3.5 (System.Net.PeerToPeer)
[1]: https://en.wikipedia.org/wiki/Peer_Name_Resolution_Protocol
[2]: https://msdn.microsoft.com/en-us/library/aa371699.aspx "PNRP Namespace Provider API"
[3]: https://msdn.microsoft.com/en-us/library/bb726971.aspx "Peer Name Resolution Protocol"
https://github.com/blockstack/blockstack/blob/master/README....
Depending on the application(s) you have in mind.
The idea with urbit (amongst others, it's a big system) is for everyone to have a personal server that's easier to administrate than a linux server. It's been posted a bunch of times https://hn.algolia.com/?query=urbit&sort=byPopularity&prefix...
I've also heard about https://zeronet.io/ and https://beakerbrowser.com/
But you definitely should checkout IPFS and Kademlia.
If you're interested in Ethereum, it has other non-blockchain technologies that you can use for your apps. It has the Swarm network for storing bits of data, the Whisper network for chat and messaging, as well as Public-Key signing to verify messages. I'm using the latter functionality for a demo to replace password as the security mechanism.
What SSB gets right and the others don't, is the incentive to mirror or replicate. Virtual currency is a weak incentive in an early stage network - but friendship isn't; you mirror your friends' data.
The basic API to program the dapp can be seen here - http://scuttlebot.io/ But for more advanced uses see https://youtu.be/f_baWUW4R8Y
It's a generic peer-to-peer networking library written in Rust.
* it connects two peers together
* various NAT traversal techniques are implemented: hole punching, UPnP/IGD, etc.
* it supports both TCP and UDP. In case of UDP it uses uTP: http://www.bittorrent.org/beps/bep_0029.html
* all messages are encrypted
* it implements automatic peer discovery on LAN
* it caches it's previous connections and is able to reuse them in the future
* etc.Pretty good for small payloads.
You can take a look at OpenBazaar and Particl for P2P implementations.
While it does a lot of the connection and communication part, it lacks a way to bypass nat routers.
Here is a book on zyre http://zguide.zeromq.org/php:chapter8
I also found this thing called pwnat which bypasses nat routers without the need for UDP hole punching !
https://github.com/samyk/pwnat
I feel like if someone made a high level wrapper combining these two, we can have a very good framework.
Our audacious 'IPv8' work is now deployed live. Might fit you needs. Includes above features in a low-complexity approach. https://github.com/Tribler/py-ipv8 Our fresh IETF Internet Standard draft of this work: https://tools.ietf.org/html/draft-pouwelse-trustchain-00