- Bi-directional reliable stream I/F which hides peers on gossip protcol layer with SCTP
- Any centralized server is not needed
- TCP socket programming style interface (system architecture like a server and clients can be implemented)
- NAT transparent communication
$ go build -o streamer main/streamer.go
Message Ping Pong between 2 peers through one intermediate peer
(thid peer-c establishes two connectionns to peer-b on overlay NW and send ping to each connection)
Start several peers on the same host.
Tell the second and subsequent peers to connect to the first one.
Procedure below needs shell x 3 :)
$ ./streamer -hwaddr 00:00:00:00:00:01 -nickname a -mesh :6001
$ ./streamer -side recv -hwaddr 00:00:00:00:00:02 -nickname b -mesh :6002 -peer 127.0.0.1:6001
$ ./streamer -side send -hwaddr 00:00:00:00:00:03 -nickname c -mesh :6003 -peer 127.0.0.1:6001 -destid 2
Network Topology:
- Peer-b <-> Peer-a <-> Peer-c
- Port forwarding tool between private networks
- DHT based very simple distributed KVS whose nodes run on overlay
- Replace pion/sctp (SCTP) with hashicorp/yamux (QUIC like protcol) and redesign overlay connection establishment sequence...
- gist (in Japanese)