DougAnderson444 / libp2peasy

4 stars 0 forks source link

Implement `wasm` plugin system #1

Open DougAnderson444 opened 1 year ago

DougAnderson444 commented 1 year ago

Libp2peasy Plugins

Raising this issue as @p-shahi mentioned at this week's libp2p community call with @dhuseby that @marcopolo had mentioned the idea of building portable libp2p modules (kad-dht) implemented in any language and compiled to Wasm.

Plugins enable us to have a single "base layer" libp2p application such as libp2peasy (or whatever) and use other peoples' plugins with your data in a sandboxed way.

I'm working toward this direction, using https://extism.org/ and have some basic working versions of plugins, they just need to be written and integrated into libp2peasy.

See

I see Plugins as basically having 2 handles:

I see the plugin basically handling a message, encoding/processing/responding in the appropriate way, then possibly publishing if appropriate. Very early thoughts at this point.

Top on my list are the following plugins:

** I'm going to call it Postr, because:

DougAnderson444 commented 1 year ago

Plugins are essentially precompiled codecs which you can load at runtime, can be written by someone else, and can safely handle your data

DougAnderson444 commented 1 year ago

codec Plugins could operate on: