Open DougAnderson444 opened 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
codec
Plugins could operate on:
pubsub
: broadcast Do something internally to the app when a topic gets a messagerequest-response
: p2p request and respond with something for a specific request
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:
on_message
handler to processpubsub
messagespublish
can be passed in to respond to any messageI 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:
P
comes afterN
in the alphabetPoster
, as in posting messagesImposter
, as in a Nostr Imposter