yggdrasil-go icon indicating copy to clipboard operation
yggdrasil-go copied to clipboard

Add extension support

Open cofob opened this issue 2 years ago • 5 comments

Why?

This will allow you to easily expand existing functionality (for example, gui, or your own transports) without creating forks with a stable API on latest version of ygg.

In my vision, these are separate compiled go binaries that yggdrasil will load from a specific folder.

cofob avatar Dec 02 '21 11:12 cofob

This could be done with the plugin functionality ive heard golang have, however, i have no idea about its stability.

Also, this could apply to the pinecone repository as well.

ShadowJonathan avatar Dec 02 '21 11:12 ShadowJonathan

why not use libp2p as "transport" ? (and add extensions in libp2p, if it not have any like "ip over dns" before)

ps: where issue "add libp2p-transport to yggdrasil"? current protocols https://github.com/multiformats/multiaddr/blob/master/protocols.csv additional protocols like this https://github.com/allhailjarjar/go-libp2p-i2p-transport

jl452 avatar Jan 04 '22 14:01 jl452

IMO, the core API is extensible enough already, except for transports.

Is it possible to separate transports from the core package and "plug" them in at compile time?

zhoreeq avatar Jan 04 '22 15:01 zhoreeq

I added QUIC protocols support in RiV-Mesh. It's not complex tasks if a transport lib implements net.Conn Golang interface. There is an implementation:

QUIC: https://github.com/RiV-chain/RiV-mesh/blob/quic-peers-schema/src/core/tcp.go

Also I created a test Go lib to test transport library before import it to a project:

https://github.com/vikulin/conn-test-go

Supports: TCP, QUIC, SCTP

As result you might try to add libp2p in conn-test-go and see the result comparing to TCP.

vikulin avatar Jun 09 '22 12:06 vikulin

https://github.com/allhailjarjar/go-libp2p-i2p-transport looks like it implements net.Conn.

vikulin avatar Jun 09 '22 12:06 vikulin

Not planning to add a pluggable module system, but Yggdrasil can already be embedded into other Go programs.

neilalexander avatar Feb 26 '23 22:02 neilalexander