Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Implement wasm plugin system #1

Open
6 tasks
DougAnderson444 opened this issue Jun 1, 2023 · 2 comments
Open
6 tasks

Implement wasm plugin system #1

DougAnderson444 opened this issue Jun 1, 2023 · 2 comments

Comments

@DougAnderson444
Copy link
Owner

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:

  • - Some sort of on_message handler to process pubsub messages
  • - A host function for publish can be passed in to respond to any message

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:

  • - IPNS
  • - Name name system support
  • - Video broadcast over gossipsub
  • - Versatile chat plugin similar to Nostr**

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

  • P comes after N in the alphabet
  • It is similar to Poster, as in posting messages
  • It is similar to Imposter, as in a Nostr Imposter
  • It will use gossipsub instead of the Nostr floodsub
  • It will enable all the libp2peasy transports, so you can run a Postr node at home
  • It will be plugin compatible, so if you want to customize it, you just create a new plugin instead of having to build a who new app from the ground up
@DougAnderson444
Copy link
Owner Author

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

@DougAnderson444
Copy link
Owner Author

DougAnderson444 commented Jun 1, 2023

codec Plugins could operate on:

  • pubsub: broadcast Do something internally to the app when a topic gets a message
  • request-response: p2p request and respond with something for a specific request

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant